Commit Graph

34847 Commits

Author SHA1 Message Date
Andrew Osmond
c3f9baa23f Bug 1581934 - Restore the calculation for a more precise picture local rect. r=kvark,gw
As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

Differential Revision: https://phabricator.services.mozilla.com/D46605

--HG--
extra : moz-landing-system : lando
2019-09-23 23:58:44 +00:00
arthur.iakab
76632198c8 Backed out changeset da5d5eb153f2 (bug 1582273) for causing tidy bustages. CLOSED TREE 2019-09-24 03:14:33 +03:00
Timothy Nikkel
3c9a0952b5 Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-23 23:31:45 +00:00
Noemi Erli
c539b288a4 Backed out changeset 0574bc97e2ac (bug 1582273) for causing wrench build bustages CLOSED TREE 2019-09-24 00:55:58 +03:00
Noemi Erli
c9d5b4e3b5 Backed out changeset 56c82d00c513 (bug 1581934) for reftest failures CLOSED TREE 2019-09-24 00:53:30 +03:00
Timothy Nikkel
75996b49cc Bug 1582273. Pass scrollbar flags from gecko to webrender so it can identify them. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D46587

--HG--
extra : moz-landing-system : lando
2019-09-23 21:41:18 +00:00
Andrew Osmond
32b92fbfc6 Bug 1581934 - Restore the calculation for a more precise picture local rect. r=kvark,gw
As it turns out, the difference between the snapped local rect and the
unsnapped local rect was not just that the former contained snapped
primitives and the latter contained unsnapped primitives, but also that
the former took into account surface inflation for primitives, the
entire clip chain instead of just the primitive's local clip, and
removal of culled primitives. As such, the picture's rects can be wildly
different, even if snapping has been taken care of earlier, and parts of
WebRender have come to rely upon this more accurate representation of a
picture.

Differential Revision: https://phabricator.services.mozilla.com/D46605

--HG--
extra : moz-landing-system : lando
2019-09-23 20:18:50 +00:00
Lee Salzman
523a527e84 Bug 1578075 - Increase stack size of paint threads on macOS Catalina to 1MB. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D46834

--HG--
extra : moz-landing-system : lando
2019-09-23 20:02:17 +00:00
Timothy Nikkel
05d45ca5d2 Bug 1582918. Make sure that async-scrollbar* reftests don't pass because they draw nothing. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D46699

--HG--
extra : moz-landing-system : lando
2019-09-23 14:58:46 +00:00
Botond Ballo
a66c81bfae Bug 1567448 - Disable helper_overscroll_behavior_bug1425573.html until we track down the memory leak it's causing. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D46804

--HG--
extra : moz-landing-system : lando
2019-09-23 19:48:06 +00:00
Noemi Erli
728928781e Backed out changeset 195e629a7877 (bug 1582459) for causing wrench bustages CLOSED TREE 2019-09-23 21:07:24 +03:00
Nicolas Silva
ff7cdb1b4e Bug 1582459 - Improve the clipping and segment documentation. r=kvark
Adds a module documentation in segment.rs giving an overview of the role of primitive segments and how they interact with clipping. Also reformatted the clip.rs documentation to play well with rustdoc.

Differential Revision: https://phabricator.services.mozilla.com/D46472

--HG--
extra : moz-landing-system : lando
2019-09-23 15:04:19 +00:00
Lee Salzman
30af0c2548 Bug 1582749 - try to load only the advance width from FreeType when possible. r=jfkthame
During metrics initialization we load a few uncached glyph widths which can occasionally
show up in a profile. This should reduce the overhead of that somewhat.

Differential Revision: https://phabricator.services.mozilla.com/D46786

--HG--
extra : moz-landing-system : lando
2019-09-23 15:17:04 +00:00
Glenn Watson
4f409d7a31 Bug 1581879 - Artifacts when zooming text on webrender on android. r=jnicol,nical
Fix scissor rect being incorrect during pinch zoom due to floating
point inaccuracies.

