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

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

Issue 2869183002: Initial implementation of WorkletAnimation (Closed)
Patch Set: Add more DCHECKs Created 3 years, 3 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 #ifndef WorkletAnimationController_h
6 #define WorkletAnimationController_h
7
8 #include "core/CoreExport.h"
9 #include "platform/heap/GarbageCollected.h"
10 #include "platform/heap/HeapAllocator.h"
11 #include "platform/heap/Visitor.h"
12
13 namespace blink {
14
15 class WorkletAnimationBase;
16
17 // Handles AnimationWorklet animations on the main-thread.
18 //
19 // The WorkletAnimationController is responsible for owning WorkletAnimation
20 // instances are long as they are relevant to the animation system. It is also
21 // responsible for starting valid WorkletAnimations on the compositor side and
22 // updating WorkletAnimations with updated results from their underpinning
23 // AnimationWorklet animator instance.
24 //
25 // For more details on AnimationWorklet, see the spec:
26 // https://wicg.github.io/animation-worklet
27 class CORE_EXPORT WorkletAnimationController
28 : public GarbageCollectedFinalized<WorkletAnimationController> {
29 public:
30 WorkletAnimationController();
31 virtual ~WorkletAnimationController();
32
33 void AttachAnimation(WorkletAnimationBase&);
34 void DetachAnimation(WorkletAnimationBase&);
35
36 void Update();
37
38 DECLARE_TRACE();
39
40 private:
41 HeapHashSet<Member<WorkletAnimationBase>> pending_animations_;
42 HeapHashSet<Member<WorkletAnimationBase>> compositor_animations_;
43 };
44
45 } // namespace blink
46
47 #endif // WorkletAnimationController_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698