Closed Bug 1596248 Opened 5 years ago Closed 5 years ago

Simplify GLContext creation on macOS

Categories

(Core :: Graphics, task)

All
macOS
task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

Attachments

(9 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

Now that we always render into IOSurfaces, we can simplify some code around GLContext creation on macOS.

This code was trying to not render things upside down when rendering to offscreen contexts.
But this code path was never used and it wasn't fully working.
I would like to make our compositor contexts go through GLContextProviderCGL::CreateHeadless,
which creates an "offscreen" GLContext, so now this broken code is kicking in. Let's remove it.

This distinction is not meaningful with CoreAnimation because all rendering happens into IOSurfaces.

Depends on D52918

This seems to be what other platforms do. FORCE_ENABLE_HARDWARE is controlled by the pref webgl.force-enabled.
gl.require-hardware was only read on macOS.

Depends on D52919

This depth buffer would only be created for the default framebuffer, but there is
no default framebuffer on macOS (since all rendering goes into IOSurfaces), so
this attribute is ignored.
We already manually create depth buffers for the IOSurface framebuffers.

Depends on D52920

This setting was only respected for manually-created fake "default" framebuffers,
by code that no longer exists.

Depends on D52921

Attachment #9109869 - Attachment description: Bug 1596248 - Add CreateContextFlags::PREFER_MULTITHREADED. r=jgilbert → Bug 1596248 - Add CreateContextFlags::PREFER_MULTITHREADED and change the pref name from gl to webgl. r=jgilbert
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/5a778da8ea81
Don't treat CompositorOGL coordinates differently in offscreen GL contexts. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/60f93190c588
Remove unused GLContextProvider::CreateForWindow. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/d332b04a1d99
Remove any notion of single or double buffered GLContexts. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/3bfe21f8500e
Remove the pref gl.require-hardware and instead just respect CreateContextFlags::FORCE_ENABLE_HARDWARE. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/442b6daa41ae
Add CreateContextFlags::PREFER_MULTITHREADED and change the pref name from gl to webgl. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/2fb40100f0fa
Stop specifying depth buffer attributes when creating a GLContext for WebRender. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/4fbfff4426f2
Stop specifying depth buffer surface caps for WebRender. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/827e48eb21a7
Use CreateHeadless in GLContextProviderCGL::CreateForCompositorWidget. r=jgilbert
https://hg.mozilla.org/integration/autoland/rev/1b1fe528fa9b
Remove some duplicated checks, and the unused EMULATE_VM define. r=jgilbert,jrmuizel
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: