зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1372603 - Remove the duplicated clip from WebRenderDisplayItemLayer. r=jrmuizel
Since part 1 of this patch set pushed the layer's local clip as part of the code in ScrollingLayersHelper, it is no longer needed in the WebRenderDisplayItemLayer (it is effectively duplicated). MozReview-Commit-ID: F2HFsx3XI9M --HG-- extra : rebase_source : 5dfcecb649376d6958760e4e95cd025d01f3124c
This commit is contained in:
Родитель
367cc282d0
Коммит
4b9fbd6d4d
|
@ -40,29 +40,6 @@ WebRenderDisplayItemLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
|
||||||
|
|
||||||
ScrollingLayersHelper scroller(this, aBuilder, aSc);
|
ScrollingLayersHelper scroller(this, aBuilder, aSc);
|
||||||
|
|
||||||
Maybe<WrImageMask> mask = BuildWrMaskLayer(aSc, nullptr);
|
|
||||||
WrImageMask* imageMask = mask.ptrOr(nullptr);
|
|
||||||
|
|
||||||
ParentLayerRect clip = GetLocalTransformTyped().TransformBounds(Bounds());
|
|
||||||
|
|
||||||
// As with WebRenderTextLayer, I'm not 100% sure this is correct, but I
|
|
||||||
// think it is. Because we don't push a stacking context for this layer,
|
|
||||||
// WR doesn't know about the transform on this layer. The display items
|
|
||||||
// that we push as part of this layer already take the transform into
|
|
||||||
// account. When we set the clip rect we also need to explicitly apply
|
|
||||||
// the transform to make sure it gets taken into account.
|
|
||||||
// In a sense this is the opposite of what WebRenderLayer::ClipRect() does,
|
|
||||||
// because there we remove the transform from the clip rect to bring it
|
|
||||||
// into the coordinate space of the local stacking context, but here we
|
|
||||||
// need to apply the transform to the bounds to take it into the coordinate
|
|
||||||
// space of the enclosing stacking context.
|
|
||||||
// The conversion from ParentLayerPixel to LayerPixel below is a result of
|
|
||||||
// changing the reference layer from "this layer" to the "the layer that
|
|
||||||
// created aSc".
|
|
||||||
LayerRect clipInParentLayerSpace = ViewAs<LayerPixel>(clip,
|
|
||||||
PixelCastJustification::MovingDownToChildren);
|
|
||||||
aBuilder.PushClip(aSc.ToRelativeWrRect(clipInParentLayerSpace), imageMask);
|
|
||||||
|
|
||||||
if (mItem) {
|
if (mItem) {
|
||||||
WrSize contentSize; // this won't actually be used by anything
|
WrSize contentSize; // this won't actually be used by anything
|
||||||
wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
|
wr::DisplayListBuilder builder(WrBridge()->GetPipeline(), contentSize);
|
||||||
|
@ -86,8 +63,6 @@ WebRenderDisplayItemLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
|
||||||
|
|
||||||
aBuilder.PushBuiltDisplayList(Move(mBuiltDisplayList));
|
aBuilder.PushBuiltDisplayList(Move(mBuiltDisplayList));
|
||||||
WrBridge()->AddWebRenderParentCommands(mParentCommands);
|
WrBridge()->AddWebRenderParentCommands(mParentCommands);
|
||||||
|
|
||||||
aBuilder.PopClip();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Maybe<wr::ImageKey>
|
Maybe<wr::ImageKey>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче