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

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

Issue 2190353003: Delete old Ozone surface creation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_init.gyp » ('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 2fdcec5210921043425145e06bbcde4472b6082f..ca5334707356cade0ecd5d16c21c65cfe6388f12 100644
--- a/ui/gl/init/gl_factory_ozone.cc
+++ b/ui/gl/init/gl_factory_ozone.cc
@@ -17,10 +17,8 @@
#include "ui/gl/gl_surface_egl.h"
#include "ui/gl/gl_surface_osmesa.h"
#include "ui/gl/gl_surface_stub.h"
-#include "ui/gl/init/gl_surface_ozone.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/public/surface_factory_ozone.h"
-#include "ui/ozone/public/surface_ozone_egl.h"
namespace gl {
namespace init {
@@ -62,34 +60,6 @@ scoped_refptr<GLSurface> CreateDefaultOffscreenGLSurface(
return nullptr;
}
-// TODO(kylechar): Remove when all implementations are switched over.
-scoped_refptr<GLSurface> CreateViewGLSurfaceOld(gfx::AcceleratedWidget window) {
- switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2:
- DCHECK_NE(window, gfx::kNullAcceleratedWidget);
- return CreateViewGLSurfaceOzone(window);
- default:
- NOTREACHED();
- }
- return nullptr;
-}
-
-// TODO(kylechar): Remove when all implementations are switched over.
-scoped_refptr<GLSurface> CreateOffscreenGLSurfaceOld(const gfx::Size& size) {
- switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2:
- if (GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
- (size.width() == 0 && size.height() == 0)) {
- return InitializeGLSurface(new SurfacelessEGL(size));
- } else {
- return InitializeGLSurface(new PbufferGLSurfaceEGL(size));
- }
- default:
- NOTREACHED();
- }
- return nullptr;
-}
-
} // namespace
std::vector<GLImplementation> GetAllowedGLImplementations() {
@@ -121,11 +91,10 @@ scoped_refptr<GLContext> CreateGLContext(GLShareGroup* share_group,
case kGLImplementationEGLGLES2:
return InitializeGLContext(new GLContextEGL(share_group),
compatible_surface, gpu_preference);
-
default:
NOTREACHED();
- return nullptr;
}
+ return nullptr;
}
scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
@@ -134,10 +103,6 @@ scoped_refptr<GLSurface> CreateViewGLSurface(gfx::AcceleratedWidget window) {
if (HasDefaultImplementation(GetGLImplementation()))
return CreateDefaultViewGLSurface(window);
- // TODO(kylechar): This is deprecated, remove when possible.
- if (!GetSurfaceFactory()->UseNewSurfaceAPI())
- return CreateViewGLSurfaceOld(window);
-
return GetSurfaceFactory()->CreateViewGLSurface(GetGLImplementation(),
window);
}
@@ -156,10 +121,6 @@ scoped_refptr<GLSurface> CreateOffscreenGLSurface(const gfx::Size& size) {
if (HasDefaultImplementation(GetGLImplementation()))
return CreateDefaultOffscreenGLSurface(size);
- // TODO(kylechar): This is deprecated, remove when possible.
- if (!GetSurfaceFactory()->UseNewSurfaceAPI())
- return CreateOffscreenGLSurfaceOld(size);
-
return GetSurfaceFactory()->CreateOffscreenGLSurface(GetGLImplementation(),
size);
}
« no previous file with comments | « ui/gl/init/BUILD.gn ('k') | ui/gl/init/gl_init.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698