Index: app/gfx/gl/gl_context_linux.cc |
diff --git a/app/gfx/gl/gl_context_linux.cc b/app/gfx/gl/gl_context_linux.cc |
index 8701bc362c5e8212697290f744a8a4d4a55b6375..4a8946e2e63d0e04d0d40e2c5ff877bafef3d933 100644 |
--- a/app/gfx/gl/gl_context_linux.cc |
+++ b/app/gfx/gl/gl_context_linux.cc |
@@ -142,16 +142,6 @@ class PixmapGLContext : public GLContext { |
DISALLOW_COPY_AND_ASSIGN(PixmapGLContext); |
}; |
-// scoped_ptr functor for XFree(). Use as follows: |
-// scoped_ptr_malloc<XVisualInfo, ScopedPtrXFree> foo(...); |
-// where "XVisualInfo" is any X type that is freed with XFree. |
-class ScopedPtrXFree { |
- public: |
- void operator()(void* x) const { |
- ::XFree(x); |
- } |
-}; |
- |
bool GLContext::InitializeOneOff() { |
static bool initialized = false; |
if (initialized) |
@@ -199,7 +189,7 @@ bool ViewGLContext::Initialize(bool multisampled) { |
XVisualInfo visual_info_template; |
visual_info_template.visualid = XVisualIDFromVisual(attributes.visual); |
int visual_info_count = 0; |
- scoped_ptr_malloc<XVisualInfo, ScopedPtrXFree> visual_info_list( |
+ scoped_ptr_malloc<XVisualInfo, FreeFnAdapterIgnoreReturn< ::XFree> > visual_info_list( |
XGetVisualInfo(display, VisualIDMask, |
&visual_info_template, |
&visual_info_count)); |
@@ -480,7 +470,7 @@ bool PbufferGLContext::Initialize(GLContext* shared_context) { |
int nelements = 0; |
// TODO(kbr): figure out whether hardcoding screen to 0 is sufficient. |
- scoped_ptr_malloc<GLXFBConfig, ScopedPtrXFree> config( |
+ scoped_ptr_malloc<GLXFBConfig, FreeFnAdapterIgnoreReturn< ::XFree> > config( |
glXChooseFBConfig(display, 0, config_attributes, &nelements)); |
if (!config.get()) { |
LOG(ERROR) << "glXChooseFBConfig failed."; |
@@ -599,7 +589,7 @@ bool PixmapGLContext::Initialize(GLContext* shared_context) { |
Display* display = x11_util::GetXDisplay(); |
int screen = DefaultScreen(display); |
- scoped_ptr_malloc<XVisualInfo, ScopedPtrXFree> visual_info( |
+ scoped_ptr_malloc<XVisualInfo, FreeFnAdapterIgnoreReturn< ::XFree> > visual_info( |
glXChooseVisual(display, screen, attributes)); |
if (!visual_info.get()) { |