Commit Graph

1684 Commits

Author SHA1 Message Date
Greg V
22c3a0e8d8 Bug 1620076 - Partial compositing (damage) with EGL_EXT_buffer_age in WebRender r=jgilbert
EGL with buffer-age requires the application to keep the front buffer
fully consistent. This means we have to draw the previous frame's
damage as well. (But we don't need to include it in the hint we're
sending to the system compositor via SwapBuffersWithDamage.)

Differential Revision: https://phabricator.services.mozilla.com/D61062
2020-05-22 18:15:13 +00:00
Nicolas Silva
68198907ab Bug 1612440 - Separate SceneBuilderRequest in two. r=gw,aosmond
This patch separates SceneBuilderRequest into two enums: One we'll be able to send from the api, and containing types that shouldn't move to the webrender_api crate. For example LoadScene depends on the Scene struct and at this point a quarter of webrender's types would need to move to webrender_api.
This solution is a bit iffy but I'm not sure how to better do this. If we don't need strict ordering, moving to crossbeam's queue which support select would let us at least avoid sending dummy BackendMessage to instruct the scene builder thread to look into the other queue.
This patch should not change the current behavior except for one (important) detail: all messages that use BackendSceneBuilderMessage have to go through the low priority scene queue instead of the high priority one. This affects the capture stuff, I think that it's still correct but I'm not familiar enough with it to be sure.

Differential Revision: https://phabricator.services.mozilla.com/D72717
2020-05-22 10:06:12 +00:00
Nicolas Silva
e37f0f8d60 Bug 1612440 - Merge the webrender::Transaction and webrender_api::TransactionMsg structs. r=gw
One of the last steps towards letting the api send scene building requests directly. I'll clean up the names after everything is in place.

Differential Revision: https://phabricator.services.mozilla.com/D74054
2020-05-22 10:06:12 +00:00
Daniel Lu
2fd0312168 Bug 1637729 - Added a counter to track how many picture cache tiles are invalidated, and added it as an event marker to the profiler. r=jrmuizel,gw
Differential Revision: https://phabricator.services.mozilla.com/D76389
2020-05-22 13:57:43 +00:00
Glenn Watson
5be60824bc Bug 1637953 - Fix picture caching with redundant nested scroll roots r=Bert,jrmuizel
Some pages created nesting levels of scroll roots where the outer
scroll frames are redundant (the scrollable size is zero if the
content rect is the same as the frame rect).

In these cases, it is of no benefit to select these as a scroll
root for picture cache tiles.

Differential Revision: https://phabricator.services.mozilla.com/D75451
2020-05-21 23:11:14 +00:00
Cosmin Sabou
3ed243f234 Backed out changeset a2078244558d (bug 1637953) as requested by :gw on slack. 2020-05-21 23:16:25 +03:00
Jamie Nicol
a3dd57ee14 Bug 1636085 - Unbind GL_TEXTURE_EXTERNAL_OES before binding GL_TEXTURE_2D. r=gw
The android emulator appears to have a bug in its OpenGL
implementation where it gets confused about whether a texture is bound
to GL_TEXTURE_EXTERNAL_OES or GL_TEXTURE_2D. This was causing spurious
errors when attempting to use a regular 2D texture, due to the fact
that an external texture had previously been bound.

Work around this by explicitly unbinding from GL_TEXTURE_EXTERNAL_OES
immediately before binding to GL_TEXTURE_2D.

Differential Revision: https://phabricator.services.mozilla.com/D76318
2020-05-21 19:46:47 +00:00
Glenn Watson
dfbd6e7ef7 Bug 1637953 - Fix picture caching with redundant nested scroll roots r=Bert,jrmuizel
Some pages created nesting levels of scroll roots where the outer
scroll frames are redundant (the scrollable size is zero if the
content rect is the same as the frame rect).

In these cases, it is of no benefit to select these as a scroll
root for picture cache tiles.

Differential Revision: https://phabricator.services.mozilla.com/D75451
2020-05-21 03:41:17 +00:00
Glenn Watson
af3ddc2628 Bug 1617524 - Fix crash in get_relative_transform edge case. r=jnicol
Previously, WR would attempt to detect at the start of frame
building if the spatial node of any picture cache contained
a non-axis-aligned transform, and disable picture caching in
that edge case.

However, picture caching can't (currently) be disabled when the
native compositor is active. In this mode, picture caching was
force enabled, causing an assertion failure due to unexpected
coordinate systems when updating pictures.

