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

40693 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Silva ab62b81a1f Bug 1707930 - Account for reversed stops in the gradient cache key. r=gfx-reviewers,lsalzman
WebRender internally reverses gradient stops when they are ordered from right to left. This is done while building the GPU data and the gradient cache key stored the reversed stops without sepcifying if they were revered or originally in that order. This meant that if a page had two similar gradients with the only difference being that on was reversed but not the other, they could end up using the same cache key and one of the two would not be rendered properly.

This patch includes a boolean in the cache key to make sure reversed gradients don't accidentally use the same key as similar non-reversed gradients.

Differential Revision: https://phabricator.services.mozilla.com/D113975
2021-05-03 09:12:43 +00:00
Nicolas Silva 06ef812482 Bug 1707744 - Avoid far gradient endpoints causing large gradient segments. r=gfx-reviewers,lsalzman
Large segment bounds trip an assertion when casting coordinates to integers. Clipping early also reduces the amount of cached pixels.

Differential Revision: https://phabricator.services.mozilla.com/D113819
2021-05-03 09:12:42 +00:00
Nicolas Silva 720d336a44 Bug 1706678 - Fix cached gradient scaling. r=gfx-reviewers,lsalzman
Large gradients are cached scaled down and stretched back by the image brush. Because the scaling factor is non-uniform the shader has to take it into account. The previous implementation was incorrectly accounting for the scale.

Differential Revision: https://phabricator.services.mozilla.com/D113753
2021-05-03 09:12:42 +00:00
Emilio Cobos Álvarez e2df872ab8 Bug 1708285 - Pass default font settings from parent to child processes. r=jfkthame
Instead of relying on GTK to be initialized in the child process.

Differential Revision: https://phabricator.services.mozilla.com/D113784
2021-05-01 20:00:31 +00:00
Jeff Muizelaar 7c5d88731c Bug 1708805 - Reject output luts with channels != 3. r=aosmond
This problem was introduced by the CMYK support
patch not rejecting 4 channel LUTs at parse time.

The problem was caught by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33647

Differential Revision: https://phabricator.services.mozilla.com/D114014
2021-05-01 02:39:06 +00:00
Jed Davis 2f12c6ea18 Bug 1702394 - Work around small memory leaks in Mesa drivers. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D112194
2021-04-30 16:20:15 +00:00
Jonathan Kew e579136e87 Bug 1707655 - Move the activation of supplemental fonts on macOS to a separate thread and try to get it started earlier. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113552
2021-04-30 13:50:47 +00:00
Lee Salzman d85019f12d Bug 1704750 - Use simpler check for triangle winding. r=aosmond
The original triangle winding check was designed to be run inside the span
rasterizer every time the edges changed. However, at present, this only ever
gets used once at the very top of the triangle to determine winding and then
assumes winding is constant thereafter.

This updates the check to work on these assumptions to be simpler and less
fragile where numerical precision is concerned. If we can assume the candidate
edges both start on the same row, then the check boils down to seeing if they
share the same starting point and doing a cross-product.

Differential Revision: https://phabricator.services.mozilla.com/D113900
2021-04-30 13:11:37 +00:00
Lee Salzman 565bba41e8 Bug 1708590 - Don't call add_surface or start_compositing unless actually rendering. r=sotaro
Rather than have SwCompositor or the individual RenderCompositors track this, it seems easier
to just have WR itself avoid calling add_surface or start_compositing if we're inside an update.

Differential Revision: https://phabricator.services.mozilla.com/D113953
2021-04-30 12:26:53 +00:00
Timothy Nikkel b4bac4cfef Bug 1699147. Add test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D113743
2021-04-30 10:36:45 +00:00
Timothy Nikkel 76ac7d4080 Bug 1699147. Don't choose table cells smaller than 30% the viewport width as double tap zoom targets. r=emilio
We have to look at the element or its parent to fix the wikipedia case because there is a display block div inside the table cell.

