OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 CC_ANIMATION_LAYER_TREE_MUTATOR_H_ |
| 6 #define CC_ANIMATION_LAYER_TREE_MUTATOR_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/time/time.h" |
| 10 |
| 11 #include "cc/animation/layer_tree_mutations.h" |
| 12 |
| 13 namespace cc { |
| 14 |
| 15 class LayerTreeImpl; |
| 16 |
| 17 class LayerTreeMutatorClient { |
| 18 public: |
| 19 // This is necessary because it forces an impl frame. We couldn't, for |
| 20 // example, just assume that we will "always mutate" and early-out in the |
| 21 // mutator if there was nothing to do because we won't always be producing |
| 22 // impl frames. |
| 23 virtual void SetNeedsMutate() = 0; |
| 24 }; |
| 25 |
| 26 class LayerTreeMutator { |
| 27 public: |
| 28 virtual ~LayerTreeMutator() {} |
| 29 |
| 30 // Returns true if the mutator should be rescheduled. |
| 31 virtual bool Mutate(base::TimeTicks now, LayerTreeImpl* state) = 0; |
| 32 virtual void SetClient(LayerTreeMutatorClient* client) = 0; |
| 33 virtual scoped_ptr<LayerTreeMutations> TakeMutations() = 0; |
| 34 }; |
| 35 |
| 36 } // namespace cc |
| 37 |
| 38 #endif // CC_ANIMATION_LAYER_TREE_MUTATOR_H_ |
OLD | NEW |