This patch changes the way the detection of scroll root logic
works such that we don't consider any scroll frame inside a
reference frame to be a valid scroll root for picture caching
purposes. Thus it's not possible to create a picture cache
where the reference spatial node has a non-axis-aligned transform.

Differential Revision: https://phabricator.services.mozilla.com/D75890
2020-05-21 07:42:32 +00:00
Nicolas Silva
8b97fa6457 Bug 1637112 - Add a wrench reftest. r=mstange.
Differential Revision: https://phabricator.services.mozilla.com/D75305
2020-05-14 17:51:47 +00:00
Nicolas Silva
4c56570aa9 Bug 1637112 - Don't draw border-image segments with zero slice size. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D75119
2020-05-13 17:31:25 +00:00
Glenn Watson
32a56ebf74 Bug 1637963 - Fix clipping of iframes inside a nested stacking context. r=Bert
Ensure that clips from an enclosing stacking context are correctly
propagated to nested iframes, and add a regression test for this.

Differential Revision: https://phabricator.services.mozilla.com/D76075
2020-05-20 17:33:29 +00:00
cbrewster
df02aa6efc Bug 1559861: WR - Scale picture tasks based on their surface to parent transform scale factors r=gw,Bert
This patch adjusts the device pixel scale for raster root surfaces so that the surface's content is not
pixelated/blurred when it is composited into its parent surface where a transform scales up the surface.

This only fixes the referenced bug when WebRender is used.

Differential Revision: https://phabricator.services.mozilla.com/D75236
2020-05-20 17:19:06 +00:00
Glenn Watson
d175aa9dae Bug 1632443 - Fix pinch-zoom rendering when partial present is enabled. r=sotaro
WR currently disables picture caching during a pinch-zoom, if the
native compositor is disabled (since there's no real performance
gain to be had from caching tiles during a pinch-zoom).

However, this code path was not returning a dirty rect to the
caller code. For callers that take advantage of partial present,
this meant the screen was assumed to have no changes, and so
the swapbuffers is skipped incorrectly.

Differential Revision: https://phabricator.services.mozilla.com/D76081
2020-05-20 05:33:06 +00:00
Lee Salzman
9dd235e852 Bug 1637859 - support conditional commands in wrench reftest lists. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D75250
2020-05-20 03:22:22 +00:00
Lee Salzman
e6dd2c54f6 Bug 1637859 - support nesting in wrench's reftest function parser. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75249
2020-05-20 03:22:10 +00:00
Lee Salzman
0d2e7e650f Bug 1637859 - report SWGL as wrench platform if running with it enabled. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75248
2020-05-20 03:22:02 +00:00
Dorel Luca
ab7fdba593 Backed out changeset 41acfa78dae4 (bug 1559861) for Wrench failure in transforms/raster-root-scaling.yaml 2020-05-20 05:58:47 +03:00
cbrewster
186c1872b8 Bug 1559861: WR - Scale picture tasks based on their surface to parent transform scale factors r=gw,Bert
This patch adjusts the device pixel scale for raster root surfaces so that the surface's content is not
pixelated/blurred when it is composited into its parent surface where a transform scales up the surface.

This only fixes the referenced bug when WebRender is used.

Differential Revision: https://phabricator.services.mozilla.com/D75236
2020-05-19 22:24:07 +00:00
cbrewster
f56ce0c806 Bug 1637796: Scale down mask render tasks if they exceed the maximum size r=gw
Differential Revision: https://phabricator.services.mozilla.com/D75590
2020-05-19 16:45:59 +00:00
Nicolas Silva
c59b80d2ff Bug 1612440 - Move blob and font resources to the RenderApi. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74301
2020-05-19 15:16:40 +00:00
Kartikaya Gupta
5d6e4993b0 Bug 1639217 - Disable macOS CI jobs for webrender on github, until the woker machine can be resurrected. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75954
2020-05-19 14:20:03 +00:00
Nicolas Silva
03436162ac Bug 1612440 - Use a single shared font instance map in various place. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74299
2020-05-19 12:52:06 +00:00
Nicolas Silva
2440fa9497 Bug 1612440 - Move some types to webrender_api. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74298
2020-05-19 07:54:25 +00:00
Nicolas Silva
1cc29ae322 Bug 1612440 - Simplify the SetDisplayList message. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74300
2020-05-19 07:53:16 +00:00
Nicolas Silva
7716ebe2a3 Bug 1612440 - Forward glyph dimension and index requests through the scene builder thread. r=gw
This prevents the request from racing ahead of the AddFontInstance message which follows the transaction through the scene builder thread and silently returning zero-sized glyphs.

