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

Unified Diff: ui/gl/gl_surface_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_implementation_win.cc ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_glx.cc
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 5a3eafd70b589c9a7404adf5df09e5079c3e31e3..d66078c89df64179436d7b6d9eacdea6058b6a05 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -33,15 +33,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);
- }
-};
-
Display* g_display = NULL;
const char* g_glx_extensions = NULL;
bool g_glx_context_create = false;
@@ -180,9 +171,8 @@ class SGIVideoSyncProviderThreadShim {
visual_info_template.visualid = XVisualIDFromVisual(attributes.visual);
int visual_info_count = 0;
- scoped_ptr<XVisualInfo, ScopedPtrXFree> visual_info_list(
- XGetVisualInfo(display_, VisualIDMask,
- &visual_info_template, &visual_info_count));
+ gfx::XScopedPtr<XVisualInfo> visual_info_list(XGetVisualInfo(
+ display_, VisualIDMask, &visual_info_template, &visual_info_count));
DCHECK(visual_info_list.get());
if (visual_info_count == 0) {
@@ -553,10 +543,8 @@ void* NativeViewGLSurfaceGLX::GetConfig() {
int visual_id = XVisualIDFromVisual(attributes.visual);
int num_elements = 0;
- scoped_ptr<GLXFBConfig, ScopedPtrXFree> configs(
- glXGetFBConfigs(g_display,
- DefaultScreen(g_display),
- &num_elements));
+ gfx::XScopedPtr<GLXFBConfig> configs(
+ glXGetFBConfigs(g_display, DefaultScreen(g_display), &num_elements));
if (!configs.get()) {
LOG(ERROR) << "glXGetFBConfigs failed.";
return NULL;
@@ -628,11 +616,8 @@ bool PbufferGLSurfaceGLX::Initialize() {
};
int num_elements = 0;
- scoped_ptr<GLXFBConfig, ScopedPtrXFree> configs(
- glXChooseFBConfig(g_display,
- DefaultScreen(g_display),
- config_attributes,
- &num_elements));
+ gfx::XScopedPtr<GLXFBConfig> configs(glXChooseFBConfig(
+ g_display, DefaultScreen(g_display), config_attributes, &num_elements));
if (!configs.get()) {
LOG(ERROR) << "glXChooseFBConfig failed.";
return false;
« no previous file with comments | « ui/gl/gl_implementation_win.cc ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698