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

Unified Diff: ui/gl/init/gl_factory_ozone.cc

Issue 2165303002: Convert Ozone GBM to use new surface API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ozone_impl
Patch Set: Add missing dep. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/gl/init/gl_surface_ozone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/init/gl_factory_ozone.cc
diff --git a/ui/gl/init/gl_factory_ozone.cc b/ui/gl/init/gl_factory_ozone.cc
index 9df9e01482231b4412da94ea47e720220663cb7b..7ee46c7d47dc4d45e477866291a639b00a285e64 100644
--- a/ui/gl/init/gl_factory_ozone.cc
+++ b/ui/gl/init/gl_factory_ozone.cc
@@ -64,19 +64,13 @@ scoped_refptr<GLSurface> CreateDefaultOffscreenGLSurface(
// TODO(kylechar): Remove when all implementations are switched over.
scoped_refptr<GLSurface> CreateViewGLSurfaceOld(gfx::AcceleratedWidget window) {
switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2: {
+ case kGLImplementationEGLGLES2:
DCHECK_NE(window, gfx::kNullAcceleratedWidget);
- scoped_refptr<GLSurface> surface;
- if (!surface && GLSurfaceEGL::IsEGLSurfacelessContextSupported())
- surface = CreateViewGLSurfaceOzoneSurfacelessSurfaceImpl(window);
- if (!surface)
- surface = CreateViewGLSurfaceOzone(window);
- return surface;
- }
+ return CreateViewGLSurfaceOzone(window);
default:
NOTREACHED();
- return nullptr;
}
+ return nullptr;
}
// TODO(kylechar): Remove when all implementations are switched over.
@@ -131,16 +125,12 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
window);
}
-// TODO(kylechar): Update to use new API.
scoped_refptr<GLSurface> CreateSurfacelessViewGLSurface(
gfx::AcceleratedWidget window) {
TRACE_EVENT0("gpu", "gl::init::CreateSurfacelessViewGLSurface");
- if (GetGLImplementation() == kGLImplementationEGLGLES2 &&
- window != gfx::kNullAcceleratedWidget &&
- GLSurfaceEGL::IsEGLSurfacelessContextSupported()) {
- return CreateViewGLSurfaceOzoneSurfaceless(window);
- }
- return nullptr;
+
+ return GetSurfaceFactory()->CreateSurfacelessViewGLSurface(
+ GetGLImplementation(), window);
}
scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
« no previous file with comments | « no previous file | ui/gl/init/gl_surface_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698