Closed Bug 1578099 Opened 5 years ago Closed 5 years ago

Make CompositorOGL and BasicCompositor use NativeLayer instead of NativeLayerCA with ifdefs

Categories

(Core :: Graphics: Layers, task)

All
macOS
task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(10 files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

Requested by Matt in a review in bug 1574592:

As discussed on IRC, I'd prefer for NativeLayer to have APIs for locking to get a DrawTarget, and to bind to the current framebuffer in a provided GLContext.

I think that'll give us less platform specific code in the renderer implementation, and avoid us needing to duplicate things between WebRender and Compositor's GL code.

Blocks: 1578100

The comments above these methods refer to NextSurface* methods which will be
added in later patches.

This uses MacIOSurface internally. NextSurfaceAsDrawTarget locks the MacIOSurface,
and NotifySurfaceReady unlocks it if necessary.

Depends on D44321

This returns the raw framebuffer GLuint and lets the caller bind it.
Initially I wanted to return a RefPtr<MozFramebuffer>, but then I discovered
that MozFramebuffer is not a refcounted class and prefers UniquePtrs.

Depends on D44324

CompositingRenderTargetOGL objects are no longer reused between frames. They are
recreated each frame around a reused framebuffer. This lets us remove the
SetOrigin method again, because we specify the right render target origin on
creation.

Depends on D44328

This essentially backs out the two patches from bug 1565668 that added this
functionality.

Depends on D44329

Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/bde43dd23263
Make more NativeLayerCA methods available on NativeLayerCA. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/cbe7c0b8bf00
Add NativeLayer::NextSurfaceAsDrawTarget. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/7a5e7c582e7d
Use NativeLayer::NextSurfaceAsDrawTarget in BasicCompositor and remove #ifdefs. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/3d0e490caad0
Make CFTypeRefPtr usable as a key inside an unordered_map. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/34aa23a05c67
Add NativeLayer::NextSurfaceAsFramebuffer. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/e115223a94ca
Use NativeLayer::NextSurfaceAsFramebuffer for WebRender. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/f09be81f4242
Change CompositingRenderTargetOGL creation API. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/ddf3709af4c8
Tweak CompositingRenderTargetOGL initialization flow. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/d1d697132576
Use NativeLayer::NextSurfaceAsFramebuffer in CompositorOGL and remove #ifdefs. r=mattwoodrow
https://hg.mozilla.org/integration/autoland/rev/cb449c1f91ff
Remove now-unnecessary default framebuffer functionality from GLContextCGL. r=mattwoodrow
Regressions: 1578310
Regressions: 1578376
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: