| Index: cc/animation/layer_tree_mutator.h
|
| diff --git a/cc/animation/layer_tree_mutator.h b/cc/animation/layer_tree_mutator.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..45fbb39b52e16ded3e5fce89883660f2b0e338c2
|
| --- /dev/null
|
| +++ b/cc/animation/layer_tree_mutator.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright 2015 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 CC_ANIMATION_LAYER_TREE_MUTATOR_H_
|
| +#define CC_ANIMATION_LAYER_TREE_MUTATOR_H_
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/time/time.h"
|
| +
|
| +#include "cc/animation/layer_tree_mutations.h"
|
| +
|
| +namespace cc {
|
| +
|
| +class LayerTreeImpl;
|
| +
|
| +class LayerTreeMutatorClient {
|
| + public:
|
| + // This is necessary because it forces an impl frame. We couldn't, for
|
| + // example, just assume that we will "always mutate" and early-out in the
|
| + // mutator if there was nothing to do because we won't always be producing
|
| + // impl frames.
|
| + virtual void SetNeedsMutate() = 0;
|
| +};
|
| +
|
| +class LayerTreeMutator {
|
| + public:
|
| + virtual ~LayerTreeMutator() {}
|
| +
|
| + // Returns true if the mutator should be rescheduled.
|
| + virtual bool Mutate(base::TimeTicks now, LayerTreeImpl* state) = 0;
|
| + virtual void SetClient(LayerTreeMutatorClient* client) = 0;
|
| + virtual scoped_ptr<LayerTreeMutations> TakeMutations() = 0;
|
| +};
|
| +
|
| +} // namespace cc
|
| +
|
| +#endif // CC_ANIMATION_LAYER_TREE_MUTATOR_H_
|
|
|