Differential Revision: https://phabricator.services.mozilla.com/D113341
2021-04-30 10:36:45 +00:00
Hiroyuki Ikezoe 023bd8d65c Bug 1704065 - Stop consuming pan gesture events in SwipeTracker if the swiping direction is not allowed to navigate. r=spohl
This is what Safari does, i.e. once after a swipe gesture has started to a
direction where there is no navigation history, then even if the swipe gesture
switched to the opposite direction where navigation can happen, swipe navigation
will never happen. Chrome looks like they are trying to do swipe navigation in
such cases, but it looks like they sometimes fail it, the swipe navigation
indicator (an arrow image) doesn't show up sometime when the swipe navigation
goes to the opposite direction.

This change fixes stuck-in-overscroll situations where user swipes horizontally
to a direction where navigation is impossible during overscrolling, but doesn't
fix situations where navigation is possible but the user cancels the navigation.
To fix the later situations we need a different fix apart from this change.

The mochitest in this change doesn't test the stuck-in-overscroll situations at
all because we need to write a browser mochitest since swipe gesture is
implemented as a browser feature but unfortunately SpecialPowers.snapshotWindow
doesn't capture overscrolled gutter regions for some reasons, so instead the
test checks whether the swipe gesture module keeps capturing wheel events in the
situations where navigation is impossible.

Differential Revision: https://phabricator.services.mozilla.com/D113636
2021-04-30 09:08:08 +00:00
Butkovits Atila 0a13af930d Backed out 2 changesets (bug 1699147) for causing build bustages on DoubleTapToZoom.cpp. CLOSED TREE
Backed out changeset d608a5951497 (bug 1699147)
Backed out changeset 63d854871f8b (bug 1699147)
2021-04-30 10:57:54 +03:00
Timothy Nikkel 380e29a4fd Bug 1699147. Add test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D113743
2021-04-30 04:03:04 +00:00
Timothy Nikkel 4e99f0db4a Bug 1699147. Don't choose table cells smaller than 30% the viewport width as double tap zoom targets. r=emilio
We have to look at the element or its parent to fix the wikipedia case because there is a display block div inside the table cell.

Differential Revision: https://phabricator.services.mozilla.com/D113341
2021-04-30 04:03:04 +00:00
Timothy Nikkel 4fb57740cf Bug 1707802. Add test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D113642
2021-04-29 22:32:28 +00:00
Timothy Nikkel 85a513d218 Bug 1707802. Use GetFlattenedTreeParentElement in DoubleTapToZoom.cpp instead of GetParentElement. r=emilio
To deal with shadow dom correctly.

Differential Revision: https://phabricator.services.mozilla.com/D113463
2021-04-29 22:32:27 +00:00
Botond Ballo c12d4a7f28 Bug 1707217 - Clear pan gesture state when a pan gesture is interrupted by a preventDefault(). r=hiro
This matches our existing behaviour for touch gestures.

Differential Revision: https://phabricator.services.mozilla.com/D113748
2021-04-29 22:31:54 +00:00
Dorel Luca dbd079f286 Backed out changeset 8a51e4315c4f (bug 1706678) for Webrench failures. CLOSED TREE 2021-04-29 23:53:43 +03:00
Nicolas Silva 6f87c8e46e Bug 1706678 - Fix cached gradient scaling. r=gfx-reviewers,lsalzman
Large gradients are cached scaled down and stretched back by the image brush. Because the scaling factor is non-uniform the shader has to take it into account. The previous implementation was incorrectly accounting for the scale.

Differential Revision: https://phabricator.services.mozilla.com/D113753
2021-04-29 20:08:03 +00:00
Jonathan Kew 685b76ffbe Bug 739096 - Don't leave the shm field uninitialized in cairo_xlib_display. r=jrmuizel
This resulted in a valgrind failure on autoland.

Submitted upstream at https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/170.

