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

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

Issue 17110007: Delete usage and support for EGL_ANGLE_software_display extension. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "ui/gl/gl_surface.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "third_party/mesa/src/include/GL/osmesa.h" 10 #include "third_party/mesa/src/include/GL/osmesa.h"
(...skipping 18 matching lines...) Expand all
29 return false; 29 return false;
30 } 30 }
31 break; 31 break;
32 default: 32 default:
33 break; 33 break;
34 } 34 }
35 return true; 35 return true;
36 } 36 }
37 37
38 scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( 38 scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
39 bool software,
40 gfx::AcceleratedWidget window) { 39 gfx::AcceleratedWidget window) {
41 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); 40 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface");
42 #if defined(USE_AURA) 41 #if defined(USE_AURA)
43 if (software)
44 return NULL;
45
46 switch (GetGLImplementation()) { 42 switch (GetGLImplementation()) {
47 case kGLImplementationDesktopGL: 43 case kGLImplementationDesktopGL:
48 case kGLImplementationAppleGL: { 44 case kGLImplementationAppleGL: {
49 scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window)); 45 scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window));
50 if (!surface->Initialize()) 46 if (!surface->Initialize())
51 return NULL; 47 return NULL;
52 48
53 return surface; 49 return surface;
54 } 50 }
55 case kGLImplementationMockGL: 51 case kGLImplementationMockGL:
56 return new GLSurfaceStub; 52 return new GLSurfaceStub;
57 default: 53 default:
58 NOTREACHED(); 54 NOTREACHED();
59 return NULL; 55 return NULL;
60 } 56 }
61 #else 57 #else
62 return CreateOffscreenGLSurface(software, gfx::Size(1,1)); 58 return CreateOffscreenGLSurface(gfx::Size(1, 1));
63 #endif 59 #endif
64 } 60 }
65 61
66 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( 62 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
67 bool software,
68 const gfx::Size& size) { 63 const gfx::Size& size) {
69 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); 64 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface");
70 if (software)
71 return NULL;
72
73 switch (GetGLImplementation()) { 65 switch (GetGLImplementation()) {
74 case kGLImplementationOSMesaGL: { 66 case kGLImplementationOSMesaGL: {
75 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, 67 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA,
76 size)); 68 size));
77 if (!surface->Initialize()) 69 if (!surface->Initialize())
78 return NULL; 70 return NULL;
79 71
80 return surface; 72 return surface;
81 } 73 }
82 case kGLImplementationDesktopGL: 74 case kGLImplementationDesktopGL:
83 case kGLImplementationAppleGL: { 75 case kGLImplementationAppleGL: {
84 scoped_refptr<GLSurface> surface(new NoOpGLSurfaceCGL(size)); 76 scoped_refptr<GLSurface> surface(new NoOpGLSurfaceCGL(size));
85 if (!surface->Initialize()) 77 if (!surface->Initialize())
86 return NULL; 78 return NULL;
87 79
88 return surface; 80 return surface;
89 } 81 }
90 case kGLImplementationMockGL: 82 case kGLImplementationMockGL:
91 return new GLSurfaceStub; 83 return new GLSurfaceStub;
92 default: 84 default:
93 NOTREACHED(); 85 NOTREACHED();
94 return NULL; 86 return NULL;
95 } 87 }
96 } 88 }
97 89
98 } // namespace gfx 90 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698