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

Side by Side Diff: ui/gl/gl_surface_egl.cc

Issue 1171513002: Reland of Revert of ozone: Remove singleton pattern for SurfaceFactoryOzone. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
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 #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
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"
33 #include "ui/ozone/public/surface_factory_ozone.h" 34 #include "ui/ozone/public/surface_factory_ozone.h"
34 #endif 35 #endif
35 36
36 #if !defined(EGL_FIXED_SIZE_ANGLE) 37 #if !defined(EGL_FIXED_SIZE_ANGLE)
37 #define EGL_FIXED_SIZE_ANGLE 0x3201 38 #define EGL_FIXED_SIZE_ANGLE 0x3201
38 #endif 39 #endif
39 40
40 #if !defined(EGL_OPENGL_ES3_BIT) 41 #if !defined(EGL_OPENGL_ES3_BIT)
41 #define EGL_OPENGL_ES3_BIT 0x00000040 42 #define EGL_OPENGL_ES3_BIT 0x00000040
42 #endif 43 #endif
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EGL_ALPHA_SIZE, 8, 299 EGL_ALPHA_SIZE, 8,
299 EGL_BLUE_SIZE, 8, 300 EGL_BLUE_SIZE, 8,
300 EGL_GREEN_SIZE, 8, 301 EGL_GREEN_SIZE, 8,
301 EGL_RED_SIZE, 8, 302 EGL_RED_SIZE, 8,
302 EGL_RENDERABLE_TYPE, renderable_type, 303 EGL_RENDERABLE_TYPE, renderable_type,
303 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT, 304 EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
304 EGL_NONE 305 EGL_NONE
305 }; 306 };
306 307
307 #if defined(USE_OZONE) 308 #if defined(USE_OZONE)
308 const EGLint* config_attribs = 309 const EGLint* config_attribs = ui::OzonePlatform::GetInstance()
309 ui::SurfaceFactoryOzone::GetInstance()->GetEGLSurfaceProperties( 310 ->GetSurfaceFactoryOzone()
310 kConfigAttribs); 311 ->GetEGLSurfaceProperties(kConfigAttribs);
311 #else 312 #else
312 const EGLint* config_attribs = kConfigAttribs; 313 const EGLint* config_attribs = kConfigAttribs;
313 #endif 314 #endif
314 315
315 EGLint num_configs; 316 EGLint num_configs;
316 if (!eglChooseConfig(g_display, 317 if (!eglChooseConfig(g_display,
317 config_attribs, 318 config_attribs,
318 NULL, 319 NULL,
319 0, 320 0,
320 &num_configs)) { 321 &num_configs)) {
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 963 }
963 964
964 void* SurfacelessEGL::GetShareHandle() { 965 void* SurfacelessEGL::GetShareHandle() {
965 return NULL; 966 return NULL;
966 } 967 }
967 968
968 SurfacelessEGL::~SurfacelessEGL() { 969 SurfacelessEGL::~SurfacelessEGL() {
969 } 970 }
970 971
971 } // namespace gfx 972 } // namespace gfx
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698