Index: ui/gl/gl_image_glx.cc |
diff --git a/ui/gl/gl_image_glx.cc b/ui/gl/gl_image_glx.cc |
index 3b678637b342b583077836a3a3b5609112db0f97..ba093d5f2ca49456e8a379f1f6d7206f1acefa2e 100644 |
--- a/ui/gl/gl_image_glx.cc |
+++ b/ui/gl/gl_image_glx.cc |
@@ -104,7 +104,8 @@ GLImageGLX::GLImageGLX(const gfx::Size& size, unsigned internalformat) |
: glx_pixmap_(0), size_(size), internalformat_(internalformat) {} |
GLImageGLX::~GLImageGLX() { |
- DCHECK_EQ(0u, glx_pixmap_); |
+ if (glx_pixmap_) |
+ glXDestroyGLXPixmap(gfx::GetXDisplay(), glx_pixmap_); |
} |
bool GLImageGLX::Initialize(XID pixmap) { |
@@ -152,13 +153,6 @@ bool GLImageGLX::Initialize(XID pixmap) { |
return true; |
} |
-void GLImageGLX::Destroy(bool have_context) { |
- if (glx_pixmap_) { |
- glXDestroyGLXPixmap(gfx::GetXDisplay(), glx_pixmap_); |
- glx_pixmap_ = 0; |
- } |
-} |
- |
gfx::Size GLImageGLX::GetSize() { |
return size_; |
} |