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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 322443002: cc: Refactor how picture layers are exposed to the tile manager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tile manager perf tests Created 6 years, 6 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/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 94d2864c696535575997ee2d32c898b0d00816eb..1d8598a47cc5debc65192b4099c3258bb1893be5 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1236,6 +1236,10 @@ void LayerTreeHostImpl::DidInitializeVisibleTile() {
client_->DidInitializeVisibleTileOnImplThread();
}
+const std::vector<PictureLayerImpl*>& LayerTreeHostImpl::GetPictureLayers() {
+ return picture_layers_;
+}
+
void LayerTreeHostImpl::NotifyReadyToActivate() {
client_->NotifyReadyToActivate();
}
@@ -3135,4 +3139,17 @@ void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
(*it)->OnSetNeedsRedrawOnImpl();
}
+void LayerTreeHostImpl::RegisterPictureLayerImpl(PictureLayerImpl* layer) {
+ DCHECK(std::find(picture_layers_.begin(), picture_layers_.end(), layer) ==
+ picture_layers_.end());
+ picture_layers_.push_back(layer);
+}
+
+void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
+ std::vector<PictureLayerImpl*>::iterator it =
+ std::find(picture_layers_.begin(), picture_layers_.end(), layer);
+ DCHECK(it != picture_layers_.end());
+ picture_layers_.erase(it);
+}
+
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698