OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include <GL/osmesa.h> | 9 #include <GL/osmesa.h> |
10 | 10 |
11 #include "gl/SkMesaGLContext.h" | 11 #include "gl/mesa/SkMesaGLContext.h" |
12 #include "gl/GrGLDefines.h" | 12 #include "gl/GrGLDefines.h" |
13 | 13 |
14 static const GrGLint gBOGUS_SIZE = 16; | 14 static const GrGLint gBOGUS_SIZE = 16; |
15 | 15 |
16 SkMesaGLContext::SkMesaGLContext() | 16 SkMesaGLContext::SkMesaGLContext() |
17 : fContext(static_cast<Context>(NULL)) | 17 : fContext(static_cast<Context>(NULL)) |
18 , fImage(NULL) { | 18 , fImage(NULL) { |
19 GR_STATIC_ASSERT(sizeof(Context) == sizeof(OSMesaContext)); | 19 GR_STATIC_ASSERT(sizeof(Context) == sizeof(OSMesaContext)); |
20 | 20 |
21 /* Create an RGBA-mode context */ | 21 /* Create an RGBA-mode context */ |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 void SkMesaGLContext::makeCurrent() const { | 86 void SkMesaGLContext::makeCurrent() const { |
87 if (fContext) { | 87 if (fContext) { |
88 if (!OSMesaMakeCurrent((OSMesaContext)fContext, fImage, | 88 if (!OSMesaMakeCurrent((OSMesaContext)fContext, fImage, |
89 GR_GL_UNSIGNED_BYTE, gBOGUS_SIZE, gBOGUS_SIZE)) { | 89 GR_GL_UNSIGNED_BYTE, gBOGUS_SIZE, gBOGUS_SIZE)) { |
90 SkDebugf("Could not make MESA context current."); | 90 SkDebugf("Could not make MESA context current."); |
91 } | 91 } |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 void SkMesaGLContext::swapBuffers() const { } | 95 void SkMesaGLContext::swapBuffers() const { } |
OLD | NEW |