| OLD | NEW |
| 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 25 matching lines...) Expand all Loading... |
| 36 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); | 36 TRACE_EVENT0("gpu", "GLSurface::CreateViewGLSurface"); |
| 37 switch (GetGLImplementation()) { | 37 switch (GetGLImplementation()) { |
| 38 case kGLImplementationDesktopGL: | 38 case kGLImplementationDesktopGL: |
| 39 case kGLImplementationAppleGL: { | 39 case kGLImplementationAppleGL: { |
| 40 NOTIMPLEMENTED() << "No onscreen support on Mac."; | 40 NOTIMPLEMENTED() << "No onscreen support on Mac."; |
| 41 return NULL; | 41 return NULL; |
| 42 } | 42 } |
| 43 case kGLImplementationMockGL: | 43 case kGLImplementationMockGL: |
| 44 return new GLSurfaceStub; | 44 return new GLSurfaceStub; |
| 45 default: | 45 default: |
| 46 NOTREACHED(); | 46 NOTREACHED() << GetGLImplementation(); |
| 47 return NULL; | 47 return NULL; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 | 50 |
| 51 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( | 51 scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface( |
| 52 const gfx::Size& size) { | 52 const gfx::Size& size) { |
| 53 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); | 53 TRACE_EVENT0("gpu", "GLSurface::CreateOffscreenGLSurface"); |
| 54 switch (GetGLImplementation()) { | 54 switch (GetGLImplementation()) { |
| 55 case kGLImplementationOSMesaGL: { | 55 case kGLImplementationOSMesaGL: { |
| 56 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, | 56 scoped_refptr<GLSurface> surface(new GLSurfaceOSMesa(OSMESA_RGBA, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 70 } | 70 } |
| 71 case kGLImplementationMockGL: | 71 case kGLImplementationMockGL: |
| 72 return new GLSurfaceStub; | 72 return new GLSurfaceStub; |
| 73 default: | 73 default: |
| 74 NOTREACHED(); | 74 NOTREACHED(); |
| 75 return NULL; | 75 return NULL; |
| 76 } | 76 } |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace gfx | 79 } // namespace gfx |
| OLD | NEW |