OLD | NEW |
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 #include "ui/gl/gl_surface_egl.h" | 5 #include "ui/gl/gl_surface_egl.h" |
6 | 6 |
7 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ui/gl/scoped_make_current.h" | 23 #include "ui/gl/scoped_make_current.h" |
24 #include "ui/gl/sync_control_vsync_provider.h" | 24 #include "ui/gl/sync_control_vsync_provider.h" |
25 | 25 |
26 #if defined(USE_X11) | 26 #if defined(USE_X11) |
27 extern "C" { | 27 extern "C" { |
28 #include <X11/Xlib.h> | 28 #include <X11/Xlib.h> |
29 } | 29 } |
30 #endif | 30 #endif |
31 | 31 |
32 #if defined (USE_OZONE) | 32 #if defined (USE_OZONE) |
33 #include "ui/ozone/public/ozone_platform.h" | |
34 #include "ui/ozone/public/surface_factory_ozone.h" | 33 #include "ui/ozone/public/surface_factory_ozone.h" |
35 #endif | 34 #endif |
36 | 35 |
37 #if !defined(EGL_FIXED_SIZE_ANGLE) | 36 #if !defined(EGL_FIXED_SIZE_ANGLE) |
38 #define EGL_FIXED_SIZE_ANGLE 0x3201 | 37 #define EGL_FIXED_SIZE_ANGLE 0x3201 |
39 #endif | 38 #endif |
40 | 39 |
41 #if !defined(EGL_OPENGL_ES3_BIT) | 40 #if !defined(EGL_OPENGL_ES3_BIT) |
42 #define EGL_OPENGL_ES3_BIT 0x00000040 | 41 #define EGL_OPENGL_ES3_BIT 0x00000040 |
43 #endif | 42 #endif |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 EGL_ALPHA_SIZE, 8, | 298 EGL_ALPHA_SIZE, 8, |
300 EGL_BLUE_SIZE, 8, | 299 EGL_BLUE_SIZE, 8, |
301 EGL_GREEN_SIZE, 8, | 300 EGL_GREEN_SIZE, 8, |
302 EGL_RED_SIZE, 8, | 301 EGL_RED_SIZE, 8, |
303 EGL_RENDERABLE_TYPE, renderable_type, | 302 EGL_RENDERABLE_TYPE, renderable_type, |
304 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT, | 303 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT, |
305 EGL_NONE | 304 EGL_NONE |
306 }; | 305 }; |
307 | 306 |
308 #if defined(USE_OZONE) | 307 #if defined(USE_OZONE) |
309 const EGLint* config_attribs = ui::OzonePlatform::GetInstance() | 308 const EGLint* config_attribs = |
310 ->GetSurfaceFactoryOzone() | 309 ui::SurfaceFactoryOzone::GetInstance()->GetEGLSurfaceProperties( |
311 ->GetEGLSurfaceProperties(kConfigAttribs); | 310 kConfigAttribs); |
312 #else | 311 #else |
313 const EGLint* config_attribs = kConfigAttribs; | 312 const EGLint* config_attribs = kConfigAttribs; |
314 #endif | 313 #endif |
315 | 314 |
316 EGLint num_configs; | 315 EGLint num_configs; |
317 if (!eglChooseConfig(g_display, | 316 if (!eglChooseConfig(g_display, |
318 config_attribs, | 317 config_attribs, |
319 NULL, | 318 NULL, |
320 0, | 319 0, |
321 &num_configs)) { | 320 &num_configs)) { |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 } | 962 } |
964 | 963 |
965 void* SurfacelessEGL::GetShareHandle() { | 964 void* SurfacelessEGL::GetShareHandle() { |
966 return NULL; | 965 return NULL; |
967 } | 966 } |
968 | 967 |
969 SurfacelessEGL::~SurfacelessEGL() { | 968 SurfacelessEGL::~SurfacelessEGL() { |
970 } | 969 } |
971 | 970 |
972 } // namespace gfx | 971 } // namespace gfx |
OLD | NEW |