Chromium Code Reviews| 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..d0b76a70b14a9552563629183e6dc5e2afa73d3c 100644 |
| --- a/ui/gl/gl_image_glx.cc |
| +++ b/ui/gl/gl_image_glx.cc |
| @@ -104,7 +104,10 @@ 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_); |
| + glx_pixmap_ = 0; |
|
reveman
2016/10/27 20:01:44
nit: no need for this in dtor
sandersd (OOO until July 31)
2016/10/27 20:13:09
Done.
|
| + } |
| } |
| bool GLImageGLX::Initialize(XID pixmap) { |
| @@ -152,13 +155,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_; |
| } |