| 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 #ifndef WorkletAnimationBase_h |
| 6 #define WorkletAnimationBase_h |
| 7 |
| 8 #include "core/CoreExport.h" |
| 9 #include "platform/heap/GarbageCollected.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class CORE_EXPORT WorkletAnimationBase |
| 14 : public GarbageCollectedFinalized<WorkletAnimationBase> { |
| 15 public: |
| 16 virtual ~WorkletAnimationBase() {} |
| 17 |
| 18 // Attempts to start the animation on the compositor side, returning true if |
| 19 // it succeeds or false otherwise. |
| 20 // |
| 21 // On a false return it may still be possible to start the animation on the |
| 22 // compositor later (e.g. if an incompatible property is removed from the |
| 23 // element), so the caller should try again next main frame. |
| 24 virtual bool StartOnCompositor() = 0; |
| 25 |
| 26 DEFINE_INLINE_VIRTUAL_TRACE() {} |
| 27 }; |
| 28 |
| 29 } // namespace blink |
| 30 |
| 31 #endif // WorkletAnimationBase_h |
| OLD | NEW |