Differential Revision: https://phabricator.services.mozilla.com/D46743

--HG--
extra : moz-landing-system : lando
2019-09-23 08:13:57 +00:00
Lee Salzman
60a7bb036d Bug 1582749 - query FreeType glyph advance and bounds at the same time. r=jfkthame
Cairo would normally query both the advance and other metrics at the same time,
then store them in a glyph cache sitting on each cairo_scaled_font_t any time
any of the extents were queried. Each cached scaled glyph metrics would require
about 150 bytes of space and could thus use a horribly large amount of memory
when a lot of glyphs were being used within a scaled font.

This tries to duplicate the behavior of querying and storing both advance and
bounds at the same time to effectively cut the number of glyph loads in half
for most cases. This should only add another 8 bytes per hash entry to store
the cached bounds, thus putting us way ahead on memory usage compared to what
Cairo did under the hood.

Further, Cairo would keep around cairo_scaled_font_t's in a holdover cache
even after there are no existing references to them and the owning gfxFonts
have long since died. This gives an artificial boost in successive runs of the
benchmark, while not aiding in the performance of the first run. I don't
believe the extra memory use would be justified to reproduce that particular
behavior, especially since our expectations are that the glyph cache for
a gfxFont dies when the gfxFont itself dies from the gfxFontCache.

In any case, this should at least significantly boost our glyph metrics
performance on a cold start, with the caveat about the warm start case.

Differential Revision: https://phabricator.services.mozilla.com/D46726

--HG--
extra : moz-landing-system : lando
2019-09-22 19:56:00 +00:00
Daniel Varga
c8913746b5 Backed out 1 changesets (bug 1582749) for build bustage at /builds/worker/workspace/build/src/gfx/thebes/gfxFT2FontBase
Backed out changeset db3d77b313a0 (bug 1582749)
2019-09-22 21:01:58 +03:00
Lee Salzman
95c42fceb9 Bug 1582749 - query FreeType glyph advance and bounds at the same time. r=jfkthame
Cairo would normally query both the advance and other metrics at the same time,
then store them in a glyph cache sitting on each cairo_scaled_font_t any time
any of the extents were queried. Each cached scaled glyph metrics would require
about 150 bytes of space and could thus use a horribly large amount of memory
when a lot of glyphs were being used within a scaled font.

This tries to duplicate the behavior of querying and storing both advance and
bounds at the same time to effectively cut the number of glyph loads in half
for most cases. This should only add another 8 bytes per hash entry to store
the cached bounds, thus putting us way ahead on memory usage compared to what
Cairo did under the hood.

Further, Cairo would keep around cairo_scaled_font_t's in a holdover cache
even after there are no existing references to them and the owning gfxFonts
have long since died. This gives an artificial boost in successive runs of the
benchmark, while not aiding in the performance of the first run. I don't
believe the extra memory use would be justified to reproduce that particular
behavior, especially since our expectations are that the glyph cache for
a gfxFont dies when the gfxFont itself dies from the gfxFontCache.

In any case, this should at least significantly boost our glyph metrics
performance on a cold start, with the caveat about the warm start case.

Differential Revision: https://phabricator.services.mozilla.com/D46726

--HG--
extra : moz-landing-system : lando
2019-09-22 16:52:52 +00:00
Jonathan Kew
10f2427082 Bug 1583005 - Ensure the fontconfig configuration is initialized in all processes (by calling FcConfigGetCurrent) before potential gtk access. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D46732

--HG--
extra : moz-landing-system : lando
2019-09-22 16:21:06 +00:00
Cosmin Sabou
69acba5002 Backed out 8 changesets (bug 1551088) for causing build bustages. CLOSED TREE
Backed out changeset 02d9dc4d39a5 (bug 1551088)
Backed out changeset d7684ca35c0d (bug 1551088)
Backed out changeset b061b1bf8281 (bug 1551088)
Backed out changeset 4760b8b22ffd (bug 1551088)
Backed out changeset 4685fc022257 (bug 1551088)
Backed out changeset 91300f9f99bb (bug 1551088)
Backed out changeset 6da767c8d55c (bug 1551088)
Backed out changeset ec69be661551 (bug 1551088)
2019-09-21 14:52:41 +03:00
Andrew Osmond
e203ac1b2f Bug 1551088 - Part 4. Add gtests for PremultiplyRow and SwizzleRow. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D46447

