OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // This file implements the ViewGLContext and PbufferGLContext classes. | 5 // This file implements the ViewGLContext and PbufferGLContext classes. |
6 | 6 |
7 #include "app/gfx/gl/gl_context.h" | 7 #include "ui/gfx/gl/gl_context.h" |
8 | 8 |
9 #include <GL/osmesa.h> | 9 #include <GL/osmesa.h> |
10 #include <OpenGL/OpenGL.h> | 10 #include <OpenGL/OpenGL.h> |
11 | 11 |
12 #include "app/gfx/gl/gl_bindings.h" | |
13 #include "app/gfx/gl/gl_context_osmesa.h" | |
14 #include "app/gfx/gl/gl_context_stub.h" | |
15 #include "app/gfx/gl/gl_implementation.h" | |
16 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
17 #include "base/logging.h" | 13 #include "base/logging.h" |
18 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "ui/gfx/gl/gl_bindings.h" |
| 16 #include "ui/gfx/gl/gl_context_osmesa.h" |
| 17 #include "ui/gfx/gl/gl_context_stub.h" |
| 18 #include "ui/gfx/gl/gl_implementation.h" |
19 | 19 |
20 namespace gfx { | 20 namespace gfx { |
21 | 21 |
22 typedef CGLContextObj GLContextHandle; | 22 typedef CGLContextObj GLContextHandle; |
23 typedef CGLPBufferObj PbufferHandle; | 23 typedef CGLPBufferObj PbufferHandle; |
24 | 24 |
25 // This class is a wrapper around a GL context used for offscreen rendering. | 25 // This class is a wrapper around a GL context used for offscreen rendering. |
26 // It is initially backed by a 1x1 pbuffer. Use it to create an FBO to do useful | 26 // It is initially backed by a 1x1 pbuffer. Use it to create an FBO to do useful |
27 // rendering. | 27 // rendering. |
28 class PbufferGLContext : public GLContext { | 28 class PbufferGLContext : public GLContext { |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 } | 200 } |
201 case kGLImplementationMockGL: | 201 case kGLImplementationMockGL: |
202 return new StubGLContext; | 202 return new StubGLContext; |
203 default: | 203 default: |
204 NOTREACHED(); | 204 NOTREACHED(); |
205 return NULL; | 205 return NULL; |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 } // namespace gfx | 209 } // namespace gfx |
OLD | NEW |