Differential Revision: https://phabricator.services.mozilla.com/D72906
2020-05-19 07:52:25 +00:00
Brindusan Cristian
d85df0c158 Backed out changeset e867d81f9019 (bug 1637953) for wrench bustages. CLOSED TREE 2020-05-19 00:26:26 +03:00
Glenn Watson
d3ee00c83e Bug 1637953 - Fix picture caching with redundant nested scroll roots r=Bert,jrmuizel
Some pages created nesting levels of scroll roots where the outer
scroll frames are redundant (the scrollable size is zero if the
content rect is the same as the frame rect).

In these cases, it is of no benefit to select these as a scroll
root for picture cache tiles.

Differential Revision: https://phabricator.services.mozilla.com/D75451
2020-05-18 14:44:24 +00:00
Lee Salzman
b5a4c1c1ff Bug 1637705 - fix SWGL's frustum clipping to work against all 6 sides. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D75166
2020-05-16 03:09:50 +00:00
Glenn Watson
de2845e48f Bug 1635610 - Enable per scroll root picture cache slices by default. r=jrmuizel,aosmond
Part 1 of this patch enables subpixel AA in more cases when there
are multiple picture cache slices. Because of this, we can enable
extra picture cache slices by default, as a performance win for
the general case.

Users who want to force subpixel AA in more cases, at the cost of
performance can manually set the about:config value called
gfx.webrender.quality.force-subpixel-aa-where-possible.

Differential Revision: https://phabricator.services.mozilla.com/D75465
2020-05-16 03:09:57 +00:00
Bert Peers
08bc10ecf3 Bug 1637426 - Submit WR work more often than once per frame r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D75392
2020-05-15 14:27:44 +00:00
Bert Peers
b26c4286f6 Bug 1623821 - reftests/split/filter.yaml fails when picture caching optimization is disabled r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74351
2020-05-14 23:15:39 +00:00
Bert Peers
c6ad2fc167 Bug 1637120 - Tileview improvements r=gw
1/ add tile_cache to input path if frame00000 can't be found
2/ add visual IDs to each tile
3/ hiding a slice also hides its Invalidation info
4/ code cleanup (+= instead of push_str)

Differential Revision: https://phabricator.services.mozilla.com/D75432
2020-05-14 22:46:25 +00:00
Nicolas Silva
112b8cac75 Bug 1637440 - Fix non-repeated border-image fill area. r=gw
The fill area is a bit special because its repetition parameters depend on the top-left corner dimensions, but the stretch size in the shader must only be modified to account for this if the image is repeated.

Differential Revision: https://phabricator.services.mozilla.com/D75117
2020-05-14 16:28:25 +00:00
Nicolas Silva
723ecc70b6 Bug 1637300 - Further reduce unnecessary scene building. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74881
2020-05-14 12:40:49 +00:00
Bogdan Tara
36324dfb47 Backed out changeset 4fe9d4a384e1 (bug 1637440) for border-image-fill.yaml failures CLOSED TREE 2020-05-14 13:56:55 +03:00
Nicolas Silva
d04870e7f0 Bug 1637440 - Fix non-repeated border-image fill area. r=gw
The fill area is a bit special because its repetition parameters depend on the top-left corner dimensions, but the stretch size in the shader must only be modified to account for this if the image is repeated.

Differential Revision: https://phabricator.services.mozilla.com/D75117
2020-05-13 19:30:21 +00:00
Narcis Beleuzu
c8c2b4c82b Backed out changeset 55c506cc9801 (bug 1541511) for wrench bustage on prim_store . CLOSED TREE 2020-05-14 02:46:36 +03:00
Lee Salzman
f2f3dba2d9 Bug 1637152 - fix SWGL's handling of text bg-color blend-mode. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D74807
2020-05-13 22:39:32 +00:00
Daniel Lu
7b1e9cbfbb Bug 1541511 - Removed unused Image::sub_rect field. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D75109
2020-05-13 22:16:55 +00:00
Glenn Watson
99ed67fccb Bug 1635610 - Part 1 - Improve situations where subpixel AA is enabled. r=nical
Previously, any time a text run was encountered that was outside the
detected opaque backdrop of a picture cache, all subpixel AA would
get disabled for that surface.

