| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_GPU_X_UTIL_H_ | 5 #ifndef CHROME_GPU_X_UTIL_H_ |
| 6 #define CHROME_GPU_X_UTIL_H_ | 6 #define CHROME_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 Loading... |
| 26 | 26 |
| 27 extern "C" { | 27 extern "C" { |
| 28 | 28 |
| 29 typedef struct _XDisplay Display; | 29 typedef struct _XDisplay Display; |
| 30 typedef struct __GLXcontextRec *GLXContext; | 30 typedef struct __GLXcontextRec *GLXContext; |
| 31 | 31 |
| 32 } // extern "C" | 32 } // extern "C" |
| 33 | 33 |
| 34 // Utils ----------------------------------------------------------------------- | 34 // Utils ----------------------------------------------------------------------- |
| 35 | 35 |
| 36 // scoped_ptr functor for XFree(). Use as follows: | |
| 37 // scoped_ptr_mallox<XVisualInfo, ScopedPtrXFree> foo(...); | |
| 38 // where "XVisualInfo" is any X type that is freed with XFree. | |
| 39 class ScopedPtrXFree { | |
| 40 public: | |
| 41 void operator()(void* x) const; | |
| 42 }; | |
| 43 | |
| 44 #endif // OS_LINUX | 36 #endif // OS_LINUX |
| 45 | 37 |
| 46 #endif // CHROME_GPU_X_UTIL_H_ | 38 #endif // CHROME_GPU_X_UTIL_H_ |
| OLD | NEW |