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

Unified Diff: cc/trees/layer_tree_host_common.h

Issue 1014993002: [exp] cc: Introduce cc::CompositorMutator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
Index: cc/trees/layer_tree_host_common.h
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 88197da329b7dc34dc2644aea5959a8545a83891..387138c163f100099668d7823820b2d4b0d930ad 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -23,6 +23,40 @@ class LayerImpl;
class Layer;
class SwapPromise;
+enum class MutationProperty {
+ MUTATION_PROPERTY_TRANSFORM = 1,
+ MUTATION_PROPERTY_OPACITY,
+};
+
+union MutationValue {
+ struct {
+ int old_value;
+ int new_value;
+ } i;
+
+ struct {
+ float old_value;
+ float new_value;
+ } f;
+};
+
+struct Mutation {
+ Mutation();
+ ~Mutation();
+
+ int proxy_id;
+ int mutated_properties;
loyso (OOO) 2015/03/20 02:38:14 Could you elaborate how we refer/identify properti
+ std::vector<MutationValue> mutated_values;
+};
+
+class CompositorMutator {
+ public:
+ virtual ~CompositorMutator() {}
+
+ virtual void ApplyCustomMutations(base::TimeTicks monotonic_time,
+ const std::vector<Mutation>& mutations) = 0;
+};
+
class CC_EXPORT LayerTreeHostCommon {
public:
static gfx::Rect CalculateVisibleRect(const gfx::Rect& target_surface_rect,

Powered by Google App Engine
This is Rietveld 408576698