--HG--
extra : moz-landing-system : lando
2019-09-20 19:17:06 +00:00
Andrew Osmond
e6bac974fe Bug 1551088 - Part 3. Add SSSE3 and AVX2 implementations of unpacking. r=lsalzman
These variants perform significantly faster than the C implementations
according to local testing and that in treeherder. Image decoding is as
much as 40% faster in the most simple cases (solid green PNG image).

Differential Revision: https://phabricator.services.mozilla.com/D46446

--HG--
extra : moz-landing-system : lando
2019-09-20 19:13:49 +00:00
Andrew Osmond
d29705ad1a Bug 1551088 - Part 2. Add unpack methods to convert from RGB to RGBX/BGRX. r=lsalzman
Some image decoders (e.g. PNG) may have a native representation of the
data as RGB, and do not have accelerated methods to transform from RGB
to RGBX/BGRX. Exposing this as part of the swizzle/premultiply methods
allows us to write accelerated versions ourselves in a later patch in
this series.

Differential Revision: https://phabricator.services.mozilla.com/D46445

--HG--
extra : moz-landing-system : lando
2019-09-20 19:15:04 +00:00
Andrew Osmond
83363c9bdc Bug 1551088 - Part 1. Expose SwizzleRow and PremultiplyRow variants. r=lsalzman
The image decoders produce surfaces row by row, so a variant to get a
function pointer to perform swizzle/premultiply operations makes more
ergonomic sense.

Differential Revision: https://phabricator.services.mozilla.com/D46444

--HG--
extra : moz-landing-system : lando
2019-09-20 19:16:40 +00:00
Jeff Muizelaar
d5395c6733 Bug 1582810. Drop clipped group bounds hack. r=aosmond
We don't need this anymore now that we're always
using the visible rect.

This requires bug 1582528 to properly set the visible area.

Differential Revision: https://phabricator.services.mozilla.com/D46628

--HG--
extra : moz-landing-system : lando
2019-09-21 01:11:56 +00:00
Oana Pop Rus
fb8920ea20 Backed out changeset 1a8f6cac81c5 (bug 1582810) for reftest failures in img-widthAndHeight-slice-1.html on a CLOSED TREE 2019-09-20 23:35:45 +03:00
Jeff Muizelaar
2417420ffc Bug 1582810. Drop clipped group bounds hack. r=aosmond
We don't need this anymore now that we're always
using the visible rect.

This requires bug 1582528 to properly set the visible area.

Differential Revision: https://phabricator.services.mozilla.com/D46628

--HG--
extra : moz-landing-system : lando
2019-09-20 17:38:52 +00:00
Nathan Froyd
2f78d3bd17 Bug 1581145 - update sfntly to master; r=jfkthame
This update brings in several bugfixes and compatibility with newer
libstdc++ versions.

Differential Revision: https://phabricator.services.mozilla.com/D45860

--HG--
extra : moz-landing-system : lando
2019-09-18 21:31:08 +00:00
Lee Salzman
2770b6301a Bug 1582231 - remove Moz2D dependency on Cairo glyph extents. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D46332

--HG--
extra : moz-landing-system : lando
2019-09-20 16:30:21 +00:00
Jonathan Kew
9d6bf431e5 Bug 1580690 - Ensure src:local() entries in the user font set are refreshed if the platform font list is rebuilt. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D46580

