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

Unified Diff: cc/trees/layer_tree_impl.h

Issue 1547893003: WIP - compositor worker mega patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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/trees/layer_tree_host_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 6d4ba2677e79b7176f54134d07133d35ef72d012..08208d31da6d4e53219242c2fc9f20a906cac440 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -37,6 +37,7 @@ namespace cc {
class ContextProvider;
class DebugRectHistory;
class FrameRateCounter;
+class ElementLayers;
class HeadsUpDisplayLayerImpl;
class LayerExternalScrollOffsetListener;
class LayerScrollOffsetDelegate;
@@ -115,6 +116,7 @@ class CC_EXPORT LayerTreeImpl {
bool RequiresHighResToDraw() const;
bool SmoothnessTakesPriority() const;
VideoFrameControllerClient* GetVideoFrameControllerClient() const;
+ LayerTreeHostImpl* host() const { return layer_tree_host_impl_; }
// Tree specific methods exposed to layer-impl tree.
// ---------------------------------------------------------------------------
@@ -142,6 +144,19 @@ class CC_EXPORT LayerTreeImpl {
void PushPropertiesTo(LayerTreeImpl* tree_impl);
+ // TODO(sad): This is ... not really nice. Should be cleaner maybe.
+ // vollick: What's wrong with it? Just the names or the fact that we have a
+ // proxy registry on the layer tree host impl?
+ void AddToElementMap(LayerImpl* layer);
+ void RemoveFromElementMap(LayerImpl* layer);
+
+ struct ElementLayers {
+ LayerImpl* main = nullptr;
+ LayerImpl* scroll = nullptr;
+ };
+
+ bool GetMutableLayers(uint64_t element_id, ElementLayers* element_layers);
+
int source_frame_number() const { return source_frame_number_; }
void set_source_frame_number(int frame_number) {
source_frame_number_ = frame_number;
@@ -477,6 +492,8 @@ class CC_EXPORT LayerTreeImpl {
typedef base::hash_map<int, LayerImpl*> LayerIdMap;
LayerIdMap layer_id_map_;
+ std::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/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698