Index: cc/trees/layer_tree_impl.cc |
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc |
index d1bfa3583abdf637c4155c7f4e1b8172ccbe179b..213e3039e74b43ebb4791e84780a0cf00143fc50 100644 |
--- a/cc/trees/layer_tree_impl.cc |
+++ b/cc/trees/layer_tree_impl.cc |
@@ -90,6 +90,7 @@ LayerTreeImpl::LayerTreeImpl( |
viewport_size_invalid_(false), |
needs_update_draw_properties_(true), |
needs_full_tree_sync_(true), |
+ needs_surface_ids_sync_(false), |
next_activation_forces_redraw_(false), |
has_ever_been_drawn_(false), |
handle_visibility_changed_(false), |
@@ -1218,6 +1219,22 @@ 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; |
+ needs_surface_ids_sync_ = true; |
+} |
+ |
+const std::vector<SurfaceId>& LayerTreeImpl::SurfaceLayerIds() const { |
+ return surface_layer_ids_; |
+} |
+ |
+void LayerTreeImpl::ClearSurfaceLayerIds() { |
+ surface_layer_ids_.clear(); |
+ needs_surface_ids_sync_ = true; |
+} |
+ |
void LayerTreeImpl::AddLayerShouldPushProperties(LayerImpl* layer) { |
layers_that_should_push_properties_.insert(layer); |
} |
@@ -1737,19 +1754,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, |