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

Side by Side Diff: cc/animation/layer_tree_mutator.h

Issue 1895873006: compositor-worker: Initialize CW machinery plumbing to compositor and fire CW rAF callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include WebCompositorMutatorClient from WebLayerTreeView to allow unique_ptr usage. Created 4 years, 6 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
« no previous file with comments | « no previous file | cc/test/fake_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_ANIMATION_LAYER_TREE_MUTATOR_H_ 5 #ifndef CC_ANIMATION_LAYER_TREE_MUTATOR_H_
6 #define CC_ANIMATION_LAYER_TREE_MUTATOR_H_ 6 #define CC_ANIMATION_LAYER_TREE_MUTATOR_H_
7 7
8 #include "base/callback_forward.h" 8 #include "base/callback_forward.h"
9 #include "base/time/time.h"
9 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
10 11
11 namespace cc { 12 namespace cc {
12 13
14 class LayerTreeImpl;
15
16 class LayerTreeMutatorClient {
17 public:
18 // This is necessary because it forces an impl frame. We couldn't, for
19 // example, just assume that we will "always mutate" and early-out in the
20 // mutator if there was nothing to do because we won't always be producing
21 // impl frames.
22 virtual void SetNeedsMutate() = 0;
23 };
24
13 class CC_EXPORT LayerTreeMutator { 25 class CC_EXPORT LayerTreeMutator {
14 public: 26 public:
15 virtual ~LayerTreeMutator() {} 27 virtual ~LayerTreeMutator() {}
16 28
29 // Returns true if the mutator should be rescheduled.
30 virtual bool Mutate(base::TimeTicks now) = 0;
31 virtual void SetClient(LayerTreeMutatorClient* client) = 0;
32
17 // Returns a callback which is responsible for applying layer tree mutations 33 // Returns a callback which is responsible for applying layer tree mutations
18 // to DOM elements. 34 // to DOM elements.
19 virtual base::Closure TakeMutations() = 0; 35 virtual base::Closure TakeMutations() = 0;
20 }; 36 };
21 37
22 } // namespace cc 38 } // namespace cc
23 39
24 #endif // CC_ANIMATION_LAYER_TREE_MUTATOR_H_ 40 #endif // CC_ANIMATION_LAYER_TREE_MUTATOR_H_
OLDNEW
« no previous file with comments | « no previous file | cc/test/fake_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698