Differential Revision: https://phabricator.services.mozilla.com/D113756
2021-04-29 14:33:37 +00:00
Jonathan Kew c55581cbc3 Bug 739096 - Merge some Mozilla extensions to cairo-quartz-surface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112591
2021-04-29 14:33:36 +00:00
Jonathan Kew 98cc55ba62 Bug 739096 - Merge some Mozilla additions for DirectWrite support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112590
2021-04-29 14:33:36 +00:00
Jonathan Kew 17ed1ad7f6 Bug 739096 - Look up new FreeType variation APIs at runtime, in case we were built against an older installed freetype. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112589
2021-04-29 14:33:35 +00:00
Jonathan Kew ed34353059 Bug 739096 - Hook up support for SharedFTFace in the cairo-ft-font code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112588
2021-04-29 14:33:35 +00:00
Jonathan Kew e6dc732de1 Bug 739096 - Add a synth_flags parameter to cairo_ft_font_face_create_for_ft_face. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112587
2021-04-29 14:33:34 +00:00
Jonathan Kew 6b09c4e6a2 Bug 739096 - Add cairo_surface_{get,set}_subpixel_antialiasing. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112586
2021-04-29 14:33:34 +00:00
Jonathan Kew 4325571887 Bug 739096 - Expose cairo_font_options_{get,set}_lcd_filter as public API. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112585
2021-04-29 14:33:34 +00:00
Jonathan Kew c8bac2befc Bug 739096 - Don't declare local var with 'register' in C++. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112584
2021-04-29 14:33:33 +00:00
Jonathan Kew 40835587ef Bug 739096 - Patch cairo-xlib-xrender-private.h to work around lack of full configure support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112583
2021-04-29 14:33:33 +00:00
Jonathan Kew ac16b1fc69 Bug 739096 - Remove obsolete CAIRO_VERSION_* macros. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112582
2021-04-29 14:33:32 +00:00
Jonathan Kew 22e02efb6c Bug 739096 - Update moz.build for new cairo sources. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112559
2021-04-29 14:33:32 +00:00
Jonathan Kew 7779d64c1b Bug 739096 - Update cairo to commit 277a1daec80cb6cf7bfb0e200cf78e7842cb2f82 (release 1.17.4 + post-release fixes on trunk) from https://gitlab.freedesktop.org/cairo/cairo/-/tree/master. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112558
2021-04-29 14:33:30 +00:00
Jonathan Kew 0b6a214452 Bug 739096 - Remove cairo_quartz_{get,finish}_cg_context_with_clip. r=jrmuizel
No longer needed in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D112557
2021-04-29 14:33:29 +00:00
Jonathan Kew 3f563bce7e Bug 739096 - Remove support for CGLayer-backed cairo quartz surface. r=jrmuizel
This was a performance optimization that we no longer care about.
Removing it will avoid the need to merge the additions into the new
cairo-quartz-surface code from upstream.

Differential Revision: https://phabricator.services.mozilla.com/D112556
2021-04-29 14:33:29 +00:00
Robert Mader 10d2da5900 Bug 1707943 - Fix warnings and apply suggestions form static analysis, r=stransky
Some more small cleanups to stop the review bot from complaining in
patches touching these files.

Differential Revision: https://phabricator.services.mozilla.com/D113721
2021-04-29 10:43:17 +00:00
Timothy Nikkel 4e45c6dd85 Bug 1707234. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113623
2021-04-29 08:17:35 +00:00
Timothy Nikkel 5da0017447 Bug 1707234. Don't try to zoom to a rect that is outside of the scrollable range. r=botond
In the testcase from the bug we have an overflow hidden document that is being scrolled by the pages javascript. In this case the scrollable rect (aka cssPageRect here) has its position as the scroll offset and the size is the composition size in css pixels. In this case we want to behave as if the scroll position is not movable (since it's not movable by the user), so we only want to be able to zoom to something that is in the visible rect. Staying inside the scrollable rect also makes sense, and we want to do it, for the non-overflow hidden case.

The current code assumes that the scrollable rect starts at 0.

Differential Revision: https://phabricator.services.mozilla.com/D113253
2021-04-29 08:17:34 +00:00
Timothy Nikkel b092458c70 Bug 1707417. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113735
2021-04-29 04:43:05 +00:00
Timothy Nikkel 21b227355e Bug 1707417. Look at the composition width _ignoring_ scrollbars when looking for resolution changes. r=botond
Because adding or removing a scrollbar can change without the resolution changing (in particular, when zooming in we can add scrollbars) and we don't want to detect that content has updated it's resolution and override our (apz) resolution in that case.

This happens when double tapping creates a scrollbar and the resulting repaint updates the apz resolution while the zoom animation is ongoing, messing it up for a frame.

Adding a field for frame metrics just for this is kind of gross, but it can go away when that todo is fixed in NotifyLayersUpdated.

Differential Revision: https://phabricator.services.mozilla.com/D113303
2021-04-29 04:43:05 +00:00
Timothy Nikkel 6750b8a5e1 Bug 1707389. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113650
2021-04-29 03:14:16 +00:00
Timothy Nikkel 1f42170286 Bug 1707389. If a page is horizontally scrollable make zooming out using double tap to zoom work. r=botond
The code in ZoomToRect that calculate the rect to zoom out to does not work if the page is horizontally scrollable, and our min zoom does not allow us to zoom out to fit the full page width.

For example, the targetZoom might get set to 0.1 and our min zoom is 1. The target zoom would get updated to 1, but the scroll offset of the rect wouldn't get adjusted for the new zoom.

So change how we calculate it by taking the min zoom and then calculating the scroll offset so the old visible area is centered in the new visible area.

Differential Revision: https://phabricator.services.mozilla.com/D113329
2021-04-29 03:14:15 +00:00
Alexandru Michis 707a3e8f17 Backed out 2 changesets (bug 1707234) for causing android failures in helper_doubletap_zoom_scrolled_overflowhidden.html
Backed out changeset f4c5c7451c00 (bug 1707234)
Backed out changeset 8458c181c404 (bug 1707234)
2021-04-29 05:49:57 +03:00
Timothy Nikkel e709d2c447 Bug 1707234. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113623
2021-04-29 00:37:56 +00:00
Timothy Nikkel 91e9990cc7 Bug 1707234. Don't try to zoom to a rect that is outside of the scrollable range. r=botond
In the testcase from the bug we have an overflow hidden document that is being scrolled by the pages javascript. In this case the scrollable rect (aka cssPageRect here) has its position as the scroll offset and the size is the composition size in css pixels. In this case we want to behave as if the scroll position is not movable (since it's not movable by the user), so we only want to be able to zoom to something that is in the visible rect. Staying inside the scrollable rect also makes sense, and we want to do it, for the non-overflow hidden case.

The current code assumes that the scrollable rect starts at 0.

Differential Revision: https://phabricator.services.mozilla.com/D113253
2021-04-29 00:37:56 +00:00
Brindusan Cristian a15a62d8e3 Backed out 15 changesets (bug 739096) for causing valgrind bustages. CLOSED TREE
Backed out changeset 75e6eca97890 (bug 739096)
Backed out changeset fb2b5f607015 (bug 739096)
Backed out changeset d4ffa7c2db22 (bug 739096)
Backed out changeset 46598f67b43a (bug 739096)
Backed out changeset 08c8584cadbb (bug 739096)
Backed out changeset 6c67d3e98e1e (bug 739096)
Backed out changeset 566742bad252 (bug 739096)
Backed out changeset 67d7ab4394ab (bug 739096)
Backed out changeset 1675a980f8f3 (bug 739096)
Backed out changeset df4fd9df9d67 (bug 739096)
Backed out changeset 1dfadbc743b9 (bug 739096)
Backed out changeset 2623ebd24944 (bug 739096)
Backed out changeset e80fbceb9023 (bug 739096)
Backed out changeset d058e7c043e6 (bug 739096)
Backed out changeset dbb07ebff6b6 (bug 739096)
2021-04-29 00:25:44 +03:00
Jonathan Kew 7d766bce37 Bug 739096 - Merge some Mozilla extensions to cairo-quartz-surface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112591
2021-04-28 18:06:53 +00:00
Jonathan Kew bcf8277c61 Bug 739096 - Merge some Mozilla additions for DirectWrite support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112590
2021-04-28 18:06:53 +00:00
Jonathan Kew 7135beb692 Bug 739096 - Look up new FreeType variation APIs at runtime, in case we were built against an older installed freetype. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112589
2021-04-28 18:06:53 +00:00
Jonathan Kew 32b773d2e6 Bug 739096 - Hook up support for SharedFTFace in the cairo-ft-font code. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112588
2021-04-28 18:06:52 +00:00
Jonathan Kew 68fd445cdb Bug 739096 - Add a synth_flags parameter to cairo_ft_font_face_create_for_ft_face. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112587
2021-04-28 18:06:52 +00:00
Jonathan Kew 3bbecd5897 Bug 739096 - Add cairo_surface_{get,set}_subpixel_antialiasing. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112586
2021-04-28 18:06:51 +00:00
Jonathan Kew 8daf820aeb Bug 739096 - Expose cairo_font_options_{get,set}_lcd_filter as public API. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112585
2021-04-28 18:06:51 +00:00
Jonathan Kew 053080d5f2 Bug 739096 - Don't declare local var with 'register' in C++. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112584
2021-04-28 18:06:51 +00:00
Jonathan Kew 77605274fb Bug 739096 - Patch cairo-xlib-xrender-private.h to work around lack of full configure support. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112583
2021-04-28 18:06:50 +00:00
Jonathan Kew 6ffed52ef5 Bug 739096 - Remove obsolete CAIRO_VERSION_* macros. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112582
2021-04-28 18:06:50 +00:00
Jonathan Kew 3f9db1b9ea Bug 739096 - Update moz.build for new cairo sources. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112559
2021-04-28 18:06:49 +00:00
Jonathan Kew 8cafeeb79e Bug 739096 - Update cairo to commit 277a1daec80cb6cf7bfb0e200cf78e7842cb2f82 (release 1.17.4 + post-release fixes on trunk) from https://gitlab.freedesktop.org/cairo/cairo/-/tree/master. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D112558
2021-04-28 18:06:38 +00:00
Jonathan Kew 93c9a68ac1 Bug 739096 - Remove cairo_quartz_{get,finish}_cg_context_with_clip. r=jrmuizel
No longer needed in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D112557
2021-04-28 18:06:37 +00:00
Jonathan Kew 902db97567 Bug 739096 - Remove support for CGLayer-backed cairo quartz surface. r=jrmuizel
This was a performance optimization that we no longer care about.
Removing it will avoid the need to merge the additions into the new
cairo-quartz-surface code from upstream.

Differential Revision: https://phabricator.services.mozilla.com/D112556
2021-04-28 18:06:37 +00:00
Lee Salzman 0d7f643ddb Bug 1708224 - Make draw_perspective more resilient to NaNs. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113671
2021-04-28 15:54:24 +00:00
Robert Mader 68fa6c04b1 Bug 1707943 - webrender_bindings: Fix warnings and apply suggestions form static analysis, r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113603
2021-04-28 12:33:55 +00:00
Timothy Nikkel 6f21f288d1 Bug 1707557. Add test. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D113617
2021-04-28 11:35:51 +00:00
Timothy Nikkel c87bb2aeb0 Bug 1707557. Fix TransformFrameRectToAncestor call in DoubleTapToZoom for fixed content where the ancestor frame isn't guaranteed to be an ancestor r=emilio
Bug 1705599 made the calculation we do in nsLayoutUtils::GetBoundingFrameRect work if its inside fixed content. But bug 1701749 added a similar calculation in DoubleTapToZoom.cpp which we didn't fix up for the same problem.

Differential Revision: https://phabricator.services.mozilla.com/D113334
2021-04-28 11:35:51 +00:00
Timothy Nikkel b90eab464a Bug 1706868. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113492
2021-04-28 08:48:19 +00:00
Timothy Nikkel a230eca41c Bug 1706868. Don't request content paint at the "after" resolution when starting a zoom animation. r=botond
This is a waste because we don't render that content, and if we did (we do sometimes, and it leads to flashing) it would be low resolution in the case of zooming out. It also causes bugs like bug 1698537. And if we get some other updates in there we can get stuck in a state where we half think we are zoomed in and half think we are zoomed out.

See bug 1698537, comment 11 for full back story.

Differential Revision: https://phabricator.services.mozilla.com/D113074
2021-04-28 08:48:19 +00:00
Timothy Nikkel 0ea6066988 Bug 1706867. Make ZoomAnimation's ask for repaints. r=botond
We request a repaint at the start of a zoom at the after zoom, which ends up causing us to request repaints during the whole zoom animation (the reasons for this are explained in the bugzilla comment linked below). The repaint request at the start of a zoom animation is weird because it asks for the after zoom, which leads to other problems, and we want to stop doing that. But the repaints during the zoom are beneficial in some ways, they make sure that we dont' checkerboard (too much).

See Bug 1698537, comment 11 for a longer writeup.

Depends on D113072

Differential Revision: https://phabricator.services.mozilla.com/D113073
2021-04-28 08:48:18 +00:00
Botond Ballo e5bc1d0ac2 Bug 1701738 - Cancel overscroll animation if scroll range changes. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D113466
2021-04-28 06:06:58 +00:00
Botond Ballo e18d9f4086 Bug 1704410 - Explicitly disallow overscroll for wheel events. r=hiro
Previously, it was implicitly disallowed by some checks in the wheel
handling code (e.g. CanScrollWithWheel()), but some cases (like
instant scroll where the starting position is away from the edge)
slipped through the cracks.

Differential Revision: https://phabricator.services.mozilla.com/D113459
2021-04-28 03:45:16 +00:00
Botond Ballo 5a4564be40 Bug 1704410 - Split ScrollSource::Wheel into Wheel and Touchpad. r=hiro
Also rename ScrollSource::Touch to Touchscreen for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D113458
2021-04-28 03:45:16 +00:00
Botond Ballo f144009e25 Bug 1704410 - Introduce ScrollSourceRespectsDisregardedDirections(). r=hiro
This makes the only existing place where we check
OverscrollHandoffState::mScrollSource express the check in a
more semantic way.

Differential Revision: https://phabricator.services.mozilla.com/D113457
2021-04-28 03:45:15 +00:00
Timothy Nikkel 38c8c055c5 Bug 1706865. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113501
2021-04-28 03:08:08 +00:00
Timothy Nikkel 591164dc82 Bug 1706865. In SampledAPZCState::ClampVisualScrollOffset use the local mZoom, not the zoom on the apzc. r=botond
If we have a zoom in progress the zoom stored in the sampled state is older than the one on the apzc. So clamping the scroll offset in the sampled state needs to use the zoom on the sampled state (it's used implicitly in this calculation), because the zoom on the sampled state is the one that we will draw to the screen with.

For more background see Bug 1698537, comment 11, second last paragraph.

Differential Revision: https://phabricator.services.mozilla.com/D113072
2021-04-28 03:08:08 +00:00
Timothy Nikkel 6ec47c43ec Bug 1706865. Factor out a couple of FrameMetrics calculations so they can be used on variables outside the metrics. r=botond
We use this in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D113071
2021-04-28 03:08:08 +00:00
Botond Ballo 96abe09f2a Bug 1704659 - Compute pan gesture velocity based on the actual amount by which the page moved. r=hiro
In particular, when overscrolled, the velocity is now based on the
amount of overscroll *after* applying resistance.

Differential Revision: https://phabricator.services.mozilla.com/D113447
2021-04-28 02:05:41 +00:00
sotaro 04324c5a92 Bug 1707814 - Add pointer size check to RemoveShaderCacheFromDiskIfNecessary() r=jrmuizel,gfx-reviewers
32bit build Firefox and 64bit Firefox could have same build ID. Pointer size check could be used to recognize if build is different.

Differential Revision: https://phabricator.services.mozilla.com/D113467
2021-04-27 22:04:25 +00:00
Lee Salzman 9c947c8891 Bug 1707798 - Use rough clipping in cs_clip_image. r=aosmond
We were already clipping off most of the AA inside cs_clip_image previously anyway.
Given that it is too unpredictable in what situations the little bit of remaining
AA was actually applying, and that it causes visual artifacts sometimes when it
activates where it shouldn't, we're better off just using a rough clip inside this
shader for everything so that it is always predictable.

Differential Revision: https://phabricator.services.mozilla.com/D113545
2021-04-27 17:03:49 +00:00
Chris Martin e8085e7ecb Bug 1698732 - Change reftest-content to get Azure info without Win32k APIs r=bas,emilio
Currently, reftest-content uses GfxInfo::GetInfo() to obtain information about
the Azure backend. GetInfo() uses Win32k APIs, and therefore will mostly
return garbage in content processes.

This adds a new way to obtain the same information directly from GfxInfo
without using Win32k APIs.

Differential Revision: https://phabricator.services.mozilla.com/D111890
2021-04-27 15:17:12 +00:00
Jeff Muizelaar db8307e53c Bug 1707794 - Add support for CMYK to the fuzzing target. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113460
2021-04-27 14:38:51 +00:00
Nicolas Silva 28cb8bdbd1 Bug 1707460 - Better handle reversed gradient stops. r=gfx-reviewers,bradwerth
The code that decompose linear gradients inserts fake gradient stops to deal with the potential constant color areas before and after the gradient endpoints. The offsets of these extra stops were computed without accounting for the transformation the loop does in the case of reversed stops. This patch fixes that.

Differential Revision: https://phabricator.services.mozilla.com/D113290
2021-04-27 07:44:26 +00:00
Nicolas Silva 4ae4ba4201 WIP: Bug 1707181 - Avoid zero-sized gradient tasks. r=gfx-reviewers,lsalzman
Add missing check for linear gradients. Also, instead of just casting to int round out the task size.

Differential Revision: https://phabricator.services.mozilla.com/D113289
2021-04-27 07:44:25 +00:00
Jamie Nicol 12c6f3d56a Bug 1707815 - Block partial present on all Mali-Txxx devices. r=nical
In bug 1680087 we disabled webrender's partial present feature on
Mali-T6xx and T7xx devices due to rendering issues caused by a buggy
implementation in the driver. We have now seen reports of the same
issue on a Mali-T8xx device.

This patch expands the block to include all Mali-Txxx devices. As a
follow up we should make this dependent on the driver version, so
that users with working drivers can take advantage of the feature.

Differential Revision: https://phabricator.services.mozilla.com/D113477
2021-04-27 07:36:57 +00:00
Andi-Bogdan Postelnicu a2692f41ac Bug 1617369 - Reformat recent rust changes with rustfmt. r=webdriver-reviewers,kvark
Updated with rustfmt 1.4.36-stable (7de6968 2021-02-07)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113295
2021-04-27 06:05:08 +00:00
Timothy Nikkel 9a35a71036 Bug 1707560. Add test. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113462
2021-04-27 05:26:21 +00:00
Timothy Nikkel 387bd3789a Bug 1707560. Don't scroll to the top if double tap on very tall element that is > 90% the width of the viewport. r=emilio
We have code for this, it's disabled for elements that are 90% or greater the width of the viewport. This code was added in bug 1204084 for the "double tap on tall element" problem and the 90% hasn't been touched since. I can't think of a good reason why we would want to scroll to the top of the element if its 90% the width of the viewport or more.

Differential Revision: https://phabricator.services.mozilla.com/D113335
2021-04-27 05:26:21 +00:00
Hiroyuki Ikezoe e94cb5c2ca Bug 1707519 - Add a null check to avoid crashes when mAnimation instance is not an OverscrollAnimation. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113292
2021-04-27 03:14:22 +00:00
Hiroyuki Ikezoe d97db04dd1 Bug 1707519 - Set the APZC state NOTHING prior to nullify mAnimation. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D113291
2021-04-27 03:14:22 +00:00
Andrew Osmond 77a93b91d2 Bug 1704227. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113191
2021-04-26 21:04:29 +00:00
Brad Werth 784a86e1ca Bug 1705007: Ensure GPU process has created the observer service. r=gfx-reviewers,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113193
2021-04-26 19:35:44 +00:00
Lee Salzman edf1e67938 Bug 1707228 - Check for no perspective dependency on Z component on axis-aligned transforms. r=aosmond
Recent changes in cs_clip_image are exposing some cases where we are letting rectangles being warped
by perspective transform get considered as axis-aligned. This makes the axis-alignment check stronger
for clipping to guard against the Z dependency in the W coordinate that is messing up clipping.

Differential Revision: https://phabricator.services.mozilla.com/D113259
2021-04-26 18:49:24 +00:00
Jamie Nicol e0f7687773 Bug 1704842 - Expose gecko version at time compositor is initialized to geckoview_streaming telemetry. r=janerik
On Fenix we see many users with a value of opengl for the
gfx_status_compositor telemetry probe, despite the fact they are
running versions of gecko for which webrender should be enabled on
their device.

The theory is that although gecko is being initialized the user has
not opened a tab, and therefore initialized a compositor, since they
have been updated to a version which should be running webrender by
default. To verify that this is the case, this patch adds a new probe
gfx_status_last_compositor_gecko_version, which reports the gecko
version at the time a compositor is initialized. This will be used to
confirm that the users whose compositor unexpectedly reports opengl
have indeed not initialized a compositor in a while.

Differential Revision: https://phabricator.services.mozilla.com/D112339
2021-04-26 16:26:38 +00:00
Andi-Bogdan Postelnicu 2508edc4c5 Bug 1519636 - Reformat recent changes to the Google coding style. r=necko-reviewers,geckoview-reviewers,agi
Updated with clang-format version 11.0.1 (taskcluster-GI8pmG3eQ_OSXfjFfr2yFw)

\# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D113294
2021-04-26 15:52:25 +00:00
Robert Mader 003138f3e9 Bug 1707202 - Remove surface_origin_is_top_left support from NativeSurface again, r=nical
Using native compositor integration should imply the y-flip can be
done by the system compositor - this is true for CA, DC and Wayland.
As the Wayland backend now does so, remove the
surface_origin_is_top_left support again, making sure
the Wayland backend uses the same code paths as CA/DC backends do.

Note:
 - In order to not regress bug 1680128, do not revert the override
   of `SurfaceOriginIsTopLeft()` in `RenderCompositorNative.h`
 - Explicitely set `surface_origin_is_top_left: false` in the example
   compositor. This is the default, however setting it explicitely
   would have helped me bring up the Wayland example compositor.
   This is purely a hint for potential future backends.

Differential Revision: https://phabricator.services.mozilla.com/D113217
2021-04-26 12:48:39 +00:00
Jeff Muizelaar cdd4899132 Bug 1555331. Add a test that parametric functions are properly inverted. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D113227
2021-04-26 12:48:33 +00:00
Jeff Muizelaar 0fe884da2d Bug 1555331. Use parametric inversion when building an output_lut. r=aosmond
Previously we didn't invert at all which was causing over saturation.

Differential Revision: https://phabricator.services.mozilla.com/D113226
2021-04-26 12:48:33 +00:00
Jeff Muizelaar bf77763c5d Bug 1555331. Implement analytic inversion for parametric transfer functions. r=aosmond
This also adjusts the initialization of Param to make inversion better behaved.

Differential Revision: https://phabricator.services.mozilla.com/D113225
2021-04-26 12:48:32 +00:00
Jeff Muizelaar e98ff078aa Bug 1555331. Add a Param struct. r=aosmond
This makes our parsing of parametric transfer functions
more clear because you can see exactly what output variables
the input variables map to.

Differential Revision: https://phabricator.services.mozilla.com/D113224
2021-04-26 12:48:32 +00:00
Hiroyuki Ikezoe a0d7a740b9 Bug 1705280 - Allow overscroll handoff to the root content APZC on pan gestures even if the root APZC is not scrollable to the given input directions. r=botond
To be precise the root APZC should actually be scrollable in the opposed
directions of the given input, it's checked in
AsyncPanZoomController::GetOverscrollableDirections.

Differential Revision: https://phabricator.services.mozilla.com/D113061
2021-04-26 08:48:08 +00:00
imoraru 37edd2782e Backed out changeset 86a1362f15e6 (bug 1705280) for causing Android Gtest failures in APZCOverscrollTesterForLayersOnly. CLOSED TREE 2021-04-26 11:34:29 +03:00
Hiroyuki Ikezoe ee1d452245 Bug 1705280 - Allow overscroll handoff to the root content APZC on pan gestures even if the root APZC is not scrollable to the given input directions. r=botond
To be precise the root APZC should actually be scrollable in the opposed
directions of the given input, it's checked in
AsyncPanZoomController::GetOverscrollableDirections.

Differential Revision: https://phabricator.services.mozilla.com/D113061
2021-04-26 07:24:56 +00:00