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

Side by Side Diff: content/common/gpu/x_util.h

Issue 989993002: x11: Use scoped_ptr<> for X11 objects where it makes sense. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/x_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_COMMON_GPU_X_UTIL_H_ 5 #ifndef CONTENT_COMMON_GPU_X_UTIL_H_
6 #define CONTENT_COMMON_GPU_X_UTIL_H_ 6 #define CONTENT_COMMON_GPU_X_UTIL_H_
7 7
8 // Some X-Windows specific stuff. This can be included on any platform, and will 8 // Some X-Windows specific stuff. This can be included on any platform, and will
9 // be a NOP on non-Linux ones. 9 // be a NOP on non-Linux ones.
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 typedef unsigned long XID; 27 typedef unsigned long XID;
28 28
29 extern "C" { 29 extern "C" {
30 30
31 typedef struct _XDisplay Display; 31 typedef struct _XDisplay Display;
32 typedef struct __GLXcontextRec *GLXContext; 32 typedef struct __GLXcontextRec *GLXContext;
33 33
34 } // extern "C" 34 } // extern "C"
35 35
36 // Utils -----------------------------------------------------------------------
37
38 // scoped_ptr functor for XFree(). Use as follows:
39 // scoped_ptr_mallox<XVisualInfo, ScopedPtrXFree> foo(...);
40 // where "XVisualInfo" is any X type that is freed with XFree.
41 class ScopedPtrXFree {
42 public:
43 void operator()(void* x) const;
44 };
45
46 } // namespace content 36 } // namespace content
47 37
48 #endif // USE_X11 38 #endif // USE_X11
49 39
50 #endif // CONTENT_COMMON_GPU_X_UTIL_H_ 40 #endif // CONTENT_COMMON_GPU_X_UTIL_H_
OLDNEW
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/gpu/x_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698