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

1645 Коммитов

Автор SHA1 Сообщение Дата
Glenn Watson 64e35e6e1a Bug 1771561 - Fix incorrectly invalidating tiles with zero-sized backdrop filters r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147710
2022-05-31 22:55:32 +00:00
Glenn Watson fffb5f1ec1 Bug 1771556 - Handle backdrop capture failing clip check when sub-graph is visible r=gfx-reviewers,lsalzman
This can happen when there is a long nested chain of backdrop-filters
and float inaccuracies cause the final capture primitive to be culled.

Differential Revision: https://phabricator.services.mozilla.com/D147704
2022-05-31 22:55:32 +00:00
Butkovits Atila cf50f092e7 Backed out changeset 6b14bf7e1883 (bug 1771349) for causing crashtest failures. CLOSED TREE 2022-05-27 23:44:36 +03:00
Lee Salzman a7712554f4 Bug 1771349 - Add some null checks to DrawTargetRecording. r=aosmond,gfx-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D147520
2022-05-27 16:34:27 +00:00
Glenn Watson af07735825 Bug 1771293 - Handle backdrop-filter chains that are culled due to being invisible r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147460
2022-05-26 23:43:27 +00:00
Glenn Watson 7989c0df4a Bug 1771294 - Skip drawing backdrop-filters with broken transforms r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D147454
2022-05-26 23:43:26 +00:00
Marian-Vasile Laza 90c03c4ae7 Backed out changeset e216b94199d5 (bug 1770045) relies on the fix in the backed out patch - Bug 1769963. CLOSED TREE a=backout 2022-05-25 05:48:08 +03:00
Glenn Watson 938e197b02 Bug 1770045 - Fix panic in render task graph with nested backdrop-filters r=gfx-reviewers,bradwerth
This was fixed by the patch in 1769963, so this patch just adds a
crash test to ensure we don't regress in future.

Differential Revision: https://phabricator.services.mozilla.com/D147223
2022-05-24 23:08:57 +00:00
Joel Maher 4645118c87 Bug 1392106 - remove obsolete reftest win7 conditions. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D146633
2022-05-19 12:27:29 +00:00
Jonathan Kew 4b0c616f3e Bug 1768096 - Add testcase from report as a crashtest. r=lsalzman
Depends on D145902

Differential Revision: https://phabricator.services.mozilla.com/D145903
2022-05-16 18:03:27 +00:00
Emilio Cobos Álvarez 31d3fcdb9b Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-06 23:37:25 +00:00
Cosmin Sabou 4ddcb34203 Backed out changeset b2bea8e0b400 (bug 1767172) for causing startup crashes (Bug 1768260). a=backout 2022-05-07 01:28:53 +03:00
Glenn Watson 4626506ead Bug 1765862 - Skip backdrop-filter if `nsIFrame` reports not visible for painting r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D145526
2022-05-06 01:12:05 +00:00
Emilio Cobos Álvarez 9d430bf4ed Bug 1767172 - Remove custom screen info handling from GfxInfo, use ScreenManager for that. r=jrmuizel,handyman,stransky
This removes a bunch of custom code from GfxInfo to obtain screen
information, and instead collects that screen information in
ScreenManager.

This, apart of removing duplicated code, has the extra benefit of
reporting multi-monitor information on GTK (and potentially in the
future reporting scale and refresh rate properly as well, I've kept the
telemetry as it was on that regard).

Differential Revision: https://phabricator.services.mozilla.com/D145178
2022-05-05 15:07:03 +00:00
Markus Stange 2d423f22c5 Bug 1765399 - Invert the relationship between VsyncSource and VsyncDispatcher: The VsyncDispatcher now owns the source. r=smaug
This makes vsync source swapping much more natural.

The VsyncSource now only has a reference to the VsyncDispatcher for the duration
during which the dispatcher is listening to vsync. Whenever the dispatcher is
not listening to vsync, the source has no reference to the dispatcher and there
is no cycle.

This patch also adds the ability to register multiple dispatchers with the same
source. This ability is not used yet; a vsync source always has zero or one
dispatchers at the moment. It is in preparation for a future patch where there
will be one dispatcher per widget.

Furthermore, nothing uses gfxPlatform::GetGlobalVsync anymore, so it is removed.

Differential Revision: https://phabricator.services.mozilla.com/D144375
2022-05-05 02:15:18 +00:00
Markus Stange 06766c211b Bug 1765399 - Rename Get/CreateHardwareVsync to GetGlobalVsync, CreateGlobalHardwareVsync and CreateSoftwareVsync. r=smaug
This draws a clearer line between hardware vsync and software vsync.

Differential Revision: https://phabricator.services.mozilla.com/D144373
2022-05-05 02:15:17 +00:00
Markus Stange 107d6dbd85 Bug 1765399 - Register CompositorVsyncDispatcher with VsyncDispatcher instead of directly with the VsyncSource. r=smaug
This makes it so that the VsyncSource doesn't need to keep track of the compositor vsync dispatchers.
And the moving-between-sources logic needs to be handled only for the VsyncDispatcher.

Once we have one VsyncDispatcher per window, we can probably eliminate CompositorVsyncDispatcher.

Differential Revision: https://phabricator.services.mozilla.com/D144366
2022-05-05 02:15:14 +00:00
Markus Stange 5ef3c929f4 Bug 1765399 - Rename RefreshTimerVsyncDispatcher to VsyncDispatcher. r=smaug
RefreshTimerVsyncDispatcher manages a lot more than just the
RefreshDriverVsyncTimer these days.

Differential Revision: https://phabricator.services.mozilla.com/D144363
2022-05-05 02:15:13 +00:00
Marian-Vasile Laza 1cd0ac703f Backed out 16 changesets (bug 1765399) for causing build bustages on RefPtr.h.
Backed out changeset 8ff5e213e351 (bug 1765399)
Backed out changeset bd164f5cc8b3 (bug 1765399)
Backed out changeset 939b577eee05 (bug 1765399)
Backed out changeset ee00e3583f42 (bug 1765399)
Backed out changeset e5001537e536 (bug 1765399)
Backed out changeset d5a4004a2955 (bug 1765399)
Backed out changeset d3c1f6c420e3 (bug 1765399)
Backed out changeset d21fca656853 (bug 1765399)
Backed out changeset 5e5a29a99c9e (bug 1765399)
Backed out changeset ce326de1e107 (bug 1765399)
Backed out changeset 3890e83660b0 (bug 1765399)
Backed out changeset 2f3ceca7aefe (bug 1765399)
Backed out changeset 40c47c498858 (bug 1765399)
Backed out changeset 3a3a2aa6de9b (bug 1765399)
Backed out changeset 4a30a4b3d30d (bug 1765399)
Backed out changeset a9115d9d648e (bug 1765399)
2022-05-05 00:30:06 +03:00
Markus Stange 43cb4a509e Bug 1765399 - Invert the relationship between VsyncSource and VsyncDispatcher: The VsyncDispatcher now owns the source. r=smaug
This makes vsync source swapping much more natural.

The VsyncSource now only has a reference to the VsyncDispatcher for the duration
during which the dispatcher is listening to vsync. Whenever the dispatcher is
not listening to vsync, the source has no reference to the dispatcher and there
is no cycle.

This patch also adds the ability to register multiple dispatchers with the same
source. This ability is not used yet; a vsync source always has zero or one
dispatchers at the moment. It is in preparation for a future patch where there
will be one dispatcher per widget.

Furthermore, nothing uses gfxPlatform::GetGlobalVsync anymore, so it is removed.

Differential Revision: https://phabricator.services.mozilla.com/D144375
2022-05-04 16:13:39 +00:00
Markus Stange abdaca76a5 Bug 1765399 - Rename Get/CreateHardwareVsync to GetGlobalVsync, CreateGlobalHardwareVsync and CreateSoftwareVsync. r=smaug
This draws a clearer line between hardware vsync and software vsync.

Differential Revision: https://phabricator.services.mozilla.com/D144373
2022-05-04 16:13:38 +00:00
Markus Stange 77efabb139 Bug 1765399 - Register CompositorVsyncDispatcher with VsyncDispatcher instead of directly with the VsyncSource. r=smaug
This makes it so that the VsyncSource doesn't need to keep track of the compositor vsync dispatchers.
And the moving-between-sources logic needs to be handled only for the VsyncDispatcher.

Once we have one VsyncDispatcher per window, we can probably eliminate CompositorVsyncDispatcher.

Differential Revision: https://phabricator.services.mozilla.com/D144366
2022-05-04 16:13:35 +00:00
Markus Stange 070677f86a Bug 1765399 - Rename RefreshTimerVsyncDispatcher to VsyncDispatcher. r=smaug
RefreshTimerVsyncDispatcher manages a lot more than just the
RefreshDriverVsyncTimer these days.

Differential Revision: https://phabricator.services.mozilla.com/D144363
2022-05-04 16:13:34 +00:00
Markus Stange e08560bb25 Bug 1765400 - Make NotifyVsync return void. r=smaug
Nobody was checking the return value anywhere.

Differential Revision: https://phabricator.services.mozilla.com/D144360
2022-05-04 01:01:04 +00:00
Glenn Watson e28ba34c5b Bug 1765667 - Clamp surface size of content tiles for backdrop-filter r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D145047
2022-05-03 01:56:24 +00:00
Chris Martin 80881746de Bug 1763023 - Push nsBaseWidget::mSizeMode into child classes r=handyman
This member is no longer used on Windows, and having it in the
base class doesn't provide a real abstraction anyway since
the child classes will break if anything about it is changed.

Differential Revision: https://phabricator.services.mozilla.com/D145132
2022-05-02 14:06:17 +00:00
Florian Quèze 8d4d045ae9 Bug 1764812 - Add a test ensuring vsync is disabled after tearing off a tab that has compositor animations, r=hiro.
Differential Revision: https://phabricator.services.mozilla.com/D143748
2022-04-14 22:06:32 +00:00
Lee Salzman 82ae2ce04b Bug 1762973 - Skip empty composite requests. r=gfx-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D143067
2022-04-06 16:08:46 +00:00
Glenn Watson 3ee9f1d69a Bug 1761460 - Fix local space clip rects on snapped surfaces with reflections r=gfx-reviewers,nical
In these cases the combined local clip rect may be in reflected
local space. Map them to true raster space and then unmap them
back to the new local space to correct this.

Differential Revision: https://phabricator.services.mozilla.com/D142430
2022-03-30 08:42:56 +00:00
Lee Salzman d9a80ab175 Bug 1761685 - Check for negative step in blendTextureNearestRepeat. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D142175
2022-03-28 01:47:58 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
sotaro 024c07a719 Bug 1758607 - Adds more latency for waiting device reset handling completed r=gfx-reviewers,jrmuizel
test_device_reset.html checks if canvas works after device reset. Since Bug 1757879 fix, windowutils.triggerDeviceReset() does the device reset handling asynchronously in gecko. And the device reset happened during testing canvas since 1757879 fix. The canvas testing needs to happen after the gecko's device reset handling.

The change adds more latency for waiting device reset completed in gecko.

Differential Revision: https://phabricator.services.mozilla.com/D141178
2022-03-16 14:03:42 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Markus Stange 47c6beb1ee Bug 1759234 - Merge VsyncSource::Display into VsyncSource. r=smaug
Every `VsyncSource` currently only has a single `Display` associated with it.
This means that we're not making use of the `Display` abstraction at all.
This patch gets rid of `Display` by merging it into `VsyncSource`.

Originally, the intention of the `Display` abstraction was to use it for
per-monitor vsync. There would be one software `VsyncSource` and one hardware
`VsyncSource`, and the hardware `VsyncSource` would have one `Display` per
screen. But in reality, things have played out differently: The only platform
with per-monitor vsync is currently Linux Wayland, which has per-**widget**
vsync. And it has chosen to have one `VsyncSource` per widget, with a single
`Display` each.

For the macOS implementation of per-monitor vsync, I think it also makes
sense to have one `VsyncSource` per screen.

We already need to handle switching between VsyncSources, for switching
between software and hardware vsync, if the pref `layout.frame_rate` is
changed. So we might as well reuse that same switching capability for
switching between screens, when a window moves between screens or when a
tab moves between windows on different screens.

Differential Revision: https://phabricator.services.mozilla.com/D140891
2022-03-15 18:13:56 +00:00
Mark Banner 8bb4667fae Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-11 16:41:29 +00:00
Lee Salzman eb9953e3f6 Bug 1758127 - Don't use tight bounding rect if glyph transform fails. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D140746
2022-03-11 08:06:39 +00:00
smolnar e89faa903f Backed out changeset 5018856d8fee (bug 1758474) for causing node eslint failure. CLOSED TREE 2022-03-10 11:58:45 +02:00
Mark Banner fe937b78bd Bug 1758474 - Implement an ESLint rule to disallow passing {} as the target parameter for ChromeUtils.import. r=Gijs,mossop,perftest-reviewers,preferences-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D140517
2022-03-10 09:25:28 +00:00
Lee Salzman 6f0be8c19f Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 09:24:15 +00:00
smolnar 97f77f8381 Backed out changeset 36c6350bc7d1 (bug 1757067) for causing build bustages in gfx/gl/GLBlitHelperD3D.cpp CLOSED TREE 2022-03-10 10:10:10 +02:00
Lee Salzman a664a6d305 Bug 1757067 - Explicitly specify chroma subsampling scheme for YCbCr data. r=jgilbert,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D139656
2022-03-10 07:48:53 +00:00
Markus Stange 3ce08a4e07 Bug 1676760 - Rename Add/RemoveChildRefreshTimer. r=smaug
It is used by far more than just content process refresh driver timers.

Differential Revision: https://phabricator.services.mozilla.com/D139769
2022-03-01 22:48:19 +00:00
Markus Stange d85ed119fd Bug 1676760 - Remove unused RefreshTimerVsyncDispatcher::SetParentRefreshTimer. r=smaug
Even in the parent process, VsyncRefreshDriverTimer uses AddChildRefreshTimer.

Differential Revision: https://phabricator.services.mozilla.com/D139768
2022-03-01 22:48:19 +00:00
Glenn Watson 4144c8d651 Bug 1757002 - Fix incorrect scaling of large surfaces r=gfx-reviewers,aosmond
Fixes a typo introduced when rebasing the original patch

Differential Revision: https://phabricator.services.mozilla.com/D139883
2022-02-28 23:22:11 +00:00
Glenn Watson 6e579c034e Bug 1749380 - Part 2 - Performance and quality fixes for part 1. r=gfx-reviewers,nical
* Add support for local scale factors to a surface, allowing it to
  be rasterized in root coordinate space. This allows snapping to
  work across surfaces where the surface transform is a fractional
  offset.

* Calculate scaling factors per rasterized surface and propagate
  them. Ensures correct scale factor calculations when dealing with
  nested preserve-3d contexts with 90-degree axis rotations.

* Support determining exact surface device rect for 2d surfaces
  with fractional surface transforms.

* Fix line decoration cache key size calculations based on world
  scaling factor.

* Remove `get_clipped_device_rect` usage for calculating clip-mask
  surface allocations, use `surface.get_surface_rect` instead. The
  prior method doesn't correctly account for expanded local regions
  from the current dirty rect, resulting in invalidation issues in
  some animated edge cases. Also unifies the way clip-mask surface
  allocations work with the way general render target surface
  allocations work.

