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

Unified Diff: cc/trees/layer_tree_impl.h

Issue 1447893002: compositor-worker: Introduce WebCompositorMutableState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback. Created 4 years, 11 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 | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.h
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index d80eeca1674510297c06efd7b9f3128634d20f5c..16a1bb9d679d8497d4478b22a239149483028984 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -5,9 +5,6 @@
#ifndef CC_TREES_LAYER_TREE_IMPL_H_
#define CC_TREES_LAYER_TREE_IMPL_H_
-#include <stddef.h>
-#include <stdint.h>
-
#include <map>
#include <set>
#include <string>
@@ -141,6 +138,16 @@ class CC_EXPORT LayerTreeImpl {
void PushPropertiesTo(LayerTreeImpl* tree_impl);
+ struct CC_EXPORT ElementLayers {
+ // Transform and opacity mutations apply to this layer.
+ LayerImpl* main = nullptr;
+ // Scroll mutations apply to this layer.
+ LayerImpl* scroll = nullptr;
+ };
+
+ void AddToElementMap(LayerImpl* layer);
+ void RemoveFromElementMap(LayerImpl* layer);
+ ElementLayers GetMutableLayers(uint64_t element_id);
int source_frame_number() const { return source_frame_number_; }
void set_source_frame_number(int frame_number) {
source_frame_number_ = frame_number;
@@ -476,6 +483,8 @@ class CC_EXPORT LayerTreeImpl {
typedef base::hash_map<int, LayerImpl*> LayerIdMap;
LayerIdMap layer_id_map_;
+ base::hash_map<uint64_t, ElementLayers> element_layers_map_;
+
// Maps from clip layer ids to scroll layer ids. Note that this only includes
// the subset of clip layers that act as scrolling containers. (This is
// derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.)
« no previous file with comments | « cc/layers/layer_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698