Commit Graph

2074 Commits

Author SHA1 Message Date
Markus Stange
7319c5e46d Bug 1592038 - Allow sharing depth and stencil buffers between multiple MozFramebuffers. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D54862

--HG--
extra : moz-landing-system : lando
2019-12-19 03:26:19 +00:00
Markus Stange
978cf2b7f0 Bug 1592044 - Add MozFramebuffer::HasDepth() and HasStencil(). r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D55040

--HG--
extra : moz-landing-system : lando
2019-12-18 20:33:53 +00:00
Markus Stange
02b5afd25b Bug 1604633 - Stop calling -[NSOpenGLContext pixelFormat] on 10.9, take 2. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57555

--HG--
extra : moz-landing-system : lando
2019-12-18 00:12:24 +00:00
Markus Stange
b971dcf446 Bug 1602813 - Stop calling -[NSOpenGLContext pixelFormat] because it's not available on 10.9. Instead, inline CreateWithFormat into this callsite. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D56585

--HG--
extra : moz-landing-system : lando
2019-12-10 21:57:23 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
David Parks
4dc38ba6aa Bug 1577336: Part 7 - Move DXGI async plugin operations to compositor process r=jmathies,mattwoodrow,sotaro,mccr8
Previously, we created TextureD3D11 objects in the content process to back surfaces created for the plugin process.  Those objects were then composited by the async ImageBridge.  In order to remove Win32 kernel operations from content (including DX/GDI operations), this patch bounces the requests from content to the compositor process.  The compositor process maintains 2 textures to be used for all plugin composition -- one for the plugin process and one for display.  The plugin process can freely write to its texture and request composition when it is done, which triggers a blit to the display texture.  This mirrors pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D46086

--HG--
extra : moz-landing-system : lando
2019-11-20 21:49:35 +00:00
David Parks
18e50987a5 Bug 1577336: Part 6 - Make SurfaceDescriptorGPUVideo a union that contains SurfaceDescriptorRemoteDecoder r=mattwoodrow,jolin
SurfaceDescriptorGPUVideo, which currently only represents RemoteDecoder video, switches from being a struct to a union that holds a SurfaceDescriptorRemoteDecoder struct.  SurfaceDescriptorRemoteDecoder is a new name for the old SurfceDescriptorGPUVideo.  This is done so that we can later add SurfaceDescriptorPlugin as another type of SurfaceDescriptorGPUVideo.

Differential Revision: https://phabricator.services.mozilla.com/D52400

--HG--
extra : moz-landing-system : lando
2019-11-20 21:55:06 +00:00
Glenn Watson
cf3a4562ea Bug 1597887 - Improve performance of DirectComposition mode with WR. r=sotaro
This patch include two performance improvements:
 - Only rebuild the DC visual tree if different from last frame.
 - Use EGLImage instead of pbuffer for DC <-> GL interop.

These fix most of the talos regressions with DC enabled in WR.

Differential Revision: https://phabricator.services.mozilla.com/D53916

--HG--
extra : moz-landing-system : lando
2019-11-20 07:12:42 +00:00
Markus Stange
2e63893952 Bug 1579664 - Migrate compositor GLContexts to the active GPU after a GPU switch. r=jgilbert
MigrateToActiveGPU is only called on compositor GLContexts, not for WebGL.
See bug 1597547 for WebGL.

After this fix, the situation can be improved in multiple ways:
 - Rather than moving contexts between GPUs, it would be better to have separate
   contexts for each GPU, and teach our compositors to switch a window over to
   a new context.
 - Instead of creating a fresh context to obtain the "preferred" GPU, we should
   find the GPU that drives the display on which the context's results are going
   to be displayed.

Differential Revision: https://phabricator.services.mozilla.com/D53719

--HG--
extra : moz-landing-system : lando
2019-11-19 08:52:00 +00:00
Markus Stange
3ef43bc992 Bug 1596248 - Remove some duplicated checks, and the unused EMULATE_VM define. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D52924

--HG--
extra : moz-landing-system : lando
2019-11-19 03:14:12 +00:00
Markus Stange
b37d02c990 Bug 1596248 - Use CreateHeadless in GLContextProviderCGL::CreateForCompositorWidget. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D52923

--HG--
extra : moz-landing-system : lando
2019-11-19 03:49:06 +00:00
Markus Stange
cfe68beea0 Bug 1596248 - Stop specifying depth buffer surface caps for WebRender. r=jgilbert
This setting was only respected for manually-created fake "default" framebuffers,
by code that no longer exists.

Differential Revision: https://phabricator.services.mozilla.com/D52922

--HG--
extra : moz-landing-system : lando
2019-11-19 03:13:42 +00:00
Markus Stange
0239580b86 Bug 1596248 - Stop specifying depth buffer attributes when creating a GLContext for WebRender. r=jgilbert
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.

