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

Unified Diff: ui/gl/gl_image_io_surface.cc

Issue 301793003: During image destroy, delete textures only if we have a GL context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move ImageManager destroy to GPUChannel + review comments Created 6 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
Index: ui/gl/gl_image_io_surface.cc
diff --git a/ui/gl/gl_image_io_surface.cc b/ui/gl/gl_image_io_surface.cc
index e20c739cffad6ce232405e4cc460e7aeec078a39..1bd525374dd66b2e6932b2809581c00beb04f01d 100644
--- a/ui/gl/gl_image_io_surface.cc
+++ b/ui/gl/gl_image_io_surface.cc
@@ -15,7 +15,9 @@ GLImageIOSurface::GLImageIOSurface(gfx::Size size)
CHECK(io_surface_support_);
}
-GLImageIOSurface::~GLImageIOSurface() { Destroy(); }
+GLImageIOSurface::~GLImageIOSurface() {
+ DCHECK(!io_surface_);
+}
bool GLImageIOSurface::Initialize(gfx::GpuMemoryBufferHandle buffer) {
io_surface_.reset(io_surface_support_->IOSurfaceLookup(buffer.io_surface_id));
@@ -27,6 +29,10 @@ bool GLImageIOSurface::Initialize(gfx::GpuMemoryBufferHandle buffer) {
return true;
}
+void GLImageIOSurface::Destroy(bool have_context) {
+ io_surface_.reset()
+}
+
gfx::Size GLImageIOSurface::GetSize() { return size_; }
bool GLImageIOSurface::BindTexImage(unsigned target) {

Powered by Google App Engine
This is Rietveld 408576698