Commit Graph
47 Commits
Author SHA1 Message Date
Sebastian Hengst 387952c22a merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EVLGo1zCANb
2017-10-04 11:13:24 +02:00
Kartikaya Gupta 7c1da03e1c Bug 1403915 - Remove the WebRender*Layer classes and functions that refer to them. r=jrmuizel
MozReview-Commit-ID: 2syFwMc7j3r
2017-10-03 16:31:08 -04:00
Jeff Muizelaar 053d27cea7 Bug 1404955 - Use ComplexClipRegion instead of WrComplexClipRegion. r=kats
cbindgen will let us do this now.
2017-10-03 18:11:14 -04:00
Ethan Lin 5df9c4ed5d Bug 1398706 - Always create new clip ids in ScrollingLayersHelper if it's inside a mask. r=kats
MozReview-Commit-ID: Hhsbgpqddo1
2017-09-19 17:05:22 +08:00
Nicolas Silva 137f6a060e Bug 1393031 - Begin moving OpAddExternalImage to IpcResourceUpdateQueue and recycle image keys in WebRenderImageLayer. r=jrmuizel 2017-09-20 10:56:09 +02:00
Kartikaya Gupta d18207bdd1 Bug 1394695 - Don't push scrolling clips in layers-free WR if APZ is disabled. r=mstange
MozReview-Commit-ID: AesXui61mB2
2017-09-12 10:33:45 -04:00
Kartikaya Gupta 165a507153 Bug 1395212 - Avoid computing the entire ScrollMetadata for cases where we just need the scroll id. r=mstange
MozReview-Commit-ID: BEYfq2EqIel
2017-08-30 14:51:19 -04:00
Kartikaya Gupta 02daad2642 Bug 1395212 - Update wr::DisplayListBuilder to expose separate APIs for defining and pushing scroll layers. r=mstange
This makes the DisplayListBuilder scrolling API more consistent with the
clipping API, and allows for more optimization at the call site (in the next
patch).

MozReview-Commit-ID: LdCA7wkXDwF
2017-08-30 14:51:19 -04:00
Kartikaya Gupta dc8d718a4a Bug 1395212 - Hoist the scroll layer deduplication code out of bindings.rs into wr::DisplayListBuilder. r=mstange
This also splits the wr_dp_push_scroll_layer function in bindings.rs into two
separate functions. This makes the API consistent with clipping, and also allows
for optimizations in the upcoming patches.

MozReview-Commit-ID: IXnOZK0dZm
2017-08-30 14:51:19 -04:00
Ethan Lin 3da6939088 Bug 1392921 - In TopmostScrollId(), return FrameMetrics::NULL_SCROLL_ID when the scroll id stack is empty. r=kats
MozReview-Commit-ID: 3kmgsisMhW5
2017-08-23 14:46:38 +08:00
Kartikaya Gupta 4424b95940 Bug 1389138 - Push scroll layers in layers-free WR. r=mstange
This patch takes the existing code (which allows recursively pushing the necessary
part of a clip chain) and folds it into another recursive function that
operates on the ASR chain. Now the ASR recursion is the primary one, and
clips are pushed for each ASR as needed.

This code was partly modelled after the code in
ContainerState::SetupScrollingMetadata, which also iterates over the
ASRs and clips.

MozReview-Commit-ID: 1qaFPY7Ja7
2017-08-17 11:07:03 -04:00
Kartikaya Gupta 41ef091f9b Bug 1389138 - Introduce a variant type to allow unifying the clip and scroll ids. r=mstange
This allows us to keep a single stack where we track both clip ids and
scroll ids with the correct interleaving order that they were pushed in.

MozReview-Commit-ID: DHHfR8JnnBw
2017-08-17 11:06:31 -04:00
Kartikaya Gupta cbf1e01a64 Bug 1389138 - Extract a helper PushScrollLayer method. r=mstange
MozReview-Commit-ID: CqKOvxWCWZE
2017-08-17 11:06:12 -04:00
Sebastian Hengst b61ef21b08 Backed out changeset 20c649cb4a21 (bug 1389138) for bustage at dist/include/mozilla/layers/ScrollingLayersHelper.h:22: class 'FrameMetrics' was previously declared as a struct. r=backout 2017-08-17 21:08:57 +02:00
Sebastian Hengst 7b3ddfa2b6 Backed out changeset 442b037713d6 (bug 1389138) 2017-08-17 21:08:20 +02:00
Sebastian Hengst 5d05127be8 Backed out changeset 321176b458a5 (bug 1389138) 2017-08-17 21:08:09 +02:00
Kartikaya Gupta f8c59d5550 Bug 1389138 - Push scroll layers in layers-free WR. r=mstange
This patch takes the existing code (which allows recursively pushing the necessary
part of a clip chain) and folds it into another recursive function that
operates on the ASR chain. Now the ASR recursion is the primary one, and
clips are pushed for each ASR as needed.

This code was partly modelled after the code in
ContainerState::SetupScrollingMetadata, which also iterates over the
ASRs and clips.

MozReview-Commit-ID: 1qaFPY7Ja7
2017-08-17 11:07:03 -04:00
Kartikaya Gupta a150aeff54 Bug 1389138 - Introduce a variant type to allow unifying the clip and scroll ids. r=mstange
This allows us to keep a single stack where we track both clip ids and
scroll ids with the correct interleaving order that they were pushed in.

MozReview-Commit-ID: DHHfR8JnnBw
2017-08-17 11:06:31 -04:00
Kartikaya Gupta c474a3bde8 Bug 1389138 - Extract a helper PushScrollLayer method. r=mstange
MozReview-Commit-ID: CqKOvxWCWZE
2017-08-17 11:06:12 -04:00
Kartikaya Gupta 5f82d0a311 Bug 1370682 - Send DisplayItemClip's RoundedRect clips to WR. r=mstange
This was spot-tested by taking the
layout/reftests/border-radius-clipping-1.html testcase, removing the
border, and fiddling with the border-radius values. Without this patch,
the div always appears with rectangular corners but with this patch the
border-radius value is respected correctly.

MozReview-Commit-ID: 1wBFnJnYCwC
2017-08-10 14:00:08 -04:00
Sebastian Hengst 27012f5a0b Backed out changeset 972371dc461b (bug 1370682) 2017-08-10 18:28:55 +02:00
Kartikaya Gupta 52b2499d2b Bug 1370682 - Send DisplayItemClip's RoundedRect clips to WR. r=mstange
This was spot-tested by taking the
layout/reftests/border-radius-clipping-1.html testcase, removing the
border, and fiddling with the border-radius values. Without this patch,
the div always appears with rectangular corners but with this patch the
border-radius value is respected correctly.

MozReview-Commit-ID: Cu1K3rLjm0V
2017-08-09 19:19:03 -04:00
Kartikaya Gupta e380452682 Bug 1386483 - Push, push, push the clips, caching all the way. r=jrmuizel,mstange
This patch ensures that we push clips in WR for each display item,
reflecting the display item's clip chain as computed in Gecko. A display
item will often share part or most of its clip chain with other display
items, so we try to reuse the corresponding WR clip ids as much as we
can instead of defining new duplicated clips.

MozReview-Commit-ID: LkBh8LIpQ4J
2017-08-08 15:43:29 -04:00
Kartikaya Gupta 0e93a34ba6 Bug 1386483 - Split the wr_dp_push_clip method into two to allow reusing clips. r=jrmuizel
MozReview-Commit-ID: 90BEJGs8wGg
2017-08-08 15:43:17 -04:00
Ryan Hunt ed849c9399 Bug 1382128 part 2 - Remove WrPoint, WrSize, WrRect, WrMatrix, and WrColor. r=kats
MozReview-Commit-ID: 9koNScu4CyE
2017-07-18 18:32:46 -04:00
Ryan Hunt 9c7583cc1a Bug 1382128 part 1 - Use a namespace in webrender_bindings. r=kats
MozReview-Commit-ID: 3JTMa9Ix5S7
2017-06-27 19:20:36 -04:00
Kartikaya Gupta 879c371239 Bug 1373349 - Correct the origin of the content rect when creating scroll layers in WR. r=botond,jrmuizel
Also tweaks the documentation in FrameMetrics.h to be more detailed and
less misleading.

