| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrGLUtil_DEFINED | 8 #ifndef GrGLUtil_DEFINED |
| 9 #define GrGLUtil_DEFINED | 9 #define GrGLUtil_DEFINED |
| 10 | 10 |
| 11 #include "gl/GrGLInterface.h" | 11 #include "gl/GrGLInterface.h" |
| 12 #include "GrGLDefines.h" | 12 #include "GrGLDefines.h" |
| 13 #include "GrStencil.h" |
| 13 | 14 |
| 14 class SkMatrix; | 15 class SkMatrix; |
| 15 | 16 |
| 16 //////////////////////////////////////////////////////////////////////////////// | 17 //////////////////////////////////////////////////////////////////////////////// |
| 17 | 18 |
| 18 typedef uint32_t GrGLVersion; | 19 typedef uint32_t GrGLVersion; |
| 19 typedef uint32_t GrGLSLVersion; | 20 typedef uint32_t GrGLSLVersion; |
| 20 | 21 |
| 21 #define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \ | 22 #define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \ |
| 22 static_cast<int>(minor)) | 23 static_cast<int>(minor)) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 #define GR_GL_CALL_RET_NOERRCHECK(IFACE, RET, X) \ | 175 #define GR_GL_CALL_RET_NOERRCHECK(IFACE, RET, X) \ |
| 175 do { \ | 176 do { \ |
| 176 GR_GL_CALLBACK_IMPL(IFACE); \ | 177 GR_GL_CALLBACK_IMPL(IFACE); \ |
| 177 (RET) = (IFACE)->fFunctions.f##X; \ | 178 (RET) = (IFACE)->fFunctions.f##X; \ |
| 178 GR_GL_LOG_CALLS_IMPL(X); \ | 179 GR_GL_LOG_CALLS_IMPL(X); \ |
| 179 } while (false) | 180 } while (false) |
| 180 | 181 |
| 181 // call glGetError without doing a redundant error check or logging. | 182 // call glGetError without doing a redundant error check or logging. |
| 182 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError() | 183 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError() |
| 183 | 184 |
| 185 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc); |
| 186 |
| 187 |
| 184 #endif | 188 #endif |
| OLD | NEW |