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

Unified Diff: cc/surfaces/surface_aggregator.cc

Issue 800133002: Release resources from SurfaceAggregator when new frame arrives. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« cc/surfaces/display.cc ('K') | « cc/surfaces/surface_aggregator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« cc/surfaces/display.cc ('K') | « cc/surfaces/surface_aggregator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698