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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: hide mask layer also Created 3 years, 7 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.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index e826e2d93900d0e34f10261a4e00b6ac885ad6fc..3dbb439a2d9c4f54d2f7faa33496bf5bfa881950 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -1094,6 +1094,22 @@ bool LayerTreeHost::PaintContent(const LayerList& update_layer_list,
return did_paint_content;
}
+void LayerTreeHost::AddHiddenSurfaceLayerId(Layer* layer) {
+ DCHECK(layer->is_hidden());
+ const SurfaceId* surface_id = layer->GetSurfaceId();
+ if (surface_id)
+ hidden_surface_layer_ids_.push_back(surface_id);
+}
+
+using SurfaceIdsList = std::vector<const SurfaceId*>;
+const SurfaceIdsList* LayerTreeHost::HiddenSurfaceLayerIds() const {
+ return &hidden_surface_layer_ids_;
+}
+
+void LayerTreeHost::ClearHiddenSurfaceLayerIds() {
+ hidden_surface_layer_ids_.clear();
+}
+
void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) {
layers_that_should_push_properties_.insert(layer);
}

Powered by Google App Engine
This is Rietveld 408576698