2374 Commits

Author SHA1 Message Date
sotaro
6386e4b519 Bug 1673342 - Add Support of software WebRender with CompositorOGL on Android and Linux r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D106234
2021-03-01 13:45:38 +00:00
Andi-Bogdan Postelnicu
47714ef65c Bug 1694161 - some fixes for the MacOS non unified environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D106616
2021-02-27 08:05:46 +00:00
smolnar
bbe0284415 Backed out 2 changesets (bug 1694161) as requested by dev. DONTBUILD CLOSED TREE
Backed out changeset 0fb8a1114e84 (bug 1694161)
Backed out changeset 453ce7dffdcc (bug 1694161)
2021-02-26 18:52:04 +02:00
Andi-Bogdan Postelnicu
a839ede25c Bug 1694161 - some fixes for the MacOS non unified environment. r=sg
Depends on D105977

Differential Revision: https://phabricator.services.mozilla.com/D106616
2021-02-26 16:39:18 +00:00
sotaro
362676fcad Bug 1694822 - Fix return of RenderCompositorD3D11SWGL::DoCreateTile() r=mattwoodrow
"return" was removed by mistake.

Differential Revision: https://phabricator.services.mozilla.com/D106360
2021-02-26 03:56:40 +00:00
Andrew Osmond
08a4397790 Bug 1688096 - Part 2. Add flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-24 19:40:00 +00:00
Andrew Osmond
271ea44146 Bug 1688096 - Part 1. Merge SW-WR and WR render texture host paths to allow mixed compositors. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D104854
2021-02-24 19:39:59 +00:00
Jim Blandy
d05c7d7131 Bug 1694547: Let chrome JavaScript control WebRender capture sequence parameters. r=jrmuizel
This patch is plumbing to get a path and a flags word through from the content
process to the graphics process, to pass to `wr_api_start_capture_sequence`.

Differential Revision: https://phabricator.services.mozilla.com/D106229
2021-02-24 18:52:08 +00:00
Lee Salzman
f2c57b81f4 Bug 1690216 - Report whether to redraw on invalidation to WR. r=mattwoodrow
This requires us to plumb CompositorCapabilities to support the extra field.
This is complicated by the fact that since it is a Rust struct, it has no
default constructor that can pass through to C++ via bindings, so every
one of our RenderCompositors was forced to manually initialize fields. To
get around this brittle footgun, instead the structure is initialized on
the Rust side, and RenderCompositor's are encouraged to only change fields
that actually diverge from the defaults as passed in via pointer.

Finally, we can then do what we need to do, which is just to send the
ForceRedraw message that needs to happen based on what we know about
CompositorCapabilities.

Differential Revision: https://phabricator.services.mozilla.com/D106246
2021-02-24 14:15:02 +00:00
Andreea Pavel
4d15e7e3f1 Backed out changeset 45b36995cfd6 (bug 1690216) for build bustages at rules.mk on a CLOSED TREE 2021-02-24 12:03:14 +02:00
Lee Salzman
e746523892 Bug 1690216 - Report whether to redraw on invalidation to WR. r=mattwoodrow
This requires us to plumb CompositorCapabilities to support the extra field.
This is complicated by the fact that since it is a Rust struct, it has no
default constructor that can pass through to C++ via bindings, so every
one of our RenderCompositors was forced to manually initialize fields. To
get around this brittle footgun, instead the structure is initialized on
the Rust side, and RenderCompositor's are encouraged to only change fields
that actually diverge from the defaults as passed in via pointer.

Finally, we can then do what we need to do, which is just to send the
ForceRedraw message that needs to happen based on what we know about
CompositorCapabilities.

Differential Revision: https://phabricator.services.mozilla.com/D106246
2021-02-24 09:18:33 +00:00
Jeff Muizelaar
3a98d963c9 Bug 1694543 - Add a profiler label to RenderThread::UpdateAndRender. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D106225
2021-02-24 00:50:07 +00:00
Emilio Cobos Álvarez
7f2b3314e0 Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 10:49:37 +00:00
sotaro
9d6fd76b93 Bug 1677459 - Split platform independent part to RenderCompositorCompositorSWGL r=mattwoodrow
The change is a preparation of Bug 1673342

Differential Revision: https://phabricator.services.mozilla.com/D99046
2021-02-23 08:57:27 +00:00
smolnar
7f2e38a6b3 Backed out changeset 960cb2cf2009 (bug 1694059) for causing reftest failures. 2021-02-23 06:41:58 +02:00
Emilio Cobos Álvarez
c0fec9f98e Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 02:58:47 +00:00
smolnar
79ca2f76fa Backed out changeset 4436a8bb02fd (bug 1694059) for causing reftest failures. CLOSED TREE 2021-02-23 04:17:14 +02:00
Emilio Cobos Álvarez
cb286403d0 Bug 1694059 - Use WebRender to render most non-native-theme widgets when possible. r=mstange
We basically use a couple primitives to draw these
(PaintRoundedRectWithRadius, FillRect), so making the code a bit generic
implementing stuff with WebRender seems straight-forward.

