OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #include "GrGLUtil.h" | 9 #include "GrGLUtil.h" |
10 #include "SkMatrix.h" | 10 #include "SkMatrix.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 } | 32 } |
33 return "Unknown"; | 33 return "Unknown"; |
34 } | 34 } |
35 } | 35 } |
36 | 36 |
37 void GrGLCheckErr(const GrGLInterface* gl, | 37 void GrGLCheckErr(const GrGLInterface* gl, |
38 const char* location, | 38 const char* location, |
39 const char* call) { | 39 const char* call) { |
40 uint32_t err = GR_GL_GET_ERROR(gl); | 40 uint32_t err = GR_GL_GET_ERROR(gl); |
41 if (GR_GL_NO_ERROR != err) { | 41 if (GR_GL_NO_ERROR != err) { |
42 GrPrintf("---- glGetError 0x%x(%s)", err, get_error_string(err)); | 42 SkDebugf("---- glGetError 0x%x(%s)", err, get_error_string(err)); |
43 if (location) { | 43 if (location) { |
44 GrPrintf(" at\n\t%s", location); | 44 SkDebugf(" at\n\t%s", location); |
45 } | 45 } |
46 if (call) { | 46 if (call) { |
47 GrPrintf("\n\t\t%s", call); | 47 SkDebugf("\n\t\t%s", call); |
48 } | 48 } |
49 GrPrintf("\n"); | 49 SkDebugf("\n"); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 /////////////////////////////////////////////////////////////////////////////// | 53 /////////////////////////////////////////////////////////////////////////////// |
54 | 54 |
55 #if GR_GL_LOG_CALLS | 55 #if GR_GL_LOG_CALLS |
56 bool gLogCallsGL = !!(GR_GL_LOG_CALLS_START); | 56 bool gLogCallsGL = !!(GR_GL_LOG_CALLS_START); |
57 #endif | 57 #endif |
58 | 58 |
59 #if GR_GL_CHECK_ERROR | 59 #if GR_GL_CHECK_ERROR |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 GR_STATIC_ASSERT(2 == kGreater_StencilFunc); | 282 GR_STATIC_ASSERT(2 == kGreater_StencilFunc); |
283 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc); | 283 GR_STATIC_ASSERT(3 == kGEqual_StencilFunc); |
284 GR_STATIC_ASSERT(4 == kLess_StencilFunc); | 284 GR_STATIC_ASSERT(4 == kLess_StencilFunc); |
285 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc); | 285 GR_STATIC_ASSERT(5 == kLEqual_StencilFunc); |
286 GR_STATIC_ASSERT(6 == kEqual_StencilFunc); | 286 GR_STATIC_ASSERT(6 == kEqual_StencilFunc); |
287 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc); | 287 GR_STATIC_ASSERT(7 == kNotEqual_StencilFunc); |
288 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount); | 288 SkASSERT((unsigned) basicFunc < kBasicStencilFuncCount); |
289 | 289 |
290 return gTable[basicFunc]; | 290 return gTable[basicFunc]; |
291 } | 291 } |
OLD | NEW |