Differential Revision: https://phabricator.services.mozilla.com/D52921

--HG--
extra : moz-landing-system : lando
2019-11-19 03:48:21 +00:00
Markus Stange
fb2b04b715 Bug 1596248 - Add CreateContextFlags::PREFER_MULTITHREADED and change the pref name from gl to webgl. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D53768

--HG--
extra : moz-landing-system : lando
2019-11-19 21:49:01 +00:00
Markus Stange
240730710b Bug 1596248 - Remove the pref gl.require-hardware and instead just respect CreateContextFlags::FORCE_ENABLE_HARDWARE. r=jgilbert
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.

Differential Revision: https://phabricator.services.mozilla.com/D52920

--HG--
extra : moz-landing-system : lando
2019-11-19 17:57:35 +00:00
Markus Stange
48f7109003 Bug 1596248 - Remove any notion of single or double buffered GLContexts. r=jgilbert
This distinction is not meaningful with CoreAnimation because all rendering happens into IOSurfaces.

Differential Revision: https://phabricator.services.mozilla.com/D52919

--HG--
extra : moz-landing-system : lando
2019-11-19 03:12:28 +00:00
Markus Stange
e318aa1d0e Bug 1596248 - Remove unused GLContextProvider::CreateForWindow. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D52918

--HG--
extra : moz-landing-system : lando
2019-11-19 03:12:13 +00:00
Markus Stange
8b245c092f Bug 1576390 - Remove the prefs gfx.core-animation.enabled and gfx.compositor.glcontext.opaque, and all the code needed to support it. r=mattwoodrow,spohl
Differential Revision: https://phabricator.services.mozilla.com/D52739

--HG--
extra : moz-landing-system : lando
2019-11-13 19:07:37 +00:00
Miko Mynttinen
1ebc8b0671 Bug 1578576 - Part 3: Prefer ES2 for WebGL1 r=jgilbert
Depends on D44579

Differential Revision: https://phabricator.services.mozilla.com/D44581

--HG--
extra : moz-landing-system : lando
2019-11-11 13:09:32 +00:00
sotaro
11d9c7b7fa Bug 1591346 - Remove EGL_ANGLE_experimental_present_path usage with WebRender r=gw
EGL_ANGLE_experimental_present_path was enabled for fast rendering to SwapChain by ANGLE. But current gecko does not request ANGLE to render to SwapChain for WebRender. Then we do not need to use EGL_ANGLE_experimental_present_path anymore. But Its usage still has a side effect that y is flipped. But OS compositor implementation on Windows does not want it. And it seems not good to continue to use EGL_ANGLE_experimental_present_path since it is experimental feature.

But when EGL_ANGLE_experimental_present_path is removed, rendering result of frame buffer is y flipped with ANGLE compared to other OpenGL implementation. It needs to be handled in WR. It is similar to chromium.

Differential Revision: https://phabricator.services.mozilla.com/D50604

--HG--
extra : moz-landing-system : lando
2019-10-28 00:56:41 +00:00
Dorel Luca
0f892548f9 Backed out 4 changesets (bug 1578576) for causing build failure with microsoft visual studio 2019. a=backout
Backed out changeset e5b3436fc277 (bug 1578576)
Backed out changeset cd2799d2d190 (bug 1578576)
Backed out changeset 13282d7a47a5 (bug 1578576)
Backed out changeset 3064469c073d (bug 1578576)

--HG--
rename : gfx/angle/checkout/src/common/Color.inc => gfx/angle/checkout/src/common/Color.inl
rename : gfx/angle/checkout/src/image_util/copyimage.inc => gfx/angle/checkout/src/image_util/copyimage.inl
rename : gfx/angle/checkout/src/image_util/generatemip.inc => gfx/angle/checkout/src/image_util/generatemip.inl
rename : gfx/angle/checkout/src/image_util/loadimage.inc => gfx/angle/checkout/src/image_util/loadimage.inl
rename : gfx/angle/checkout/src/libANGLE/Version.inc => gfx/angle/checkout/src/libANGLE/Version.inl
rename : gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table_autogen.cpp => gfx/angle/checkout/src/libANGLE/renderer/d3d/d3d11/dxgi_support_table.cpp
rename : gfx/angle/checkout/src/libGLESv2/proc_table_egl.h => gfx/angle/checkout/src/libGLESv2/proc_table.h
rename : gfx/angle/checkout/src/libGLESv2/proc_table_egl_autogen.cpp => gfx/angle/checkout/src/libGLESv2/proc_table_autogen.cpp
2019-09-10 11:54:20 +03:00
Miko Mynttinen
e110583d7c Bug 1578576 - Part 3: Prefer ES2 for WebGL1 r=jgilbert
Depends on D44580

