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

Unified Diff: third_party/WebKit/Source/core/animation/WorkletAnimationBase.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/animation/WorkletAnimationBase.h
diff --git a/third_party/WebKit/Source/core/animation/WorkletAnimationBase.h b/third_party/WebKit/Source/core/animation/WorkletAnimationBase.h
new file mode 100644
index 0000000000000000000000000000000000000000..aa9850ef79b8345769e90f385b077392ccfac4b3
--- /dev/null
+++ b/third_party/WebKit/Source/core/animation/WorkletAnimationBase.h
@@ -0,0 +1,31 @@
+// 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.
+
+#ifndef WorkletAnimationBase_h
+#define WorkletAnimationBase_h
+
+#include "core/CoreExport.h"
+#include "platform/heap/GarbageCollected.h"
+
+namespace blink {
+
+class CORE_EXPORT WorkletAnimationBase
+ : public GarbageCollectedFinalized<WorkletAnimationBase> {
+ public:
+ virtual ~WorkletAnimationBase() {}
+
+ // Attempts to start the animation on the compositor side, returning true if
+ // it succeeds or false otherwise.
+ //
+ // On a false return it may still be possible to start the animation on the
+ // compositor later (e.g. if an incompatible property is removed from the
+ // element), so the caller should try again next main frame.
+ virtual bool StartOnCompositor() = 0;
+
+ DEFINE_INLINE_VIRTUAL_TRACE() {}
+};
+
+} // namespace blink
+
+#endif // WorkletAnimationBase_h

Powered by Google App Engine
This is Rietveld 408576698