Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp

Issue 2869183002: Initial implementation of WorkletAnimation (Closed)
Patch Set: Rebase Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp
diff --git a/third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp b/third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e943d3e1f459bd43255034d756e2c733d31ef83f
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp
@@ -0,0 +1,35 @@
+// Copyright 2017 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/WorkletAnimationController.h"
+
+#include "core/animation/WorkletAnimationBase.h"
+
+namespace blink {
+
+WorkletAnimationController::WorkletAnimationController() {}
+
+WorkletAnimationController::~WorkletAnimationController() {}
+
+void WorkletAnimationController::RegisterAnimation(
+ WorkletAnimationBase* animation) {
+ animations_.insert(animation);
+}
+
+void WorkletAnimationController::DeregisterAnimation(
+ WorkletAnimationBase* animation) {
+ animations_.erase(animation);
+}
+
+void WorkletAnimationController::Update() {
+ for (const auto& animation : animations_) {
+ animation->Update();
+ }
+}
+
+DEFINE_TRACE(WorkletAnimationController) {
+ visitor->Trace(animations_);
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698