Bug 1325022 - Pass layers::Animation data to WebRenderBridgeParent, r=gfx?

MozReview-Commit-ID: 7M3aXiEGCfL
This commit is contained in:
peter chang 2017-01-19 10:33:02 +08:00
parent ee383fa898
commit 3af2e6fed0
8 changed files with 43 additions and 7 deletions

View File

@ -28,6 +28,7 @@ struct OpDPPushStackingContext {
WrRect bounds;
WrRect overflow;
MaybeImageMask mask;
Animation[] animations;
Matrix4x4 matrix;
uint64_t scrollid;
};

View File

@ -34,7 +34,12 @@ WebRenderBorderLayer::RenderLayer()
Rect overflow(0, 0, relBounds.width, relBounds.height);
Matrix4x4 transform;// = GetTransform();
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), Nothing(), transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
Nothing(),
GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
WrBridge()->AddWebRenderCommand(
OpDPPushBorder(wr::ToWrRect(rect), wr::ToWrRect(clip),

View File

@ -78,7 +78,12 @@ WebRenderCanvasLayer::RenderLayer()
WrTextureFilter filter = (mFlags | TextureFlags::USE_NEAREST_FILTER) ? WrTextureFilter::Point : WrTextureFilter::Linear;
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), mask, transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
mask,
GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
WrBridge()->AddWebRenderCommand(OpDPPushExternalImageId(LayerIntRegion(), wr::ToWrRect(rect), wr::ToWrRect(clip), Nothing(), filter, mExternalImageId));
WrBridge()->AddWebRenderCommand(OpDPPopStackingContext());

View File

@ -36,7 +36,12 @@ WebRenderColorLayer::RenderLayer()
Maybe<WrImageMask> mask = buildMaskLayer();
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), mask, transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
mask,
GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
WrBridge()->AddWebRenderCommand(
OpDPPushRect(wr::ToWrRect(rect), wr::ToWrRect(clip), mColor.r, mColor.g, mColor.b, mColor.a));

View File

@ -27,7 +27,12 @@ WebRenderContainerLayer::RenderLayer()
Maybe<WrImageMask> mask = buildMaskLayer();
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), mask, transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
mask,
GetLayer()->GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
for (LayerPolygon& child : children) {
if (child.layer->IsBackfaceHidden()) {
continue;

View File

@ -144,7 +144,12 @@ WebRenderImageLayer::RenderLayer()
WrTextureFilter filter = (mSamplingFilter == gfx::SamplingFilter::POINT) ? WrTextureFilter::Point : WrTextureFilter::Linear;
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), mask, transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
mask,
GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
WrBridge()->AddWebRenderCommand(OpDPPushExternalImageId(LayerIntRegion(), wr::ToWrRect(rect), wr::ToWrRect(clip), Nothing(), filter, mExternalImageId));
WrBridge()->AddWebRenderCommand(OpDPPopStackingContext());

View File

@ -158,7 +158,12 @@ WrScrollFrameStackingContextGenerator::WrScrollFrameStackingContextGenerator(
}
mLayer->WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(bounds), wr::ToWrRect(overflow), Nothing(), identity, fm.GetScrollId()));
OpDPPushStackingContext(wr::ToWrRect(bounds),
wr::ToWrRect(overflow),
Nothing(),
layer->GetAnimations(),
identity,
fm.GetScrollId()));
}
}

View File

@ -145,7 +145,12 @@ WebRenderPaintedLayer::RenderLayer()
Matrix4x4 transform;// = GetTransform();
WrBridge()->AddWebRenderCommand(
OpDPPushStackingContext(wr::ToWrRect(relBounds), wr::ToWrRect(overflow), mask, transform, FrameMetrics::NULL_SCROLL_ID));
OpDPPushStackingContext(wr::ToWrRect(relBounds),
wr::ToWrRect(overflow),
mask,
GetAnimations(),
transform,
FrameMetrics::NULL_SCROLL_ID));
ContentClientRemoteBuffer* contentClientRemote = static_cast<ContentClientRemoteBuffer*>(mContentClient.get());
visibleRegion.MoveBy(-contentClientRemote->BufferRect().x, -contentClientRemote->BufferRect().y);