Closed Bug 1368906 Opened 2 years ago Closed Last year

Remove argument aSize from AllocPWebRenderBridgeParent()

Categories

(Core :: Graphics: WebRender, enhancement, P3)

enhancement

Tracking

()

RESOLVED INVALID
Tracking Status
firefox56 --- unaffected
firefox57 --- unaffected

People

(Reporter: sotaro, Assigned: sotaro)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It seems not necessary to deliver aSize with AllocPWebRenderBridgeParent().
Assignee: nobody → sotaro.ikeda.g
Attachment #8872862 - Flags: review?(nical.bugzilla)
Attachment #8872862 - Flags: review?(nical.bugzilla)
Attachment #8872862 - Flags: review?(jmuizelaar)
Comment on attachment 8872862 [details] [diff] [review]
patch - Remove argument aSize from AllocPWebRenderBridgeParent()

Review of attachment 8872862 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/webrender_bindings/WebRenderAPI.cpp
@@ +68,5 @@
>      gl->fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, mMaxTextureSize);
>      *mUseANGLE = gl->IsANGLE();
>  
>      WrRenderer* wrRenderer = nullptr;
> +    auto size = mCompositorWidget->GetClientSize();

Is this safe to call on the renderer thread?
If it is not safe, we also need to change also RendererOGL::Render().
   https://dxr.mozilla.org/mozilla-central/source/gfx/webrender_bindings/RendererOGL.cpp#127

I am going to look into it tomorrow.
Comment on attachment 8872862 [details] [diff] [review]
patch - Remove argument aSize from AllocPWebRenderBridgeParent()

Cancel a review for now.
Attachment #8872862 - Flags: review?(jmuizelaar)
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #3)
> Comment on attachment 8872862 [details] [diff] [review]
> patch - Remove argument aSize from AllocPWebRenderBridgeParent()
> 
> Review of attachment 8872862 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/webrender_bindings/WebRenderAPI.cpp
> @@ +68,5 @@
> >      gl->fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, mMaxTextureSize);
> >      *mUseANGLE = gl->IsANGLE();
> >  
> >      WrRenderer* wrRenderer = nullptr;
> > +    auto size = mCompositorWidget->GetClientSize();
> 
> Is this safe to call on the renderer thread?

The GetClientSize() is also called on RendererOGL::Render(), it also might not be safe.
  https://dxr.mozilla.org/mozilla-central/source/gfx/webrender_bindings/RendererOGL.cpp#129
We do not need to do it.
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.