Closed Bug 1336021 Opened 8 years ago Closed 8 years ago

Add WebRenderImageHost

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

If we want to add more webrender specific things to CompositableHost, we should add WebRenderImageHost. We are going to add more new things like renader thread handling.
Blocks: webrender
Depends on: 1336024
Depends on: 1336041
Depends on: 1337085
Assignee: nobody → sotaro.ikeda.g
Attachment #8834320 - Flags: review?(nical.bugzilla)
Hi Sotaro, Is the WebRenderImageHost the final version of webrender specific things of ImageHost? There is no Compositor(e.g. WebRenderCompositorOGL) when we use renderer thread.
Flags: needinfo?(sotaro.ikeda.g)
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #2) > Hi Sotaro, > Is the WebRenderImageHost the final version of webrender specific things of > ImageHost? There is no Compositor(e.g. WebRenderCompositorOGL) when we use > renderer thread. It is not final version of handling webrender things. But it implements enough things to handle rendering of webrender things on current graphic branch with/without renderer thread.
Flags: needinfo?(sotaro.ikeda.g)
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #2) > Hi Sotaro, > Is the WebRenderImageHost the final version of webrender specific things of > ImageHost? There is no Compositor(e.g. WebRenderCompositorOGL) when we use > renderer thread. I did not understand well your question, can you explain more?
If we switch to renderer thread, we should use the gl_context in RendererOGL. So, I think should not use Compositor related interface inside WebRenderImageHost. And there is no layer and mask usage with WebRenderImageHost. That kind of interfaces could be cut off.
Flags: needinfo?(sotaro.ikeda.g)
Comment on attachment 8834320 [details] [diff] [review] patch - Add WebRenderImageHost Review of attachment 8834320 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/layers/composite/CompositableHost.cpp @@ +132,5 @@ > case CompositableType::IMAGE: > + if (gfxVars::UseWebRender()) { > + result = new WebRenderImageHost(aTextureInfo); > + } else { > + result = new ImageHost(aTextureInfo); I don't think we can decide whether to use WebRenderImageHost based on a global preference, because we are still going to have widgets that don't use WebRender (tooltips, small popups, etc.) and while these should never use the video and ImageBridge, they can still have images (so need the non-wr ImageHost).
(In reply to Jerry Shih[:jerry] (UTC+8) from comment #5) > If we switch to renderer thread, we should use the gl_context in > RendererOGL. So, I think should not use Compositor related interface inside > WebRenderImageHost. And there is no layer and mask usage with > WebRenderImageHost. That kind of interfaces could be cut off. Sorry, I do not understand your comment. Compositor related interface just did nothing on render thread case. Why do you think attachment 8834320 [details] [diff] [review] could not be used for renderer thread case? I created attachment 8834320 [details] [diff] [review] to add render thread related things.
Flags: needinfo?(sotaro.ikeda.g)
(In reply to Nicolas Silva [:nical] from comment #6) > I don't think we can decide whether to use WebRenderImageHost based on a > global preference, because we are still going to have widgets that don't use > WebRender (tooltips, small popups, etc.) and while these should never use > the video and ImageBridge, they can still have images (so need the non-wr > ImageHost). nical, can you explain more about it? In the above case, do we use ClientLayerManager? The patch affect only to ClientLayerManager case and current code does not have such things yet because of Bug 1337085. If we do not use WebRenderLayerManager, we should use BasicLayerManager. The patch does not affect to BasicLayerManager.
Flags: needinfo?(nical.bugzilla)
(In reply to Sotaro Ikeda [:sotaro] from comment #8) > If we do not use WebRenderLayerManager, we should use BasicLayerManager. The > patch does not affect to BasicLayerManager. With BasicLayerManager, all composition happens just by using client side APIs. https://dxr.mozilla.org/mozilla-central/source/gfx/layers/basic/BasicImageLayer.cpp#63
(In reply to Sotaro Ikeda [:sotaro] from comment #8) > > If we do not use WebRenderLayerManager, we should use BasicLayerManager. The > patch does not affect to BasicLayerManager. If compositor is not created, BasicLayerManager is created instead. https://dxr.mozilla.org/mozilla-central/source/widget/nsBaseWidget.cpp#1412
Actually you are right, it seems that we can get away with using non-omtc basic layers for popups and WebRender for everything else.
Flags: needinfo?(nical.bugzilla)
Comment on attachment 8834320 [details] [diff] [review] patch - Add WebRenderImageHost Review of attachment 8834320 [details] [diff] [review]: ----------------------------------------------------------------- I agree with Jerry in that we can simplify this a lot as soon as we enable the render thread by default, but we can start from there and simplify WebRenderImageHost along the way.
Attachment #8834320 - Flags: review?(nical.bugzilla) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: