Index: ui/gl/gl_image_glx.cc |
diff --git a/ui/gl/gl_image_glx.cc b/ui/gl/gl_image_glx.cc |
index 4b7e883781cd8160e6bc6c49d38be238088fc6bd..2cf1737f47dfa7bbc989a1d3b749b2dc53f14d4d 100644 |
--- a/ui/gl/gl_image_glx.cc |
+++ b/ui/gl/gl_image_glx.cc |
@@ -49,7 +49,10 @@ GLImageGLX::GLImageGLX(gfx::PluginWindowHandle window) |
pixmap_(0), |
glx_pixmap_(0) {} |
-GLImageGLX::~GLImageGLX() { Destroy(); } |
+GLImageGLX::~GLImageGLX() { |
+ DCHECK_EQ(0u, glx_pixmap_); |
+ DCHECK_EQ(0u, pixmap_); |
reveman
2014/05/31 05:05:06
this can fail. see why below.
sohanjg
2014/06/02 13:59:42
Done.
|
+} |
bool GLImageGLX::Initialize() { |
if (!GLSurfaceGLX::IsTextureFromPixmapSupported()) { |
@@ -126,7 +129,7 @@ bool GLImageGLX::Initialize() { |
return true; |
} |
-void GLImageGLX::Destroy() { |
+void GLImageGLX::Destroy(bool have_context) { |
if (glx_pixmap_) { |
glXDestroyGLXPixmap(display_, glx_pixmap_); |
glx_pixmap_ = 0; |