Differential Revision: https://phabricator.services.mozilla.com/D44581

--HG--
extra : moz-landing-system : lando
2019-09-07 19:38:21 +00:00
Tom Ritter
d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Markus Stange
a847ab162b Bug 1578099 - Remove now-unnecessary default framebuffer functionality from GLContextCGL. r=mattwoodrow
This essentially backs out the two patches from bug 1565668 that added this
functionality.

Differential Revision: https://phabricator.services.mozilla.com/D44330

--HG--
extra : moz-landing-system : lando
2019-09-02 00:37:56 +00:00
Markus Stange
c6660314f0 Bug 1578099 - Add NativeLayer::NextSurfaceAsFramebuffer. r=mattwoodrow
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

Differential Revision: https://phabricator.services.mozilla.com/D44325

--HG--
extra : moz-landing-system : lando
2019-09-01 22:35:56 +00:00
Markus Stange
b2ce563f4b Bug 1574745 - Change BlitFrameBufferToFrameBuffer to take rects instead of sizes. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D43876

--HG--
extra : moz-landing-system : lando
2019-08-31 01:30:53 +00:00
Markus Stange
19057e1f9d Bug 1576968 - Use glFlush() instead of -[NSOpenGLContext flushBuffer] when we have no framebuffer zero. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D43648

--HG--
extra : moz-landing-system : lando
2019-08-28 21:45:23 +00:00
Lee Salzman
abec95ddc1 Bug 1571838 - Backed out changeset a6f3fd30a0a7 (bug 1443181). r=jbonisteel
Differential Revision: https://phabricator.services.mozilla.com/D43080

--HG--
extra : moz-landing-system : lando
2019-08-22 15:15:08 +00:00
Mike Hommey
66d7fe943e Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D42765

--HG--
extra : moz-landing-system : lando
2019-08-21 12:25:42 +00:00
Jeff Gilbert
9c8ea204ee Bug 1573700 - s/GLParseRegistryXML.py/GLConsts.py/ and port to python3+mypy. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D41873

--HG--
extra : moz-landing-system : lando
2019-08-14 02:07:40 +00:00
Coroiu Cristina
b4e3ce3f87 Backed out changeset 42cdb2c4c768 (bug 1573700) for flake8 failure at builds/worker/checkouts/gecko/gfx/gl/GLConsts.py 2019-08-14 03:44:33 +03:00
Jeff Gilbert
ef22bd959b Bug 1573700 - s/GLParseRegistryXML.py/GLConsts.py/ and port to python3+mypy. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D41873

--HG--
extra : moz-landing-system : lando
2019-08-14 00:20:22 +00:00
Jean-Yves Avenard
c4def0fb6f Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow
Still non-functional.

Differential Revision: https://phabricator.services.mozilla.com/D27214

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:30 +00:00
Jean-Yves Avenard
c070ea1f0e Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

Differential Revision: https://phabricator.services.mozilla.com/D27211

--HG--
extra : moz-landing-system : lando
2019-07-26 08:45:35 +00:00
Narcis Beleuzu
e84980d8b1 Backed out 15 changesets (bug 1543359) for wrench bustages on image.rs . CLOSED TREE
Backed out changeset 548006270186 (bug 1543359)
Backed out changeset c9585e9d9f3c (bug 1543359)
Backed out changeset 1c7ca95a2a9b (bug 1543359)
Backed out changeset d742d80b892f (bug 1543359)
Backed out changeset 210eee703fd9 (bug 1543359)
Backed out changeset 4eb933d55d88 (bug 1543359)
Backed out changeset fb9b71ed9f4b (bug 1543359)
Backed out changeset 98b968443458 (bug 1543359)
Backed out changeset a85bd4691bea (bug 1543359)
Backed out changeset b576317853e9 (bug 1543359)
Backed out changeset 095bca5c9b1a (bug 1543359)
Backed out changeset 48eb0ebf9f2e (bug 1543359)
Backed out changeset b22b0eb708b8 (bug 1543359)
Backed out changeset 52187d9320b1 (bug 1543359)
Backed out changeset fa6792c1c2e8 (bug 1543359)
2019-07-26 11:40:33 +03:00
Jean-Yves Avenard
e6eb3464df Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow
Still non-functional.

Differential Revision: https://phabricator.services.mozilla.com/D27214

--HG--
extra : moz-landing-system : lando
2019-07-26 06:13:44 +00:00
Jean-Yves Avenard
aec72edb84 Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

Differential Revision: https://phabricator.services.mozilla.com/D27211

