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

Unified Diff: ui/gl/gl_image_glx.cc

Issue 1001833005: Update from https://crrev.com/320343 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Supress Created 5 years, 9 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.gyp ('k') | ui/gl/gl_implementation_win.cc » ('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 84c4d0c247e86e80abad99ee4d4eb13af7f92549..dea6cd64bb0f6e3ddabe88a8ce8a415471ceaf33 100644
--- a/ui/gl/gl_image_glx.cc
+++ b/ui/gl/gl_image_glx.cc
@@ -16,13 +16,6 @@ namespace gfx {
namespace {
-// scoped_ptr functor for XFree(). Use as follows:
-// scoped_ptr<XVisualInfo, ScopedPtrXFree> foo(...);
-// where "XVisualInfo" is any X type that is freed with XFree.
-struct ScopedPtrXFree {
- void operator()(void* x) const { ::XFree(x); }
-};
-
bool ValidFormat(unsigned internalformat) {
switch (internalformat) {
case GL_RGB:
@@ -141,11 +134,9 @@ bool GLImageGLX::Initialize(XID pixmap) {
BindToTextureFormat(internalformat_), GL_TRUE,
0};
int num_elements = 0;
- scoped_ptr<GLXFBConfig, ScopedPtrXFree> config(
- glXChooseFBConfig(gfx::GetXDisplay(),
- DefaultScreen(gfx::GetXDisplay()),
- config_attribs,
- &num_elements));
+ gfx::XScopedPtr<GLXFBConfig> config(
+ glXChooseFBConfig(gfx::GetXDisplay(), DefaultScreen(gfx::GetXDisplay()),
+ config_attribs, &num_elements));
if (!config.get()) {
DVLOG(0) << "glXChooseFBConfig failed.";
return false;
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_implementation_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698