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

Unified Diff: ui/gl/gl_image_glx.cc

Issue 2449993005: Remove GLImage::Destroy(). (Closed)
Patch Set: Remove GLImage::Destroy(). 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
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_;
}
« ui/gl/gl_image_egl.cc ('K') | « 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