Recently, we added support for conditional subpixel mode, where a
list of excluded rects can be provided (compositor surfaces) that
require a text run to disable subpixel AA.

This patch extends that, adding an inclusion rect to the conditional
subpixel mode. This allows subpixel AA to be enabled on any text
runs that are within the bounds of the detected opaque backdrop
for a picture cache.

Differential Revision: https://phabricator.services.mozilla.com/D75027
2020-05-13 08:31:02 +00:00
Glenn Watson
c5dda870bc Bug 1637157 - Add a simple clip id -> clip chain id cache. r=nical
It's very common for content to share a ClipId with the previous
primitive. This patch adds a cache of the last clip chain that
was built, and reuses it if the next ClipId is the same.

If we ever see this show up in future profiles, we could make
the cache a hash map, rather than just the previous ClipId.

Fixes the talos regressions from the recent clip restructuring.

Differential Revision: https://phabricator.services.mozilla.com/D75002
2020-05-13 08:09:18 +00:00
Jonathan Kew
5cdc123a52 Bug 1633397 - Make separate Core Text calls for each strike when applying synthetic-bold, to avoid unreliable subpixel positioning. r=jrmuizel
If we pass an array of glyph IDs (all the same) and positions (with 1-pixel offsets) to CTFontDrawGlyphs
to generate the rasterized image for a synthetic-bold glyph, it's possible that -- depending on the
fractional-pixel x position and the character coverage of the font -- it may misposition the rendering
of one (or more?) of the copies of the glyph bitmap within the context, such that we lose the intended
double-struck/offset effect.

The problem doesn't occur if we render the exact same glyphs and positions to the context using
individual single-glyph calls to CTFontDrawGlyphs.

Differential Revision: https://phabricator.services.mozilla.com/D74918
2020-05-12 21:55:56 +00:00
Glenn Watson
4c6a3862df Bug 1636616 - Fix invalidations occuring when display port changes. r=Bert
On some pages, primitives other than rectangles may have their
clip rect affected by the display port, which was causing incorrect
invalidations and extra rasterization work.

Remove clip_by_tile check, and clamp clip rect to tile boundaries
for all primitive types. Also switch to a more efficient min/max
representation of the clip rect for primitive dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D74582
2020-05-11 23:05:42 +00:00
Glenn Watson
ea0a125055 Bug 1636320 - Part 3 - Remove Push/PopClipChain display items. r=Bert
Building on the work in parts 1 and 2, the Push/PopClipChain
display items are no longer required.

Instead, we can use the clip chain builder to push the clip
from any redundant stacking contexts onto the clip stack. This
ensures that primitives within the redundant stacking context
will get that clip applied to the primitive.

This also relies on being able to determine if a stacking
context is redundant during push_stacking_context. Previously
this was not feasible due to mix-blend-mode changing the
isolation mode of parent stacking context. However, this is
now known due to recent work to support blend containers.

This patch doesn't contain functional changes, but should be
a slight performance improvement during both scene building
and frame building. It also simplifies a lot of the clip
handling code related to picture caching, opening up some
more optimization opportunities in future.

Differential Revision: https://phabricator.services.mozilla.com/D74583
2020-05-11 20:42:59 +00:00
Nicolas Silva
be515a3296 Bug 1612440 - Add BlobImageHandler::create_similar. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74297
2020-05-11 14:00:49 +00:00
Nicolas Silva
ee478cb6d7 Bug 1612440 - Renamed clone_sender into create_sender. r=gw
This was split off from https://phabricator.services.mozilla.com/D71992

Depends on D74293

Differential Revision: https://phabricator.services.mozilla.com/D74296
2020-05-07 19:45:20 +00:00
Nicolas Silva
f4e54a21aa Bug 1612440 - Make send_transaction take &mut self. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D74293
2020-05-11 10:27:26 +00:00
Nicolas Silva
f16e775358 Bug 1612440 - Remove ApiMsg::UpdateResources. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D72397
2020-05-11 10:27:26 +00:00
Nicolas Silva
96e70c7f92 Bug 1636038 - Only rebuild the scene if the a displaylist or root pipeline was updated. r=gw
This reverts to the behavior before https://phabricator.services.mozilla.com/D71781 which introduced a talos regression.

Differential Revision: https://phabricator.services.mozilla.com/D74228
2020-05-07 19:43:07 +00:00