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

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

Issue 504933002: Fix create OnScreen surface on Mac for compositor_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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 <OpenGL/CGLRenderers.h> 7 #include <OpenGL/CGLRenderers.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface( 110 scoped_refptr<GLSurface> GLSurface::CreateViewGLSurface(
111 gfx::AcceleratedWidget window) { 111 gfx::AcceleratedWidget window) {
112 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); 112 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface");
113 switch (GetGLImplementation()) { 113 switch (GetGLImplementation()) {
114 case kGLImplementationDesktopGL: 114 case kGLImplementationDesktopGL:
115 case kGLImplementationAppleGL: { 115 case kGLImplementationAppleGL: {
116 NOTIMPLEMENTED() << "No onscreen support on Mac."; 116 NOTIMPLEMENTED() << "No onscreen support on Mac.";
117 return NULL; 117 return NULL;
118 } 118 }
119 case kGLImplementationOSMesaGL: {
120 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesaHeadless());
121 if (!surface->Initialize())
122 return NULL;
123 return surface;
124 }
119 case kGLImplementationMockGL: 125 case kGLImplementationMockGL:
120 return new GLSurfaceStub; 126 return new GLSurfaceStub;
121 default: 127 default:
122 NOTREACHED(); 128 NOTREACHED();
123 return NULL; 129 return NULL;
124 } 130 }
125 } 131 }
126 132
127 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( 133 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
128 const gfx::Size& size) { 134 const gfx::Size& size) {
(...skipping 17 matching lines...) Expand all
146 } 152 }
147 case kGLImplementationMockGL: 153 case kGLImplementationMockGL:
148 return new GLSurfaceStub; 154 return new GLSurfaceStub;
149 default: 155 default:
150 NOTREACHED(); 156 NOTREACHED();
151 return NULL; 157 return NULL;
152 } 158 }
153 } 159 }
154 160
155 } // namespace gfx 161 } // namespace gfx
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698