Bug 1360246 - Clean up WebRenderRefLayer::RenderLayer. r=nical

This cleans up WebRenderRefLayer::RenderLayer to use typed coordinate
systems and the StackingContextHelper. Note that this patch contains a
functional change, because the clip rect pushed no longer includes the
transform on the ref layer itself. It's not clear to me why we were doing
that, and didn't seem correct.

MozReview-Commit-ID: K7FoeLnXc56
This commit is contained in:
Kartikaya Gupta 2017-05-03 08:48:07 -04:00
Родитель 55a7794c28
Коммит eb38bf66c1
1 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -109,20 +109,11 @@ void
WebRenderRefLayer::RenderLayer(wr::DisplayListBuilder& aBuilder,
const StackingContextHelper& aSc)
{
gfx::Matrix4x4 transform;// = GetTransform();
gfx::Rect relBounds = TransformedVisibleBoundsRelativeToParent();
LayerRect rect = Bounds();
DumpLayerInfo("RefLayer", rect);
WrClipRegion clipRegion = aBuilder.BuildClipRegion(wr::ToWrRect(relBounds));
if (gfxPrefs::LayersDump()) {
printf_stderr("RefLayer %p (%" PRIu64 ") using bounds/overflow=%s, transform=%s\n",
this->GetLayer(),
mId,
Stringify(relBounds).c_str(),
Stringify(transform).c_str());
}
aBuilder.PushIFrame(wr::ToWrRect(relBounds), clipRegion, wr::AsPipelineId(mId));
WrClipRegion clipRegion = aBuilder.BuildClipRegion(aSc.ToRelativeWrRect(rect));
aBuilder.PushIFrame(aSc.ToRelativeWrRect(rect), clipRegion, wr::AsPipelineId(mId));
}
} // namespace layers