--HG--
extra : moz-landing-system : lando
2019-09-20 15:24:33 +00:00
Bob Owen
97b0a351d7 Bug 1578475: Cleanup Remote Canvas 2D IPC classes when not used for certain duration. r=mattwoodrow
This also changes CompositorBridgeChild to create the CanvasChild lazily.

Depends on D44154

Differential Revision: https://phabricator.services.mozilla.com/D44873

--HG--
extra : moz-landing-system : lando
2019-09-17 00:15:59 +00:00
Daosheng Mu
125bfdb32c Bug 1581988 - Making VR display enumerationCompleted be false when doing enumeration. r=kip
If VR process haven't launched yet, we couldn't get available VR displays and its states, so we need to make enumationCompleted to be false, and ask it do the enumeration again.

Differential Revision: https://phabricator.services.mozilla.com/D46238

--HG--
extra : moz-landing-system : lando
2019-09-20 00:26:23 +00:00
sotaro
5182120673 Bug 1582371 - Add DCLayerTree class r=nical
Preparation work for adding DirectComposition support. It does not add a new functionality.

Differential Revision: https://phabricator.services.mozilla.com/D46429

--HG--
extra : moz-landing-system : lando
2019-09-19 18:15:11 +00:00
Cosmin Sabou
db07080d87 Backed out changeset 08f2148de713 (bug 1581757) for causing webrender reftest failures.
--HG--
extra : rebase_source : 6d41ee1b453c7433768f9b77b6f88483a4215f04
2019-09-19 07:40:01 +03:00
Botond Ballo
b0c0d22c43 Bug 1564195 - Add a GTest to test correct setting of the mHitRegionWithApzAwareListeners flags. r=tnikkel
Depends on D46377

Differential Revision: https://phabricator.services.mozilla.com/D46378

--HG--
extra : moz-landing-system : lando
2019-09-19 03:05:05 +00:00
Botond Ballo
6a4103189b Bug 1564195 - Add a flag to APZEventResult indicating whether the event hit a region with APZ-aware listeners. r=tnikkel
This is currently only populated for touch events.

Depends on D46376

Differential Revision: https://phabricator.services.mozilla.com/D46377

--HG--
extra : moz-landing-system : lando
2019-09-19 02:55:35 +00:00
Botond Ballo
a61744ca91 Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D46376

--HG--
extra : moz-landing-system : lando
2019-09-19 02:45:21 +00:00
Jeff Muizelaar
4db1b2ef19 Bug 1582217. Drop unneeded image dependencies. r=kvark
We only use the png codec so let's save some link time by not including
the other codecs.

Differential Revision: https://phabricator.services.mozilla.com/D46317

--HG--
extra : moz-landing-system : lando
2019-09-18 22:04:47 +00:00
Glenn Watson
8836bc5265 Bug 1581757 - Support slicing the scene into an arbitrary number of picture cache slices r=nical
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.

The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.

However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:

 * Creating cache tiles for the UI.
 * Slicing the scene where there are video elements, in order to
   allow these to be composited directly by the OS. This may also
   apply to WebGL and/or canvas elements.
 * Slicing the scene when there is a very large fixed position
   background image or other element, to avoid invalidating the
   entire tile cache each frame.

Differential Revision: https://phabricator.services.mozilla.com/D46125

--HG--
extra : moz-landing-system : lando
2019-09-18 23:17:55 +00:00
Dzmitry Malyshau
9c34641992 Bug 1582198 - Remove nix dependency from Wrench r=jrmuizel
https://github.com/servo/webrender/pull/3736

Differential Revision: https://phabricator.services.mozilla.com/D46309

--HG--
extra : moz-landing-system : lando
2019-09-18 17:51:27 +00:00
Jeff Muizelaar
27b7b84144 Bug 1573569. Add some debugging code. r=aosmond
This should help us figure what's going on.

Differential Revision: https://phabricator.services.mozilla.com/D46327

