Граф коммитов

2391 Коммитов

Автор SHA1 Сообщение Дата
Jan Alexander Steffens (heftig) 4920407bb3 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-11 14:32:53 +00:00
Brad Werth b24888db8d Bug 1692029 Part 1: Make TextureHost report a native texture policy. r=lsalzman
Whether or not we use a native texture or something else is affected by our
backend and the size of the texture. This patch adds a new function to
centralize that logic in TextureHost, and applies it in callsites that were
checking the backend to determine an image type.

Differential Revision: https://phabricator.services.mozilla.com/D106568
2021-03-10 18:27:28 +00:00
Brindusan Cristian 8b3662d9a0 Backed out changeset b0b87c410435 (bug 1692029) for bustages in RenderTextureHostSWGL.cpp. CLOSED TREE 2021-03-10 20:17:17 +02:00
Brad Werth 66fe26d397 Bug 1692029 Part 1: Make TextureHost report a native texture policy. r=lsalzman
Whether or not we use a native texture or something else is affected by our
backend and the size of the texture. This patch adds a new function to
centralize that logic in TextureHost, and applies it in callsites that were
checking the backend to determine an image type.

Differential Revision: https://phabricator.services.mozilla.com/D106568
2021-03-10 16:52:32 +00:00
sotaro 5ac25e6b72 Bug 1686800 - Call mCompositor->EndFrame() only when StartCompositing() is called r=lsalzman
This is a short term fix.

Differential Revision: https://phabricator.services.mozilla.com/D107779
2021-03-10 06:51:35 +00:00
sotaro fd5cd0584c Bug 1697335 - Fallback from WebRender (Software D3D11) to WebRender (Software) when ID3D11Texture2D allocation of tile fails r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D107766
2021-03-10 05:22:45 +00:00
Alexandru Michis 95e560b7a1 Backed out changeset be5184939453 (bug 1692029) for causing bustages in RenderTextureHostSWGL.cpp
CLOSED TREE
2021-03-10 07:24:05 +02:00
Brad Werth 9650554c2e Bug 1692029 Part 1: Make TextureHost report a native texture policy. r=lsalzman
Whether or not we use a native texture or something else is affected by our
backend and the size of the texture. This patch adds a new function to
centralize that logic in TextureHost, and applies it in callsites that were
checking the backend to determine an image type.

Differential Revision: https://phabricator.services.mozilla.com/D106568
2021-03-10 00:46:32 +00:00
Andrew Osmond efc50aee90 Bug 1697306 - Clamp frame buffer bounds to current widget size when locking draw target. r=lsalzman
Sometimes we end up racing on the widget size, and it can shrink between
BeginFrame and StartCompositing. We calculated our dirty region based on
the previous widget size, so we need to clamp the bounds here to ensure
we remain within the buffer.

Differential Revision: https://phabricator.services.mozilla.com/D107726
2021-03-10 00:21:17 +00:00
Andrew Osmond 4156f6297c Bug 1696025 - Avoid allocating a draw target when not presenting frames. r=lsalzman
Internally WebRender may try to redraw a frame to update its picture
cache textures, but the frame will not be presented. This patch prevents
us from allocating a draw target in that case, avoiding an assert when
said draw target is freed without releasing our buffer lock (done when
we present.)

Differential Revision: https://phabricator.services.mozilla.com/D107722
2021-03-09 23:46:54 +00:00
Narcis Beleuzu 198358fc15 Backed out changeset a4f4f640eaa7 (bug 1696845) for bustages on pangofc-fontmap.h 2021-03-10 04:49:51 +02:00
Jan Alexander Steffens (heftig) 1261a74d17 Bug 1696845 - Use dlsym for gdk_*_display_get_type. r=stransky
Using `dlsym` for `gdk_wayland_display_get_type` is a cleaner solution
to bug 1696319, allowing running with a GTK that lacks the Wayland
backend.

Also adds a symmetric implementation for `gdk_x11_display_get_type`,
which should help running without X11.

Differential Revision: https://phabricator.services.mozilla.com/D107406
2021-03-09 22:55:47 +00:00
sotaro e6275d7e5d Bug 1697155 - Add AllowSoftwareWebRenderOGL() to CompositorOptions to allow Software WebRender with CompositorOGL on a per widget basis r=aosmond
This is preparation of bug 1697096.

Differential Revision: https://phabricator.services.mozilla.com/D107638
2021-03-09 22:24:15 +00:00
sotaro cf790dde83 Bug 1696325 - Handle StagingTexture allocation failure in RenderCompositorD3D11SWGL r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D107176
2021-03-08 23:41:58 +00:00
sotaro 66df971f6f Bug 1696105 - Remove aBridge argument from RenderThread::HandleDeviceReset() r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D107033
2021-03-03 10:29:40 +00:00
Jamie Nicol 3e85fea00a Bug 1694707 - Select correct scroll root within fixed position items with dynamic toolbar. r=gw
Currently when selecting the scroll root for picture caching, if a
non-Zoom transform is encountered we give up and select the root
spatial node. This is because the transform may be non-axis aligned.

When the Fenix dynamic toolbar is enabled, fixed position items must
create a spatial node with an animated transform, so that they can be
positioned asynchronously by APZ when the toolbar moves.

The combination of these two things means for that scroll frames
within fixed position items we always select the root spatial node,
meaning that the entire contents invalidates continuously while
scrolling.

To fix this, add a flag to the Transform ReferenceFrameKind which
marks the transform as always being a 2D scale or translation. When
selecting the scroll root, we can continue searching through such
reference frames, as we already do for Zoom frames. Set this flag true
for references frames created due to the dynamic toolbar.
Additionally, assert that the transform is indeed a 2d scale or
translation after it is resolved.

The condition of the transform being only a 2d scale and translation
is shared with ReferenceFrameKind::Zoom, so that has been removed and
its uses updated to use this new flag instead. An additional
should_snap flag has also been added, so that we continue to snap zoom
transforms, and additionally snap the dynamic-toolbar related
transforms too.

Lastly, this adds some unit tests for find_scroll_root.

Differential Revision: https://phabricator.services.mozilla.com/D106809
2021-03-02 21:53:41 +00:00
Sylvestre Ledru dd5945e932 Bug 1617369 - Reformat recent rust changes with rustfmt r=emilio
Updated with rustfmt 1.4.18-stable (8157a3f 2020-07-15)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D106921
2021-03-02 15:35:36 +00:00
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