| 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 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 /** | 131 /** |
| 132 * Helpers for glGetError() | 132 * Helpers for glGetError() |
| 133 */ | 133 */ |
| 134 | 134 |
| 135 void GrGLCheckErr(const GrGLInterface* gl, | 135 void GrGLCheckErr(const GrGLInterface* gl, |
| 136 const char* location, | 136 const char* location, |
| 137 const char* call); | 137 const char* call); |
| 138 | 138 |
| 139 void GrGLClearErr(const GrGLInterface* gl); | 139 void GrGLClearErr(const GrGLInterface* gl); |
| 140 | 140 |
| 141 /** | |
| 142 * Helper for converting SkMatrix to a column-major GL float array | |
| 143 */ | |
| 144 template<int MatrixSize> void GrGLGetMatrix(float* dest, const SkMatrix& src); | |
| 145 | |
| 146 //////////////////////////////////////////////////////////////////////////////// | 141 //////////////////////////////////////////////////////////////////////////////// |
| 147 | 142 |
| 148 /** | 143 /** |
| 149 * Macros for using GrGLInterface to make GL calls | 144 * Macros for using GrGLInterface to make GL calls |
| 150 */ | 145 */ |
| 151 | 146 |
| 152 // internal macro to conditionally call glGetError based on compile-time and | 147 // internal macro to conditionally call glGetError based on compile-time and |
| 153 // run-time flags. | 148 // run-time flags. |
| 154 #if GR_GL_CHECK_ERROR | 149 #if GR_GL_CHECK_ERROR |
| 155 extern bool gCheckErrorGL; | 150 extern bool gCheckErrorGL; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 GR_GL_LOG_CALLS_IMPL(X); \ | 204 GR_GL_LOG_CALLS_IMPL(X); \ |
| 210 } while (false) | 205 } while (false) |
| 211 | 206 |
| 212 // call glGetError without doing a redundant error check or logging. | 207 // call glGetError without doing a redundant error check or logging. |
| 213 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError() | 208 #define GR_GL_GET_ERROR(IFACE) (IFACE)->fFunctions.fGetError() |
| 214 | 209 |
| 215 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc); | 210 GrGLenum GrToGLStencilFunc(GrStencilFunc basicFunc); |
| 216 | 211 |
| 217 | 212 |
| 218 #endif | 213 #endif |
| OLD | NEW |