Bug 1389139 - Add transforms for reflayer equivalents in the layers-free APZ world. r=jrmuizel

In normal gecko, RefLayer instances also have a transform, which needs
to be propagated to APZ in layers-free mode.

MozReview-Commit-ID: DaEyvpumG9F

--HG--
extra : rebase_source : 694dea8bdaa5a40cf52b2d3e99fdd4c335b6012c
This commit is contained in:
Kartikaya Gupta 2017-08-16 12:50:37 -04:00
Родитель cb97ff3374
Коммит 309c1ac3b0
2 изменённых файлов: 5 добавлений и 1 удалений

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

@ -390,9 +390,11 @@ nsDisplayRemote::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuild
{
MOZ_ASSERT(aManager->IsLayersFreeTransaction());
mOffset = mozilla::layout::GetContentRectLayerOffset(mFrame, aDisplayListBuilder);
mozilla::LayoutDeviceRect visible = mozilla::LayoutDeviceRect::FromAppUnits(
GetVisibleRect(), mFrame->PresContext()->AppUnitsPerDevPixel());
visible += mozilla::layout::GetContentRectLayerOffset(mFrame, aDisplayListBuilder);
visible += mOffset;
aBuilder.PushIFrame(aSc.ToRelativeLayoutRect(visible),
mozilla::wr::AsPipelineId(GetRemoteLayersId()));
@ -406,6 +408,7 @@ nsDisplayRemote::UpdateScrollData(mozilla::layers::WebRenderScrollData* aData,
{
if (aLayerData) {
aLayerData->SetReferentId(GetRemoteLayersId());
aLayerData->SetTransform(mozilla::gfx::Matrix4x4::Translation(mOffset.x, mOffset.y, 0.0));
}
return true;
}

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

@ -175,6 +175,7 @@ public:
private:
RenderFrameParent* mRemoteFrame;
mozilla::LayoutDeviceIntPoint mOffset;
mozilla::layers::EventRegionsOverride mEventRegionsOverride;
};