Commit Graph

39601 Commits

Author SHA1 Message Date
Bogdan Tara
db7b3151ca Backed out changeset 43ea8faea099 (bug 1690857) for causing bug 1691025 a=backout 2021-02-05 15:29:17 +02:00
Csoregi Natalia
e852f95875 Bug 1690349 - Try fixing black lint. r=lint-fix CLOSED TREE 2021-02-05 05:23:41 +02:00
Jeff Gilbert
71ac4cf019 Bug 1690349 - Vendor mozilla/angle/firefox-87 based on chromium/4324. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D103956
2021-02-05 02:14:07 +00:00
Jeff Gilbert
492754c3bd Bug 1690349 - Prepare for angle update for ff87. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D103955
2021-02-05 02:14:04 +00:00
sotaro
ee841fc548 Bug 1689945 - Update display info when WM_DISPLAYCHANGE happens r=jrmuizel
GfxInfo::RefreshMonitors() could not be called in ScreenHelperWin::RefreshScreens(), since the RefreshScreens() is called within nsAppShell::Init(). Then GfxInfo::RefreshMonitors() is called during WM_DISPLAYCHANGE event handling.

Differential Revision: https://phabricator.services.mozilla.com/D103661
2021-02-04 23:25:35 +00:00
Noemi Erli
1ea87269a8 Backed out 4 changesets (bug 1534549) for causing mochitest failures in test_group_wheelevents.html CLOSED TREE
Backed out changeset a03c745620d6 (bug 1534549)
Backed out changeset 2ac9c5dbe9f5 (bug 1534549)
Backed out changeset dabd0c5d21cf (bug 1534549)
Backed out changeset f1b390459263 (bug 1534549)
2021-02-05 02:41:19 +02:00
Csoregi Natalia
4d73b71b8e Merge mozilla-central to autoland. a=merge CLOSED TREE 2021-02-05 00:39:44 +02:00
Miko Mynttinen
83f9800345 Bug 1534549 - Part 4: Shrink nsDisplayCompositorHitTestInfo r=mstange
These changes make nsDisplayCompositorHitTestInfo inherit directly from nsDisplayItem, which should shrink it slightly. This also simplifies the logic: hit testing information is now available at nsDisplayItem level as opposed to nsPaintedDisplayItem.

Differential Revision: https://phabricator.services.mozilla.com/D103773
2021-02-04 22:20:13 +00:00
Miko Mynttinen
4d5492f17c Bug 1534549 - Part 3: Add tests r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D103045
2021-02-04 22:20:05 +00:00
Miko Mynttinen
63a9dd596a Bug 1534549 - Part 2: Allow all display items to carry hit testing information r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D102515
2021-02-04 22:19:56 +00:00
Csoregi Natalia
40205f1b55 Backed out changeset 0788e77d2d62 (bug 1690396) for causing crashes in Bug 1690846. a=backout 2021-02-04 21:21:32 +02:00
Andreea Pavel
60eb157735 Merge autoland to mozilla-central a=merge 2021-02-04 18:07:06 +02:00
Andreea Pavel
1715f26b05 Backed out changeset 18835f3f3936 (bug 1690319) for causing 1690689 a=backout 2021-02-04 18:05:14 +02:00
Timothy Nikkel
39d4570796 Bug 1690433. If in PrepareForSetTargetAPZCNotification we go from a minimal display port to a regular display port return the painted status of the existing (minimal) display port instead of always telling the caller to wait for a refresh. r=botond
In the case that we have a painted minimal display port apzc knows about the scroll frame already, it just has the minimal amount of painted content. So we can tell apz right away. Note that the async transform for minimal dp's are still the identity so we'll still jank minimap dp's before the painted regular dp reaches the apzc.

Differential Revision: https://phabricator.services.mozilla.com/D103858
2021-02-04 11:17:09 +00:00
Timothy Nikkel
d2930b87f0 Bug 1690433. Prefer to jank minimal display ports until we can set a proper display port over checkerboarding them. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103857
2021-02-04 11:17:06 +00:00
Timothy Nikkel
1be3156679 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
This patch is the result of auditing all places that look at the presence or absence of a display port to handle minimal display ports (HasDisplayPort, GetDisplayPort, etc).

Broadly speaking the places were in two categories:
1) things related to painting, that want to consider minimal display ports as display ports for purposes of things like sending over metadata and separating out layers.
2) things that care about async scrolling, and so actually want to have a properly sized display port.

Type 1) were not changed by this patch. Type 2) were changed to consider minimal display ports as not display ports.

Again, we are aiming to leave behaviour unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D103856
2021-02-04 11:16:59 +00:00
Timothy Nikkel
e2f27ec58a Bug 1690433. Create a minimal display port type. r=botond
We introduce a new type of display port, a minimal display port. It is controlled via a property on the content element. When the property is present any other display port specified on the element is ignored and instead the display port rect is computed by assuming 0 display port margins and no alignment (this reuses the existing code for display port suppression).

We then add code to set a minimal display port on every scroll frame that is painted that has WantAsyncScroll() when certain prefs are set (the prefs are disabled as of this patch though).

We then need to manage removing the minimal display port property when, before this patch, we would have created a regular display port. As well we need to add the minimal display port property when, before this patch, we would have removed a regular display port.

In order to do this I audited all sites where we set the display port rect and display port margins property. The changes to the code for handling the removal display ports happens in a later patch.

My audit found that all of the places we set a display port want to clear the minimal display port property except:
-UpdateSub/RootFrame in APZCCallbackHelper
-UpdateDisplayPortMarginsForPendingMetrics in DisplayPortUtils

UpdateDisplayPortMarginsForPendingMetrics is basically a fast path of the UpdateSub/RootFrame code. These are the places where we handle calls to RequestContentRepaint from apz. By adding an assert and running it through try server I found that UpdateSub/RootFrame can create a display port in the following cases:
-a scroll info layer
-a scroll frame with !WantAsyncScroll() (the main thread never creates a display port for a scroll frame with !WantAsyncScroll()) (for example if the main thread creates a scroll id and sends over metadata via nsLayoutUtils::GetRootMetaData, and then the scroll rect changes, that will cause a RequestContentRepaint call)
-a few instances that don't fall into the above that happened on try server but didn't reproduce for me locally, so I don't know more about them.
It's not very important whether we clear the minimal display port property for these cases or not (the first two cases we don't async scroll the scroll frame at all, the last case seems quite rare).

Note that we intentionally do not change the existing behaviour of zero margin display ports set via SetZeroMarginDisplayPortOnAsyncScrollableAncestors as we are aiming for no behaviour changes with this patch (until we flip the pref). A later patch in a different bug handles changing these display ports over to minimal display ports.

Differential Revision: https://phabricator.services.mozilla.com/D103855
2021-02-04 11:16:44 +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
Glenn Watson
cb776f3c4c Bug 1690396 - Refactor mix-blend-mode impl to work correctly with raster roots. r=nical
This fixes incorrect rendering when either the source or backdrop
tasks establish a raster root.

By design, it also changes mix-blend backdrop readbacks to work in
a way that can handle readbacks from picture cache tiles, which is
a follow up optimization being worked on.

Differential Revision: https://phabricator.services.mozilla.com/D103853
2021-02-04 02:43:18 +00:00
Dorel Luca
d2b9c19b64 Backed out changeset ddd89e758a23 (bug 1690396) for Wrench failures. CLOSED TREE 2021-02-04 04:30:53 +02:00
Glenn Watson
5a2bff1c55 Bug 1690396 - Refactor mix-blend-mode impl to work correctly with raster roots. r=nical
This fixes incorrect rendering when either the source or backdrop
tasks establish a raster root.

By design, it also changes mix-blend backdrop readbacks to work in
a way that can handle readbacks from picture cache tiles, which is
a follow up optimization being worked on.

Differential Revision: https://phabricator.services.mozilla.com/D103853
2021-02-04 01:16:41 +00:00
Jeff Gilbert
d904bd0e21 Bug 1676636 - [angle] Cherry-pick compressed tex depth stride fix. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D102523
2021-02-03 00:35:50 +00:00
Jonathan Kew
248af00296 Bug 1690235 - Don't use a font descriptor for variation fonts on systems before macOS 10.15. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D103916
2021-02-03 17:25:19 +00:00
Lee Salzman
900774169e Bug 1690886 - Support 4-component swizzles in SWGL. r=jnicol
Differential Revision: https://phabricator.services.mozilla.com/D104098
2021-02-04 21:50:36 +00:00
Csoregi Natalia
61d74bc90a Backed out 2 changesets (bug 1689998) for linting failure. CLOSED TREE
Backed out changeset 33d60a46b7d0 (bug 1689998)
Backed out changeset 214ffc1253ef (bug 1689998)
2021-02-04 23:34:15 +02:00
Jamie Nicol
f21eb2a491 Bug 1685563 - Re-enable using R8 texture format for alpha glyphs. r=lsalzman
This change had previously been backed out due to causing rendering
issues on HTC 10 Android, and some Linux Radeon cards (bug 1687554).

On the HTC 10, the issue was that the extra case statement added to
the text run shader caused the glslopt optimized shader to become too
complex for the device, resulting in rendering issues. Since bug
1689316 has landed, the optimized shader output is simpler and this
issue is avoided.

On radeon, we have established that the problem is due to the format
of the texture and that the shader is fine. Furthermore, the shader
works correctly with either R8 or RGBA8 texture data, as all of the
channels contain the alpha value in the RGBA8 textures. Therefore we
continue to use RGBA8 textures for alpha glyphs on Linux Radeon, but
switch to R8 on other platforms.

Differential Revision: https://phabricator.services.mozilla.com/D104082
2021-02-04 20:53:31 +00:00
Jonathan Kew
8b9386d184 Bug 1689998 - Mozilla-specific build fixups for pixman 0.40.0. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D103685
2021-02-04 20:06:07 +00:00
Jonathan Kew
837c97f4a4 Bug 1689998 - Update pixman sources to release 0.40.0. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D103684
2021-02-02 16:14:40 +00:00
Andrew Osmond
b4617507c5 Bug 1690857 - Add diagnostic assert to ensure we aren't using stale blob keys in the compositor process. r=jrmuizel
Similar to bug 1690821 in the content process, this adds an assert in
the other side in case of a race condition.

Differential Revision: https://phabricator.services.mozilla.com/D104086
2021-02-04 19:05:50 +00:00
Csoregi Natalia
4e864d755a Backed out 2 changesets (bug 1650183) for causing iframe displayport failures. CLOSED TREE
Backed out changeset 1955e50f311e (bug 1650183)
Backed out changeset 5982003ab9f2 (bug 1650183)
2021-02-04 21:10:58 +02:00
Botond Ballo
f9ff60143c Bug 1650183 - Add a test to check that an OOP iframe with a large viewport does not have too large of a displayport. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D103538
2021-02-04 18:33:35 +00:00
Andrew Osmond
88ec5c2cd4 Bug 1690821 - Add diagnostic assert to ensure we aren't using stale blob keys. r=jrmuizel
This patch adds a diagnostic assert to check if the namespace of the
blob image key matches the current namespace of the process's
WebRenderBridgeChild. Other long lived users of image keys (i.e. shared
surfaces produced by imagelib) have to check to ensure their cached
image keys haven't gone out of scope due to a namespace update (e.g. tab
moved to a new window, GPU process crash). The caching for blob images
however is very different and should be cleared in these cases. This
assert will confirm this.

Differential Revision: https://phabricator.services.mozilla.com/D104066
2021-02-04 18:10:32 +00:00
Sebastian Hengst
425e4c083a Backed out changeset e2de18f2d894 (bug 1690821) for possibly causing reftest crashes in table-cell-breaking-1a.html. CLOSED TREE 2021-02-04 19:04:44 +01:00
Butkovits Atila
9de4a8383a Merge mozilla-central to autoland. CLOSED TREE 2021-02-04 19:32:15 +02:00
Andrew Osmond
82be662a0d Bug 1690821 - Add diagnostic assert to ensure we aren't using stale blob keys. r=jrmuizel
This patch adds a diagnostic assert to check if the namespace of the
blob image key matches the current namespace of the process's
WebRenderBridgeChild. Other long lived users of image keys (i.e. shared
surfaces produced by imagelib) have to check to ensure their cached
image keys haven't gone out of scope due to a namespace update (e.g. tab
moved to a new window, GPU process crash). The caching for blob images
however is very different and should be cleared in these cases. This
assert will confirm this.

