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

Unified 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, 7 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
« no previous file with comments | « no previous file | cc/test/fake_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/animation/layer_tree_mutator.h
diff --git a/cc/animation/layer_tree_mutator.h b/cc/animation/layer_tree_mutator.h
index d367e268e006b330868eebe2c12f5b29bcc0bd35..c7b9292c7a239ead0e60b5e5971a097597e5b9f2 100644
--- a/cc/animation/layer_tree_mutator.h
+++ b/cc/animation/layer_tree_mutator.h
@@ -6,14 +6,30 @@
#define CC_ANIMATION_LAYER_TREE_MUTATOR_H_
#include "base/callback_forward.h"
+#include "base/time/time.h"
#include "cc/base/cc_export.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 CC_EXPORT LayerTreeMutator {
public:
virtual ~LayerTreeMutator() {}
+ // Returns true if the mutator should be rescheduled.
+ virtual bool Mutate(base::TimeTicks now) = 0;
+ virtual void SetClient(LayerTreeMutatorClient* client) = 0;
+
// Returns a callback which is responsible for applying layer tree mutations
// to DOM elements.
virtual base::Closure TakeMutations() = 0;
« 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