Differential Revision: https://phabricator.services.mozilla.com/D138982
2022-02-23 20:49:27 +00:00
Glenn Watson 9a83835d67 Bug 1749380 - Part 1 - Improve how WR handles bounding rects for off-screen surfaces r=gfx-reviewers
This patch introduces a number of subtle but important changes
to how we deal with off-screen surfaces. The overall goals are:

 - Improve rendering correctness in a number of edge cases.
 - Begin reducing complexity related to surfaces, scaling
   factors, surface size adjustments and clipping.
 - Improve CPU performance by removing some per-primitive work.
 - Simplify implementation of future SVG and CSS filters by
   having explicit support for picture rects + inflation regions.
 - Lay the groundwork for caching child picture surfaces,
   reduction of per-primitive work during visibility pass,
   simplifying picture code.

Unfortunately, the nature of the changes make it impossible to
split up in to small isolated patches. Details below:

* Introduce `LocalRectKind` concept. This allows us to separate
  out the bounding rect of the surface (a group of primitives
  backed by a texture) from the bounding rect of the picture
  compositing that surface (e.g. a drop-shadow which draws the
  surface once at the local origin and once at a specific offset
  + blur-radius). This fixes a number of correctness bugs we have
  related to culling, clipping, invalidation regions of complex
  primitives such as drop-shadows and blur filters. Importantly,
  it makes it simpler to implement (or fix) SVG filter chains,
  backdrop-filter implementations.

* Establish raster roots for all off-screen surfaces. Every off-screen
  surface uses the spatial node of the enclosing stacking context as
  a coordinate system root, ensuring that each off-screen surface is
  drawn in a 2D coordinate system, with appropriate scaling factors
  applied to ensure high quality rendering. The primary goal is to make
  it possible to correctly inflate and clip off-screen surfaces, removing
  some correctness issues we currently have with complex filters interacting
  with transforms. The initial work here doesn't reduce complexity a huge
  amount, but will allow us to simplify large parts of the picture/surface
  handling code in future, as well as simplify a number of shaders that
  currently must handle arbitrarily complex transform matrices. This will
  also allow us to simplify the implementation of features such as
  mix-blend-mode and backdrop-filter, which rely on readback and UV mapping
  from the parent surface.

* Remove concepts of `estimated` and `precise` local rects for pictures. This
  is both a performance optimization and a code simplification. Instead, we
  only determine the estimated local rect during bounding rect propagation,
  and rely on the clipping regions from the tile dirty regions to reduce which
  parts of the picture we allocate if drawing to an off-screen surface. This
  removes some per-primitive work during the visibility pass, and also means
  we can rely on the final picture bounding rect from the start of the visibility
  pass. This also removes much of the complexity in `take_context` where we
  previously determined surface scale factors and device pixel ratio - instead
  these can be determined earlier during `propagate_bounding_rects`.

* Remove some complexity in `update_prim_visibility`. This is still recursive,
  but follow up patches will aim to remove this recursion and integrate this
  pass with the picture graph (similar to how `propagate_bounding_rects` works).

* Remove `PictureOptions` struct. Instead, store `inflate_if_required` with
  the Blur filter enum, which is the only place that uses it.

* Remove `root_scaling_factor` from text runs - this is handled implicitly
  by the surface device-pixel scale.

* Skip calling `update_clip_task` for pass-through pictures (since they have
  no defined local rect).

* Improve scaling factors used for determining the render task cache size for
  complex line decorations.

Differential Revision: https://phabricator.services.mozilla.com/D137569
2022-02-23 20:49:26 +00:00
Norisz Fay 44a6c895e2 Backed out 3 changesets (bug 1749380) for causing webrender crashes a=backout DONTBUILD
Backed out changeset 1762adb371d4 (bug 1749380)
Backed out changeset 2b42abbdb0df (bug 1749380)
Backed out changeset 9fa6f71111d0 (bug 1749380)
2022-02-21 11:35:49 +02:00