Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 8db96130c74303927c5712016310f894d3d87349..a77749cd2d67f6f85cce0e5044402396f825f268 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -1092,6 +1092,28 @@ bool LayerTreeHost::PaintContent(const LayerList& update_layer_list, |
return did_paint_content; |
} |
+void LayerTreeHost::AddSurfaceLayerId(const SurfaceId& surface_id) { |
+ auto pos = std::find(surface_layer_ids_.begin(), surface_layer_ids_.end(), |
+ surface_id); |
+ if (pos == surface_layer_ids_.end()) { |
+ surface_layer_ids_.push_back(surface_id); |
+ needs_surface_ids_sync_ = true; |
+ } |
+} |
+ |
+void LayerTreeHost::RemoveSurfaceLayerId(const SurfaceId& surface_id) { |
+ auto pos = std::find(surface_layer_ids_.begin(), surface_layer_ids_.end(), |
enne (OOO)
2017/05/24 18:44:54
What about flat_set over vector, so you don't have
jaydasika
2017/05/24 21:39:54
Done.
|
+ surface_id); |
+ if (pos != surface_layer_ids_.end()) { |
+ surface_layer_ids_.erase(pos); |
+ needs_surface_ids_sync_ = true; |
+ } |
+} |
+ |
+const std::vector<SurfaceId>& LayerTreeHost::SurfaceLayerIds() const { |
+ return surface_layer_ids_; |
+} |
+ |
void LayerTreeHost::AddLayerShouldPushProperties(Layer* layer) { |
layers_that_should_push_properties_.insert(layer); |
} |