Differential Revision: https://phabricator.services.mozilla.com/D104066
2021-02-04 16:05:47 +00:00
Butkovits Atila
ce8d6cba99 Backed out changeset 73210e7c7526 (bug 1689945) for causing failures on Hal.cpp. CLOSED TREE 2021-02-04 18:26:21 +02:00
sotaro
196f20caaa Bug 1689945 - Update display info when WM_DISPLAYCHANGE happens r=jrmuizel
GfxInfo::RefreshMonitors() could not be called in ScreenHelperWin::RefreshScreens(), since the RefreshScreens() is called within nsAppShell::Init(). Then GfxInfo::RefreshMonitors() is called during WM_DISPLAYCHANGE event handling.

Differential Revision: https://phabricator.services.mozilla.com/D103661
2021-02-04 13:53:03 +00:00
Nicolas Silva
4ddd3c50c9 Bug 1649386 - Add a bit of documentation to scene building. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D81663
2021-02-04 14:15:48 +00:00
Jonathan Kew
dbaf0d8121 Bug 1690771 - Use Skia backend rather than Cairo in RecvMakeSnapshot r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D104046
2021-02-04 13:50:15 +00:00
Nika Layzell
f07fc1f61f Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 17:00:04 +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
Bogdan Tara
369c9ff89b Backed out changeset cf95a79e64f6 (bug 1687391) for bustges complaining about ThreadSafeWeakPtr CLOSED TREE 2021-02-03 18:39:22 +02:00
Nika Layzell
33d14ac4a6 Bug 1687391 - Avoid using a spinlock in ThreadSafeWeakReference, r=glandium,mccr8,Gankra,sg
This new approach to weak references is roughly modeled after the approach used
by Rust's Arc<T>, and uses an atomic compare-and-swap loop to perform weak to
strong reference upgrades. This approach ends up moving the strong reference
count out of the tracked object and into the weak reference object, as the
strong reference count atomic needs to outlife the object itself.

Rust's Arc Weak::upgrade implementation:
d98d2f57d9/library/alloc/src/sync.rs (L1806-L1837)

Differential Revision: https://phabricator.services.mozilla.com/D102245
2021-02-03 16:16:44 +00:00
Timothy Nikkel
4d468e325c Bug 1689492. Test for bug 1687926, bug 1687927, bug 1687886. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103396
2021-02-03 10:41:18 +00:00
Markus Stange
df2a007c4c Bug 1689237 - Disable CALayer edge anti-aliasing. r=mattwoodrow
We currently don't ever set non-rectilinear transforms on our CALayers, so there
is no need for anti-aliasing. Explicitly disabling edge anti-aliasing means that
there are no seams between tiles when the window server draws our window with a
transform, such as during Mission Control.

Differential Revision: https://phabricator.services.mozilla.com/D103740
2021-02-03 05:26:32 +00:00
Jeff Muizelaar
678b2741b3 Bug 1690086 - Remove workaroud in brush_vs. r=mstange
This reverts the workaround added in https://github.com/servo/webrender/pull/3540
(bug 1525032)

The root cause of that has been identified as bug 1690027.

Differential Revision: https://phabricator.services.mozilla.com/D103795
2021-02-02 16:06:54 +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
Lee Salzman
7b87580cdf 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 21:43:12 +00:00
Jeff Muizelaar
293221bb1d Bug 1690319 - Remove integer comparison workaround in fetch_clip_area. r=mstange
This removes the workaround from https://github.com/servo/webrender/pull/2864

The root cause of that has been identified as bug 1690027.

Differential Revision: https://phabricator.services.mozilla.com/D103797
2021-02-02 17:17:50 +00:00