MozReview-Commit-ID: 183V2Q9kY6C
2017-06-15 15:35:04 -04:00
Kartikaya Gupta 4319fc489e Bug 1372912 - Place the layer local clip in the right spot for fixed-pos layers. r=mrobinson
This patch makes the bg-fixed-child-mask.html reftest pass by ensuring
the clips for the test case are all in the correct spots. See the
comments in the patch for a more detailed explanation.

MozReview-Commit-ID: 21MAHr0PJ9B
2017-06-15 17:02:22 -04:00
Kartikaya Gupta 1d226771e5 Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: JriIfpECHe7
2017-06-15 17:02:20 -04:00
Kartikaya Gupta c654106c64 Bug 1372912 - Push clips for all the scroll metadata scrollclips. r=jrmuizel
Each layer has a stack of scroll metadata objects, which represent the
set of scrollframes that got flattened into the layer. Effectively the
metadata objects provide the scroll information for the chain of
scrollframes containing that layer's content. Each of these scrollframes
may have a clip, and so we need to push those clips to WR. We need to
take care to insert these clips at the right point in the stack, so that
they are interleaved correctly with the PushScrollLayer calls that we
use to inform WR of the scrolling clips for the scrollframes. This patch
implements this behaviour.

MozReview-Commit-ID: HD3OO5TZHSr
2017-06-15 17:02:18 -04:00
Kartikaya Gupta a0184958e6 Bug 1372912 - Extract a PushLayerClip helper method. r=jrmuizel
No functional changes. We'll want to reuse this code in a future patch.

MozReview-Commit-ID: LEuP38yXBHI
2017-06-15 17:02:12 -04:00
Sebastian Hengst e4b363e388 Backed out changeset 2b883786cf01 (bug 1372912) for bustage at ScrollingLayersHelper.h:19: class 'LayerClip' was previously declared as a struct. r=backout 2017-06-15 22:59:51 +02:00
Sebastian Hengst e6d2ddc350 Backed out changeset 6f148794682a (bug 1372912) 2017-06-15 22:59:01 +02:00
Sebastian Hengst 1585a84193 Backed out changeset 8176859f8b70 (bug 1372912) 2017-06-15 22:58:57 +02:00
Sebastian Hengst b13b4f7be3 Backed out changeset 18c0e82c745f (bug 1372912) 2017-06-15 22:58:52 +02:00
Kartikaya Gupta 8b6a6d8dc2 Bug 1372912 - Place the layer local clip in the right spot for fixed-pos layers. r=mrobinson
This patch makes the bg-fixed-child-mask.html reftest pass by ensuring
the clips for the test case are all in the correct spots. See the
comments in the patch for a more detailed explanation.

MozReview-Commit-ID: 5HHtsSkcsji
2017-06-15 09:41:47 -04:00
Kartikaya Gupta d8fb074f27 Bug 1372912 - Make the clip id more strongly typed. r=jrmuizel,mrobinson
This patch is not really needed, but it avoids accidental conversion
between FrameMetrics::ViewID (which represents a scrolling clip) and a
uint64_t id for a non-scrolling clip.

MozReview-Commit-ID: BU7p4WNocXa
2017-06-15 09:41:46 -04:00
Kartikaya Gupta 86861f993c Bug 1372912 - Push clips for all the scroll metadata scrollclips. r=jrmuizel
Each layer has a stack of scroll metadata objects, which represent the
set of scrollframes that got flattened into the layer. Effectively the
metadata objects provide the scroll information for the chain of
scrollframes containing that layer's content. Each of these scrollframes
may have a clip, and so we need to push those clips to WR. We need to
take care to insert these clips at the right point in the stack, so that
they are interleaved correctly with the PushScrollLayer calls that we
use to inform WR of the scrolling clips for the scrollframes. This patch
implements this behaviour.

