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

Unified Diff: ui/gl/gl_image_glx.cc

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: One more Destroy() call on Mac. Created 4 years, 2 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
« no previous file with comments | « ui/gl/gl_image_glx.h ('k') | ui/gl/gl_image_io_surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
}
« no previous file with comments | « ui/gl/gl_image_glx.h ('k') | ui/gl/gl_image_io_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698