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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: . 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_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 0fac7341641d8b7ac6f982828cb4e13abf9318c2..e553fa872baf001c4d9495af9e133a213bc895cd 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1223,6 +1223,20 @@ LayerImpl* LayerTreeImpl::LayerById(int id) const {
return iter != layer_id_map_.end() ? iter->second : nullptr;
}
+void LayerTreeImpl::SetSurfaceLayerIds(
+ const std::vector<SurfaceId>& surface_layer_ids) {
+ DCHECK(surface_layer_ids_.empty());
+ surface_layer_ids_ = surface_layer_ids;
+}
+
+const std::vector<SurfaceId>& LayerTreeImpl::SurfaceLayerIds() const {
+ return surface_layer_ids_;
+}
+
+void LayerTreeImpl::ClearSurfaceLayerIds() {
+ surface_layer_ids_.clear();
+}
+
void LayerTreeImpl::AddLayerShouldPushProperties(LayerImpl* layer) {
layers_that_should_push_properties_.insert(layer);
}
@@ -1742,19 +1756,6 @@ void LayerTreeImpl::UnregisterScrollLayer(LayerImpl* layer) {
clip_scroll_map_.erase(layer->scroll_clip_layer_id());
}
-void LayerTreeImpl::AddSurfaceLayer(LayerImpl* layer) {
- DCHECK(std::find(surface_layers_.begin(), surface_layers_.end(), layer) ==
- surface_layers_.end());
- surface_layers_.push_back(layer);
-}
-
-void LayerTreeImpl::RemoveSurfaceLayer(LayerImpl* layer) {
- LayerImplList::iterator it =
- std::find(surface_layers_.begin(), surface_layers_.end(), layer);
- DCHECK(it != surface_layers_.end());
- surface_layers_.erase(it);
-}
-
static bool PointHitsRect(
const gfx::PointF& screen_space_point,
const gfx::Transform& local_space_to_screen_space_transform,

Powered by Google App Engine
This is Rietveld 408576698