MozReview-Commit-ID: BayxnZuqh4s
2017-06-15 09:41:46 -04:00
Kartikaya Gupta de50adf4fb Bug 1372912 - Extract a PushLayerClip helper method. r=jrmuizel
No functional changes. We'll want to reuse this code in a future patch.

MozReview-Commit-ID: 1nrMuS9n8A5
2017-06-15 09:41:46 -04:00
Kartikaya Gupta fd56df36d9 Bug 1372603 - Remove unused functions and parameters. r=jrmuizel
MozReview-Commit-ID: 1DUBPEcCe2u
2017-06-14 15:43:16 -04:00
Kartikaya Gupta 0f55c95b56 Bug 1372603 - Make sure the mask rect is relative to the enclosing stacking context. r=jrmuizel
This ensures that for layers with both transforms and mask layers, the
mask layer is properly positioned outside of the transform and relative
to the proper stacking context.

MozReview-Commit-ID: 79yvhxQCykW
2017-06-14 15:43:16 -04:00
Kartikaya Gupta 9ad40e6fb9 Bug 1372603 - Push the layer's local clip rect outside the stacking context. r=jrmuizel
For various reasons, we want to be pushing the layer's local clip rect
outside of the stacking context rather than inside it. Not only is this
more correct with respect to the semantics of the layer tree, we also
need it in order to properly handle fixed-positioning of layers with
async scrolling.

This patch does the bulk of the work to make this happen. Most of the code
in the individual layer classes to process the layer's local clip rect
is removed, and instead a function in ScrollingLayersHelper is added to
deal with it. There are a couple of places that individual layer classes
still handle this but those will be removed in future patches. Note that
the individual layer classes still need to provide a clip rect of some
sort in order to push their display items, and now they simply use their
visible region bounds for this purpose.

MozReview-Commit-ID: IBmfUdJwYx1
2017-06-14 15:43:16 -04:00
Kartikaya Gupta e28e57cbe5 Bug 1368496 - Add support for fixed-positioning with APZ. r=jrmuizel
This implements at least enough fixed-positioning support to make the
reftest in layout/reftests/async-scrolling/bg-fixed-child.html pass.
That test implements a simple background-attachment:fixed which is
implemented in the layer tree with a combination of a scrolled clip and
a fixed-position layer. Previous patches in this patchset implemented
support for the scrolled clip, and this patch implements the
fixed-position layer support.

MozReview-Commit-ID: 1Al1YshhUL7
2017-06-08 11:34:01 -04:00
Kartikaya Gupta 72099efd64 Bug 1368496 - Propagate the layer's "scrolled clip" to WebRender. r=jrmuizel
If the layer has a "scrolled clip", that clip scrolls with the content
of the layers (it moves if any of the scrollable frames defined by that
layer are scrolled).

MozReview-Commit-ID: 37hvXWO930f
2017-06-08 11:34:00 -04:00
Kartikaya Gupta e67d0fff1a Bug 1368496 - Skip over scrollinfo layers instead of aborting entirely. r=jrmuizel
MozReview-Commit-ID: 5pYcurXfAf
2017-06-08 11:34:00 -04:00
Kartikaya Gupta 6ec8cc4d06 Bug 1368487 - Fix content rect passed to scroll layers to be relative to the right thing. r=jrmuizel
MozReview-Commit-ID: 1mbVLqp9o2R
2017-05-29 11:40:58 -04:00
Kartikaya Gupta cc1457011b Bug 1361497 - Push scrolling clips for scrollable layers in the layer tree. r=jrmuizel
This adds an RAII helper and uses it in RenderLayer functions. When APZ
is enabled, the RAII helper pushes a scrolling clip for each scrollable
metrics on the layer. It also pops off the scrolling clips on
destruction. Note that this should happen before any other things are
pushed into the WR display list for the rendering of a layer, since
those things should be subjected to the enclosing scrolling clips.
If APZ is disabled, this skips pushing the scrolling clips.

MozReview-Commit-ID: 1qv9egKbbok
2017-05-12 13:58:15 -04:00