--HG--
extra : moz-landing-system : lando
2019-07-26 06:10:52 +00:00
Cosmin Sabou
ae7e8fbf55 Backed out 14 changesets (bug 1543359) for causing build bustages. CLOSED TREE
Backed out changeset 87c99ef85813 (bug 1543359)
Backed out changeset cd0afc5758ba (bug 1543359)
Backed out changeset 101ac87ff017 (bug 1543359)
Backed out changeset 348e748e3451 (bug 1543359)
Backed out changeset d9e937f5caf4 (bug 1543359)
Backed out changeset 2f4eb6501552 (bug 1543359)
Backed out changeset 0d316ef8c668 (bug 1543359)
Backed out changeset bf238b58c694 (bug 1543359)
Backed out changeset 496f206d03d6 (bug 1543359)
Backed out changeset 7c3a1f23baa8 (bug 1543359)
Backed out changeset 90fff717198b (bug 1543359)
Backed out changeset b2ce591ca398 (bug 1543359)
Backed out changeset a63968f077e3 (bug 1543359)
Backed out changeset ca660ab1e0c1 (bug 1543359)
2019-07-26 07:39:11 +03:00
Jean-Yves Avenard
9d741696fe Bug 1543359 - P7. Plumb YUV Color Range info in Windows' Image types. r=mattwoodrow
Still non-functional.

Differential Revision: https://phabricator.services.mozilla.com/D27214

--HG--
extra : moz-landing-system : lando
2019-07-22 08:04:54 +00:00
Jean-Yves Avenard
e4a8bfeab0 Bug 1543359 - P3. Add kCVPixelFormatType_420YpCbCr8BiPlanarFullRange support to MacIOSurface. r=mattwoodrow
This will allow to differentiate full range vs limited range YUV.

Differential Revision: https://phabricator.services.mozilla.com/D27211

--HG--
extra : moz-landing-system : lando
2019-07-22 07:24:51 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Nicholas Nethercote
7974362afd Bug 1567329 - Append _AtStartup to once static pref getters. r=erahm
Currently it's completely unclear at use sites that the getters for `once`
static prefs return the pref value from startup, rather than the current pref
value. (Bugs have been caused by this.) This commit improves things by changing
the getter name to make it clear that the pref value obtained is from startup.

This required changing things within libpref so it distinguishes between the
"base id" (`foo_bar`) and the "full id" (`foo_bar` or
`foo_bar_DoNotUseDirectly` or `foo_bar_AtStartup` or
`foo_bar_AtStartup_DoNotUseDirectly`; the name used depends on the `mirror` and
`do_not_use_directly` values in the YAML definition.) The "full id" is used in
most places, while the "base id" is used for the `GetPrefName_*` and
`GetPrefDefault_*` functions.

(This is a nice demonstration of the benefits of the YAML file, BTW. Making
this change with the old code would have involved adding an entry to every
single pref in StaticPrefList.h.)

The patch also rejigs the comment at the top of StaticPrefList.yaml, to clarify
some things.

Differential Revision: https://phabricator.services.mozilla.com/D38604

--HG--
extra : moz-landing-system : lando
2019-07-22 02:10:14 +00:00
Markus Stange
e17435e83e Bug 1565668 - Create a depth buffer for the default framebuffer of a GLContext that is used with WebRender. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D26623

--HG--
extra : moz-landing-system : lando
2019-07-17 20:45:53 +00:00
Markus Stange
b105e4af50 Bug 1565668 - Add support for using an IOSurface as the default framebuffer for a GLContextCGL. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D26404

--HG--
extra : moz-landing-system : lando
2019-07-17 20:44:44 +00:00
Barret Rennie
cb1609a60d Bug 1289211 - Rename InfallibleTArray to nsTArray in gfx/ r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D36958

--HG--
extra : moz-landing-system : lando
2019-07-10 05:25:54 +00:00
Jeff Gilbert
e10bec305a Bug 1443181 - If ANGLE D3D11 disabled, ask for D3D9 explicitly. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D37351

--HG--
extra : moz-landing-system : lando
2019-07-09 04:58:03 +00:00
Chris AtLee
a0d3d64841 Bug 1559975: Fix python2/3 compat in gfx/ r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D35337

--HG--
extra : moz-landing-system : lando
2019-07-05 14:28:55 +00:00
Kartikaya Gupta
c8cff9effe Bug 1563311 - Remove uses of MOZ_BUILD_WEBRENDER. r=aosmond
This removes support for building Firefox/Gecko without WebRender.

Differential Revision: https://phabricator.services.mozilla.com/D36819

--HG--
extra : moz-landing-system : lando
2019-07-05 11:05:17 +00:00
Oana Pop Rus
30c64e1686 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-07-01 13:05:40 +03:00
Martin Stransky
df9765aca2 Bug 1561883 - [Wayland] Provide WaylandDisplayGetWLDisplay() to directly get wl_display, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D36183

--HG--
extra : moz-landing-system : lando
2019-07-01 06:38:32 +00:00