зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1345017 - pass animation data from content to WebRenderBridgeParent, r=kats
MozReview-Commit-ID: 7p5ocyr1ywV
This commit is contained in:
Родитель
9945c16d87
Коммит
2fdfc8c722
|
@ -37,9 +37,14 @@ struct OpAddExternalImage {
|
|||
ImageKey key;
|
||||
};
|
||||
|
||||
struct OpAddCompositorAnimations {
|
||||
CompositorAnimations data;
|
||||
};
|
||||
|
||||
union WebRenderParentCommand {
|
||||
OpAddExternalImage;
|
||||
CompositableOperation;
|
||||
OpAddCompositorAnimations;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "GLContext.h"
|
||||
#include "GLContextProvider.h"
|
||||
#include "mozilla/Range.h"
|
||||
#include "mozilla/layers/AnimationHelper.h"
|
||||
#include "mozilla/layers/Compositor.h"
|
||||
#include "mozilla/layers/CompositorBridgeParent.h"
|
||||
#include "mozilla/layers/CompositorThread.h"
|
||||
|
@ -415,6 +416,19 @@ WebRenderBridgeParent::ProcessWebRenderCommands(const gfx::IntSize &aSize,
|
|||
}
|
||||
break;
|
||||
}
|
||||
case WebRenderParentCommand::TOpAddCompositorAnimations: {
|
||||
const OpAddCompositorAnimations& op = cmd.get_OpAddCompositorAnimations();
|
||||
CompositorAnimations data(Move(op.data()));
|
||||
if (data.animations().Length()) {
|
||||
uint64_t id = mWidget ? 0 : mPipelineId.mHandle;
|
||||
CompositorAnimationStorage* storage =
|
||||
mCompositorBridge->GetAnimationStorage(id);
|
||||
if (storage) {
|
||||
storage->SetAnimations(data.id(), data.animations());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
// other commands are handle on the child
|
||||
break;
|
||||
|
|
|
@ -37,12 +37,19 @@ WebRenderContainerLayer::RenderLayer(wr::DisplayListBuilder& aBuilder)
|
|||
}
|
||||
aBuilder.PushStackingContext(wr::ToWrRect(relBounds),
|
||||
GetLocalOpacity(),
|
||||
//GetLayer()->GetAnimations(),
|
||||
transform,
|
||||
mixBlendMode);
|
||||
aBuilder.PushScrollLayer(wr::ToWrRect(overflow),
|
||||
wr::ToWrRect(overflow),
|
||||
mask.ptrOr(nullptr));
|
||||
|
||||
if (GetCompositorAnimationsId()) {
|
||||
CompositorAnimations anim;
|
||||
anim.animations() = GetAnimations();
|
||||
anim.id() = GetCompositorAnimationsId();
|
||||
WrBridge()->AddWebRenderParentCommand(OpAddCompositorAnimations(anim));
|
||||
}
|
||||
|
||||
for (LayerPolygon& child : children) {
|
||||
if (child.layer->IsBackfaceHidden()) {
|
||||
continue;
|
||||
|
|
Загрузка…
Ссылка в новой задаче