I've kept using the fallback codepath for the bits that draw complex
paths like arrows and such, but the rest of the things should work with
this patch.

A thing I'm not too happy about is the scrollbar painting setup (requires a lot
of boilerplate), but modulo template hacks make nsNativeBasicTheme a template
that receives its super class as a parameter or something) it seems hard to do
better.

Differential Revision: https://phabricator.services.mozilla.com/D105931
2021-02-23 01:10:22 +00:00
Mihai Alexandru Michis
5fff3c0a33 Backed out changeset 8908ec20b487 (bug 1677459) for causing reftest assertion failures in LayersTypes.cpp
CLOSED TREE
2021-02-23 03:11:50 +02:00
sotaro
5758b0e880 Bug 1677459 - Split platform independent part to RenderCompositorCompositorSWGL r=mattwoodrow
The change is a preparation of Bug 1673342

Differential Revision: https://phabricator.services.mozilla.com/D99046
2021-02-22 21:55:50 +00:00
Cosmin Sabou
0e81627e87 Backed out 2 changesets (bug 1688096) for win webrender sw_compositor related crashes. CLOSED TREE
Backed out changeset aa0d1698aff8 (bug 1688096)
Backed out changeset 3ad2f4d0c317 (bug 1688096)
2021-02-18 19:52:29 +02:00
Andrew Osmond
c068c92afd Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 15:37:47 +00:00
Andrew Osmond
40e2f1c6f5 Bug 1688096 - Part 1. Merge SW-WR and WR render texture host paths to allow mixed compositors. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D104854
2021-02-18 15:37:46 +00:00
smolnar
0757c7413f Backed out 2 changesets (bug 1688096) for linux debug build bustage in KnowsCompositor. CLOSED TREE
Backed out changeset 6cdfa0af2278 (bug 1688096)
Backed out changeset 6471b0910f45 (bug 1688096)
2021-02-18 14:34:49 +02:00
Andrew Osmond
6528a201ab Bug 1688096 - Part 2. Add/use flag to CompositorOptions to allow SW-WR on a per widget basis. r=mattwoodrow
The pref gfx.webrender.software.unaccelerated-widget.allow may be used
to allow software WebRender to be used with new windows/popups that have
transparency on Windows. Otherwise they would fallback to basic layers.

Similarly, the pref gfx.webrender.software.unaccelerated-widget.force
may be used to force software WebRender for all windows that would
fallback to basic layers.

Differential Revision: https://phabricator.services.mozilla.com/D104855
2021-02-18 11:50:06 +00:00
Andrew Osmond
c4920b7fcc Bug 1688096 - Part 1. Merge SW-WR and WR render texture host paths to allow mixed compositors. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D104854
2021-02-18 11:50:05 +00:00
sotaro
4854f24585 Bug 1690491 - Add Texture2D allocation failure handling to RenderCompositorD3D11SWGL r=mattwoodrow
Texture2D allocation could fail by oom or device reset.

Differential Revision: https://phabricator.services.mozilla.com/D105406
2021-02-18 00:38:12 +00:00
sotaro
3d8c6a3911 Bug 1693241 - Add gfxCriticalNote to RenderTextureHostSWGL::LockSWGLCompositeSurface() r=mattwoodrow
It helps to understand Bug 1693208.

Differential Revision: https://phabricator.services.mozilla.com/D105418
2021-02-17 10:42:51 +00:00
Csoregi Natalia
30ee58f188 Backed out changeset 11b157c81a3a (bug 1693241) for causing cpp bustage on RenderTextureHostSWGL.cpp. CLOSED TREE 2021-02-17 09:49:50 +02:00
sotaro
e14e72e339 Bug 1693241 - Add gfxCriticalNote to RenderTextureHostSWGL::LockSWGLCompositeSurface() r=mattwoodrow
It helps to understand Bug 1693208 .

Differential Revision: https://phabricator.services.mozilla.com/D105418
2021-02-17 06:47:26 +00:00
sotaro
0dc5ddff34 Bug 1691895 - Make RenderCompositorSWGL work on android r=geckoview-reviewers,mattwoodrow,agi
Partial present is not supported yet with RenderCompositorSWGL on Android.

Differential Revision: https://phabricator.services.mozilla.com/D104654
2021-02-16 22:30:47 +00:00
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Sylvestre Ledru
eb4a1abeb2 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio DONTBUILD
Updated with rustfmt 1.4.18-stable (8157a3f 2020-07-15)

# ignore-this-changeset

Depends on D105158

Differential Revision: https://phabricator.services.mozilla.com/D105159
2021-02-15 09:14:01 +00:00
Andrew Osmond
b12f12554f Bug 1686946 - Ship Software WebRender to OSX early beta/nightly users without (full) WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D101933
2021-02-11 17:53:40 +00:00
Glenn Watson
e257367647 Bug 1692095 - Change DirectComposition virtual surface format to DXGI_FORMAT_R8G8B8A8_UNORM r=jrmuizel
In order to hit the fast path in ANGLE for readback from the
DirectComposition surface tiles, we need to ensure it uses
the same format as intermediate surfaces we are reading back to.

DirectComposition docs claim that both RGBA8 and BGRA8 formats
are supported for surfaces, and doesn't mention any performance
concerns.

I did some basic testing on an NVIDIA GTX 1050 and an Intel
HD530 and didn't notice any performance difference in Gecko
or in DWM.

This patch lands just the format change, so we can easily detect
any correctness or performance issues from the format change.

Differential Revision: https://phabricator.services.mozilla.com/D104771
2021-02-11 05:11:10 +00:00
Bogdan Tara
33fb6dff31 Backed out changeset b149d1f43e95 (bug 1691964) for wd failures on minimize.py CLOSED TREE 2021-02-10 20:11:58 +02:00
Mihai Alexandru Michis
74e3e203a8 Backed out changeset 1bf5a1f1db9a (bug 1686946) for causing bc failures in browser_policy_hardware_acceleration.js
CLOSED TREE
2021-02-10 19:46:27 +02:00
Andrew Osmond
3ceb6196c4 Bug 1691964 - Avoid accelerated compositing for headless tests with software WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D104694
2021-02-10 15:11:58 +00:00
Andrew Osmond
d5e27e6220 Bug 1686946 - Ship Software WebRender to OSX early beta/nightly users without (full) WebRender. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D101933
2021-02-10 14:12:09 +00:00
Markus Stange
0bdf21e675 Bug 1662281 - Don't warn when GL symbol lookup fails. We look up symbols for many extensions, for which symbol lookup is expected to fail. r=sotaro
We can bring this back if we have a way to only print the warning for essential symbols, bug 1322949.

Differential Revision: https://phabricator.services.mozilla.com/D104462
2021-02-09 21:17:20 +00:00
sotaro
2dc1d9cd2b Bug 1691640 - Add nullptr check to MapTexture() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D104498
2021-02-09 10:26:19 +00:00
Matt Woodrow
eaf110a595 Bug 1678656 - Don't rely on mPlanes to compute RenderTextureHost size, since it's only initialized when used with SWGL. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D104141
2021-02-09 04:38:24 +00:00
Jeff Muizelaar
0abab2be63 Bug 1687536 - Move SWGL compositor into WebRender proper. r=lsalzman
This will let us use it from Wrench.

Differential Revision: https://phabricator.services.mozilla.com/D102343
2021-02-07 20:04:14 +00:00
Jeff Muizelaar
d537e47349 Bug 1687829 - Add composite surface locking to MappableCompositor trait. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102501
2021-02-07 17:10:58 +00:00
Jeff Muizelaar
9312f8cf88 Bug 1687536 - Add MappableCompositor trait. r=gw
This is added in preparation for moving the SWGL compositor
into WebRender proper.

Differential Revision: https://phabricator.services.mozilla.com/D102342
2021-02-07 02:07:04 +00:00
Markus Stange
222784d009 Bug 1691176 - Fix includes and namespace annotations in RenderCompositorNative. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D104304
2021-02-06 05:20:24 +00:00
Lee Salzman
59bb247451 Bug 1690655 - Occlude SwCompositor surfaces. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D103949
2021-02-04 03:43:27 +00:00
Jeff Muizelaar
69eeb000ea Bug 1687522 - Use a 'gecko' feature instead of having a ThreadListener trait. r=kvark
Previously, we've taken the strategy of exposing any gecko specific hooks
as traits. The disadvantage of this approach is that it requires plumbing
a boxed trait through to any places that need to use it.

With this approach, we add global functions that don't do anything when
compiled without the 'gecko' feature. This makes it easier to add hooks
and avoids the plumbing which should reduce friction in the process
of moving more stuff out of gecko and into webrender.

Differential Revision: https://phabricator.services.mozilla.com/D102334
2021-02-03 16:19:20 +00:00
Lee Salzman
73e9582ee4 Bug 1674524 - implement KHR_blend_equation_advanced in SWGL. r=bradwerth
This patch has a few moving parts. We have to first tell WR that when it
detects the extension that it is actually allowed to use it. We have to make
the glsl-to-cxx translator eat the blend_supports_all_equations layout
qualifier. We have to enable generation of advanced-blend-equation variants
in the SWGL build setup. Then we report the actual extension inside SWGL.
Finally, we actually add all the necessary blend equation enums, hash them
down to a blend key, and implement all the blend modes therein.

Differential Revision: https://phabricator.services.mozilla.com/D103804
2021-02-02 22:18:21 +00:00
Brindusan Cristian
d3b8616aad Backed out changeset f71aafc4e845 (bug 1674524) for build bustages in src/gl.cc. CLOSED TREE 2021-02-03 00:07:59 +02:00