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

RESOLVED FIXED in Firefox 52

Status

()

defect
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

52 Branch
mozilla52
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

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.
Comment hidden (mozreview-request)
(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 hidden (mozreview-request)
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.

Comment 8

3 years ago
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dd859148673c
Pass a wrapper struct to various CompositorWidget functions. r=dvander

Comment 9

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/dd859148673c
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.