| Index: ui/gl/gl_bindings.h
|
| diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
|
| index dd737f4185dc7c222d63945bf4413fe4a6fd11d4..029a2d43930b70cde8335bd4747ba105ee37b453 100644
|
| --- a/ui/gl/gl_bindings.h
|
| +++ b/ui/gl/gl_bindings.h
|
| @@ -375,6 +375,29 @@ struct GL_EXPORT DriverGLX {
|
| ProcsGLX debug_fn;
|
| ExtensionsGLX ext;
|
| };
|
| +
|
| +#if defined(USE_OZONE)
|
| +// OZONE build defines EGLNativeDisplayType like intptr_t and this requires
|
| +// reinterpret casts for use with X functions.
|
| +inline EGLNativeDisplayType XDisplayToEGLNativeDisplay(::Display* display) {
|
| + COMPILE_ASSERT(sizeof(EGLNativeDisplayType) == sizeof(::Display*),
|
| + "EGLNativeDisplayType size should be equal to pointer size for"
|
| + "OZONE with x11 builds");
|
| + return reinterpret_cast<EGLNativeDisplayType>(display);
|
| +}
|
| +
|
| +inline ::Display* EGLNativeDisplayToXDisplay(EGLNativeDisplayType display) {
|
| + return reinterpret_cast<::Display*>(display);
|
| +}
|
| +#else
|
| +inline EGLNativeDisplayType XDisplayToEGLNativeDisplay(::Display* display) {
|
| + return display;
|
| +}
|
| +
|
| +inline ::Display* EGLNativeDisplayToXDisplay(EGLNativeDisplayType display) {
|
| + return display;
|
| +}
|
| +#endif
|
| #endif
|
|
|
| // This #define is here to support autogenerated code.
|
|
|