Closed Bug 1315706 Opened 8 years ago Closed 8 years ago

Change the CompositorWidget::PreRender/PostRender signatures to not require a LayerManagerComposite

Categories

(Core :: Graphics: WebRender, defect)

52 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

Going forward with WebRender means that we may not have a LayerManagerComposite in some cases, but we (probably) still need to call PreRender/PostRender, because the cocoa widget at least does useful things there.

Seeing as the cocoa widget just needs a GL context from the LayerManagerComposite, and the android widget just needs to set the GL clear color on the compositor, and neither of them really need a LayerManagerComposite specifically, we can replace that argument with a new struct that contains platform-specific fields.
DrawWindowUnderlay/Overlay also don't need any parameters. android is the only widget that uses these functions, and the arguments have not been used for a while.
(In reply to Kartikaya Gupta (email:kats@mozilla.com) from comment #1)
> DrawWindowUnderlay/Overlay also don't need any parameters. android is the
> only widget that uses these functions, and the arguments have not been used
> for a while.

I was wrong about this, cocoa implements DrawWindowOverlay. So I updated those functions also take the WidgetRenderContext.
Shoot, I forgot to update WinCompositorWidget. I did that locally and am rebuilding to verify it compiles.
Comment on attachment 8808334 [details]
Bug 1315706 - Pass a wrapper struct to various CompositorWidget functions.

https://reviewboard.mozilla.org/r/91164/#review91066

It'd be nice to do this without #ifdefs, but the #ifdefs are such a small part of the code that I doubt it's worth it yet.
Attachment #8808334 - Flags: review?(dvander) → review+
Yeah if we start needing this in more places we can look into removing the ifdefs and using some sort of widget-specific subclass instead.
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd859148673c
Pass a wrapper struct to various CompositorWidget functions. r=dvander
https://hg.mozilla.org/mozilla-central/rev/dd859148673c
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.