Index: cc/surfaces/surface_aggregator.cc |
diff --git a/cc/surfaces/surface_aggregator.cc b/cc/surfaces/surface_aggregator.cc |
index 2334d141e28557be84fb1e9199016ad4788b6652..4c4408484e254c3009c05fe15ed33ba4e9b43210 100644 |
--- a/cc/surfaces/surface_aggregator.cc |
+++ b/cc/surfaces/surface_aggregator.cc |
@@ -438,4 +438,13 @@ scoped_ptr<CompositorFrame> SurfaceAggregator::Aggregate(SurfaceId surface_id) { |
return frame.Pass(); |
} |
+void SurfaceAggregator::ReleaseResources(SurfaceId surface_id) { |
+ SurfaceToResourceChildIdMap::iterator it = |
+ surface_id_to_resource_child_id_.find(surface_id); |
+ if (it != surface_id_to_resource_child_id_.end()) { |
+ provider_->DestroyChild(it->second); |
+ surface_id_to_resource_child_id_.erase(it); |
+ } |
+} |
+ |
} // namespace cc |