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

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

Issue 231883003: [stash] 20140404-crbug-312961-mac-views-bridge-C-wholegrid Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 | « ui/gfx/native_widget_types.h ('k') | ui/native_theme/native_theme_mac.mm » ('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 29 matching lines...) Expand all
40 case kGLImplementationAppleGL: { 40 case kGLImplementationAppleGL: {
41 scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window)); 41 scoped_refptr<GLSurface> surface(new GLSurfaceNSView(window));
42 if (!surface->Initialize()) 42 if (!surface->Initialize())
43 return NULL; 43 return NULL;
44 44
45 return surface; 45 return surface;
46 } 46 }
47 case kGLImplementationMockGL: 47 case kGLImplementationMockGL:
48 return new GLSurfaceStub; 48 return new GLSurfaceStub;
49 default: 49 default:
50 NOTREACHED(); 50 NOTREACHED() << GetGLImplementation();
51 return NULL; 51 return NULL;
52 } 52 }
53 } 53 }
54 54
55 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( 55 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
56 const gfx::Size& size) { 56 const gfx::Size& size) {
57 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); 57 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface");
58 switch (GetGLImplementation()) { 58 switch (GetGLImplementation()) {
59 case kGLImplementationOSMesaGL: { 59 case kGLImplementationOSMesaGL: {
60 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, 60 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA,
(...skipping 13 matching lines...) Expand all
74 } 74 }
75 case kGLImplementationMockGL: 75 case kGLImplementationMockGL:
76 return new GLSurfaceStub; 76 return new GLSurfaceStub;
77 default: 77 default:
78 NOTREACHED(); 78 NOTREACHED();
79 return NULL; 79 return NULL;
80 } 80 }
81 } 81 }
82 82
83 } // namespace gfx 83 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/native_widget_types.h ('k') | ui/native_theme/native_theme_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698