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

Unified Diff: cc/trees/layer_tree_host.h

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 5628309c5456a558f5d3bfd0a65ae6bc504fae54..03ac81973fa79298bde746ee12c41a9271102d17 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -40,6 +40,7 @@
#include "cc/resources/scoped_ui_resource.h"
#include "cc/surfaces/surface_sequence.h"
#include "cc/trees/compositor_mode.h"
+#include "cc/trees/layer_tree.h"
#include "cc/trees/layer_tree_host_client.h"
#include "cc/trees/layer_tree_settings.h"
#include "cc/trees/mutator_host_client.h"
@@ -426,6 +427,8 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
return client_picture_cache_ ? client_picture_cache_.get() : nullptr;
}
+ LayerTree* layer_tree() { return &layer_tree_; }
Khushal 2016/07/18 16:59:33 Can you change this to LayerTree* GetLayerTree() c
xingliu 2016/07/19 22:47:38 Done.
+
protected:
LayerTreeHost(InitParams* params, CompositorMode mode);
void InitializeThreaded(
@@ -599,13 +602,13 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
ElementLayersMap element_layers_map_;
- // Set of layers that need to push properties.
- std::unordered_set<Layer*> layers_that_should_push_properties_;
-
uint32_t surface_client_id_;
uint32_t next_surface_sequence_;
uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
+ // Layer tree that hold layers.
+ LayerTree layer_tree_;
+
DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
};

Powered by Google App Engine
This is Rietveld 408576698