Index: third_party/WebKit/Source/core/animation/CustomCompositorAnimationManager.cpp |
diff --git a/third_party/WebKit/Source/core/animation/CustomCompositorAnimationManager.cpp b/third_party/WebKit/Source/core/animation/CustomCompositorAnimationManager.cpp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3e1df6acfbd79d63b7f36d6c3dc1f08070fd9a16 |
--- /dev/null |
+++ b/third_party/WebKit/Source/core/animation/CustomCompositorAnimationManager.cpp |
@@ -0,0 +1,28 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "core/animation/CustomCompositorAnimationManager.h" |
+ |
+#include "core/dom/DOMNodeIds.h" |
+#include "core/dom/Element.h" |
+#include "core/dom/Node.h" |
+#include "platform/TraceEvent.h" |
+#include "platform/graphics/CompositorMutation.h" |
+ |
+namespace blink { |
+ |
+void CustomCompositorAnimationManager::applyMutations(const CompositorMutations& mutations) |
+{ |
+ TRACE_EVENT0("compositor-worker", "CustomCompositorAnimationManager::applyMutations"); |
+ for (const auto& entry : mutations.map) { |
+ int elementId = entry.key; |
+ const CompositorMutation& mutation = *entry.value; |
+ Node* node = DOMNodeIds::nodeForId(elementId); |
+ if (!node || !toElement(node)) |
+ continue; |
+ toElement(node)->updateFromCompositorMutation(mutation); |
+ } |
+} |
+ |
+} // namespace blink |