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

Unified Diff: ui/gfx/gl/gl_surface_mac.cc

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 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/gfx/gl/gl_surface_linux.cc ('k') | ui/gfx/gl/gl_surface_nsview.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/gl/gl_surface_mac.cc
diff --git a/ui/gfx/gl/gl_surface_mac.cc b/ui/gfx/gl/gl_surface_mac.cc
deleted file mode 100644
index 30ad6b73d29ca18ad8ec3053bdff02fa5366bc4a..0000000000000000000000000000000000000000
--- a/ui/gfx/gl/gl_surface_mac.cc
+++ /dev/null
@@ -1,95 +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/gfx/gl/gl_surface.h"
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "third_party/mesa/MesaLib/include/GL/osmesa.h"
-#include "ui/gfx/gl/gl_bindings.h"
-#include "ui/gfx/gl/gl_implementation.h"
-#include "ui/gfx/gl/gl_surface_cgl.h"
-#include "ui/gfx/gl/gl_surface_osmesa.h"
-#include "ui/gfx/gl/gl_surface_stub.h"
-
-#if defined(USE_AURA)
-#include "ui/gfx/gl/gl_surface_nsview.h"
-#endif
-
-namespace gfx {
-
-bool GLSurface::InitializeOneOffInternal() {
- switch (GetGLImplementation()) {
- case kGLImplementationDesktopGL:
- case kGLImplementationAppleGL:
- if (!GLSurfaceCGL::InitializeOneOff()) {
- LOG(ERROR) << "GLSurfaceCGL::InitializeOneOff failed.";
- return false;
- }
- break;
- default:
- break;
- }
- return true;
-}
-
-scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
- bool software,
- gfx::AcceleratedWidget window) {
-#if defined(USE_AURA)
- if (software)
- return NULL;
-
- switch (GetGLImplementation()) {
- case kGLImplementationDesktopGL:
- case kGLImplementationAppleGL: {
- scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window));
- if (!surface->Initialize())
- return NULL;
-
- return surface;
- }
- case kGLImplementationMockGL:
- return new GLSurfaceStub;
- default:
- NOTREACHED();
- return NULL;
- }
-#else
- return CreateOffscreenGLSurface(software, gfx::Size(1,1));
-#endif
-}
-
-scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
- bool software,
- const gfx::Size& size) {
- if (software)
- return NULL;
-
- switch (GetGLImplementation()) {
- case kGLImplementationOSMesaGL: {
- scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA,
- size));
- if (!surface->Initialize())
- return NULL;
-
- return surface;
- }
- case kGLImplementationDesktopGL:
- case kGLImplementationAppleGL: {
- scoped_refptr<GLSurface> surface(new NoOpGLSurfaceCGL(size));
- if (!surface->Initialize())
- return NULL;
-
- return surface;
- }
- case kGLImplementationMockGL:
- return new GLSurfaceStub;
- default:
- NOTREACHED();
- return NULL;
- }
-}
-
-} // namespace gfx
« no previous file with comments | « ui/gfx/gl/gl_surface_linux.cc ('k') | ui/gfx/gl/gl_surface_nsview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698