Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 | |
| OLD | NEW |