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

Unified Diff: cc/surfaces/display.cc

Issue 2897673002: Return resources immediately after a Surface is destroyed (Closed)
Patch Set: Check aggregator_ 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
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/display.cc
diff --git a/cc/surfaces/display.cc b/cc/surfaces/display.cc
index e3693207031f15a0056d3d9600f33b45476f3d10..846897b21806db19b8c100a9660caa75ee05f441 100644
--- a/cc/surfaces/display.cc
+++ b/cc/surfaces/display.cc
@@ -412,6 +412,11 @@ void Display::OnSurfaceDamaged(const SurfaceId& surface_id, bool* changed) {
void Display::OnSurfaceCreated(const SurfaceInfo& surface_info) {}
+void Display::OnSurfaceDiscarded(const SurfaceId& surface_id) {
+ if (aggregator_)
+ aggregator_->ReleaseResources(surface_id);
+}
+
const SurfaceId& Display::CurrentSurfaceId() {
return current_surface_id_;
}
« no previous file with comments | « cc/surfaces/display.h ('k') | cc/surfaces/surface_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698