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

Unified Diff: ui/gl/gl_surface_android.cc

Issue 13886018: Add a factory and defines for native Linux surfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 7 years, 7 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/gl_implementation_ozone.cc ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_surface_android.cc
diff --git a/ui/gl/gl_surface_android.cc b/ui/gl/gl_surface_android.cc
deleted file mode 100644
index 6c2565798a375b2b97783fe2612244314824fce9..0000000000000000000000000000000000000000
--- a/ui/gl/gl_surface_android.cc
+++ /dev/null
@@ -1,85 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/gl/gl_surface.h"
-
-#include <EGL/egl.h>
-
-#include "base/logging.h"
-#include "base/memory/ref_counted.h"
-#include "ui/gl/egl_util.h"
-#include "ui/gl/gl_bindings.h"
-#include "ui/gl/gl_context.h"
-#include "ui/gl/gl_implementation.h"
-#include "ui/gl/gl_surface_egl.h"
-#include "ui/gl/gl_surface_stub.h"
-
-using ui::GetLastEGLErrorString;
-
-namespace gfx {
-
-bool GLSurface::InitializeOneOffInternal() {
- static bool initialized = false;
- if (initialized)
- return true;
-
- switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2:
- if (!GLSurfaceEGL::InitializeOneOff()) {
- LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed.";
- return false;
- }
- break;
- default:
- NOTREACHED();
- break;
- }
-
- initialized = true;
- return true;
-}
-// static
-scoped_refptr<GLSurface>
-GLSurface::CreateViewGLSurface(bool software, gfx::AcceleratedWidget window) {
- if (software)
- return NULL;
-
- switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2: {
- scoped_refptr<GLSurface> surface;
- if (window)
- surface = new NativeViewGLSurfaceEGL(false, window);
- else
- surface = new GLSurfaceStub();
- if (!surface->Initialize())
- return NULL;
- return surface;
- }
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-// static
-scoped_refptr<GLSurface>
-GLSurface::CreateOffscreenGLSurface(bool software, const gfx::Size& size) {
- if (software)
- return NULL;
-
- switch (GetGLImplementation()) {
- case kGLImplementationEGLGLES2: {
- scoped_refptr<PbufferGLSurfaceEGL> surface(
- new PbufferGLSurfaceEGL(false, size));
- if (!surface->Initialize())
- return NULL;
- return surface;
- }
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gl/gl_implementation_ozone.cc ('k') | ui/gl/gl_surface_egl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698