--HG--
extra : moz-landing-system : lando
2019-09-18 18:47:05 +00:00
sotaro
1b54393769 Bug 1582011 - Reduce IDCompositionDevice::Commit calls r=nical
IDCompositionDevice::Commit needs to be called when there is an update to DirectComposition. RenderCompositorANGLE updates DirectComposition only during initialization. Then it is not necessary to call the function in EndFrame().

Differential Revision: https://phabricator.services.mozilla.com/D46249

--HG--
extra : moz-landing-system : lando
2019-09-18 08:00:44 +00:00
Glenn Watson
1cd0a0e783 Bug 1581677 - Fix consistency bug in WR dirty rect calculation. r=nical
This fixes a case where the is_same_content field was no longer
being reset to true before dependency calculation could occur.

In some cases, this could result in a tile being updated, but
the dirty rect being empty, which meant all primitives in that
tile would fail the visibility culling test.

Differential Revision: https://phabricator.services.mozilla.com/D46247

--HG--
extra : moz-landing-system : lando
2019-09-18 08:01:50 +00:00
Henri Sivonen
c193518677 Bug 1490601 part 2 - Move C++ entry points to encoding_c_mem to mfbt/. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D43957

--HG--
extra : moz-landing-system : lando
2019-09-18 08:26:34 +00:00
Daosheng Mu
480100a366 Bug 1510622 - Initilize OpenVR controller haptic thread when the first time to do vibration. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D46227

--HG--
extra : moz-landing-system : lando
2019-09-18 00:13:12 +00:00
A. Wilcox
f40d806c0d Bug 1511604 - Swizzle YCbCr->RGB data on big-endian machines. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D46134

--HG--
extra : moz-landing-system : lando
2019-09-17 17:47:17 +00:00
Glenn Watson
e2052553cc Bug 1581448 - Add support for specifying extra per-primitive flags in WR display lists r=kvark,nical
This patch replaces the is_backface_visible bool in the common
per-primitive data in the display list with a PrimitiveFlags
enumeration. This will allow Gecko to specify extra information
about certain primitive, such as tagging scroll bars.

Differential Revision: https://phabricator.services.mozilla.com/D45970

--HG--
extra : moz-landing-system : lando
2019-09-18 07:14:51 +00:00
Andreea Pavel
73383c5230 Backed out changeset af9417bd8105 (bug 1581448) for wrench bustages on a CLOSED TREE 2019-09-18 09:54:23 +03:00
Glenn Watson
83dc27b34b Bug 1581650 - Provide picture cache dirty rects in WR render outputs r=nical
This provides the internal device-space dirty rects calculated
during picture cache updates to the external render() method.

This allows clients to provide these to OS partial present APIs,
to reduce power usage and improve performance.

In this initial implementation, if a scroll or scale of the main
picture cache has occurred, the dirty rect will be the entire
screen. This should ensure correctness. In future, we can handle
this case by supplying the picture cache transforms to the OS
compositor integration.

However, the dirty rects will be valid for any non-scroll cases,
such as animations or video playback. This should result in some
significant power savings and performance improvements for these
use cases.

Differential Revision: https://phabricator.services.mozilla.com/D46082

--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:54 +00:00
Glenn Watson
ff53edd4e5 Bug 1581448 - Add support for specifying extra per-primitive flags in WR display lists r=kvark,nical
This patch replaces the is_backface_visible bool in the common
per-primitive data in the display list with a PrimitiveFlags
enumeration. This will allow Gecko to specify extra information
about certain primitive, such as tagging scroll bars.

Differential Revision: https://phabricator.services.mozilla.com/D45970

--HG--
extra : moz-landing-system : lando
2019-09-18 06:27:34 +00:00
Gerald Squelart
dc8ac83ba6 Bug 1578329 - Use profiler_can_accept_markers() where appropriate - r=gregtatum
In places where profiler_is_active() was used around a profiler_add_marker() (or
similar) call, replace it with profiler_can_accept_markers().

Differential Revision: https://phabricator.services.mozilla.com/D44435

--HG--
extra : moz-landing-system : lando
2019-09-18 01:22:12 +00:00