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

Side by Side Diff: third_party/WebKit/Source/core/animation/WorkletAnimationController.cpp

Issue 2869183002: Initial implementation of WorkletAnimation (Closed)
Patch Set: DCHECK for threaded animation support 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "core/animation/WorkletAnimationController.h"
6
7 #include "core/animation/WorkletAnimationBase.h"
8
9 namespace blink {
10
11 WorkletAnimationController::WorkletAnimationController() {}
12
13 WorkletAnimationController::~WorkletAnimationController() {}
14
15 void WorkletAnimationController::RegisterAnimation(
16 WorkletAnimationBase* animation) {
17 animations_.insert(animation);
majidvp 2017/06/06 16:04:27 nit: may be a good idea to add a DCHECK for animat
smcgruer 2017/06/07 18:23:24 Done.
18 }
19
20 void WorkletAnimationController::DeregisterAnimation(
21 WorkletAnimationBase* animation) {
22 animations_.erase(animation);
23 }
24
25 void WorkletAnimationController::Update() {
26 for (const auto& animation : animations_) {
27 animation->Update();
28 }
29 }
30
31 DEFINE_TRACE(WorkletAnimationController) {
32 visitor->Trace(animations_);
33 }
34
35 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698