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

Unified Diff: content/browser/renderer_host/accelerated_surface_container_linux_cc.cc

Issue 8523016: aura/cc: Fix GPU leak on resize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/accelerated_surface_container_linux_cc.cc
diff --git a/content/browser/renderer_host/accelerated_surface_container_linux_cc.cc b/content/browser/renderer_host/accelerated_surface_container_linux_cc.cc
index e683f1200170d040ca580bff32a1f993df63600d..610204554e8393ef7d005ead56f155f1a01f938b 100644
--- a/content/browser/renderer_host/accelerated_surface_container_linux_cc.cc
+++ b/content/browser/renderer_host/accelerated_surface_container_linux_cc.cc
@@ -7,6 +7,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/browser/renderer_host/image_transport_client.h"
#include "ui/gfx/compositor/compositor_cc.h"
+#include "ui/gfx/gl/gl_bindings.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/transform.h"
@@ -21,6 +22,13 @@ class AcceleratedSurfaceContainerLinuxCC
}
virtual ~AcceleratedSurfaceContainerLinuxCC() {
+ if (texture_id_) {
+ ui::SharedResourcesCC* instance = ui::SharedResourcesCC::GetInstance();
+ DCHECK(instance);
+ instance->MakeSharedContextCurrent();
+ glDeleteTextures(1, &texture_id_);
+ }
+
if (image_transport_client_.get())
image_transport_client_->Release();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698