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 | 9 |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 * | 32 * |
33 * GR_GL_LOG_CALLS: if 1 Gr can print every GL call using GrPrintf. Defaults to | 33 * GR_GL_LOG_CALLS: if 1 Gr can print every GL call using GrPrintf. Defaults to |
34 * 0. Logging can be enabled and disabled at runtime using a debugger via to | 34 * 0. Logging can be enabled and disabled at runtime using a debugger via to |
35 * global gLogCallsGL. The initial value of gLogCallsGL is controlled by | 35 * global gLogCallsGL. The initial value of gLogCallsGL is controlled by |
36 * GR_GL_LOG_CALLS_START. | 36 * GR_GL_LOG_CALLS_START. |
37 * | 37 * |
38 * GR_GL_LOG_CALLS_START: controls the initial value of gLogCallsGL when | 38 * GR_GL_LOG_CALLS_START: controls the initial value of gLogCallsGL when |
39 * GR_GL_LOG_CALLS is 1. Defaults to 0. | 39 * GR_GL_LOG_CALLS is 1. Defaults to 0. |
40 * | 40 * |
41 * GR_GL_CHECK_ERROR: if enabled Gr can do a glGetError() after every GL call. | 41 * GR_GL_CHECK_ERROR: if enabled Gr can do a glGetError() after every GL call. |
42 * Defaults to 1 if GR_DEBUG is set, otherwise 0. When GR_GL_CHECK_ERROR is 1 | 42 * Defaults to 1 if SK_DEBUG is set, otherwise 0. When GR_GL_CHECK_ERROR is 1 |
43 * this can be toggled in a debugger using the gCheckErrorGL global. The initial | 43 * this can be toggled in a debugger using the gCheckErrorGL global. The initial |
44 * value of gCheckErrorGL is controlled by by GR_GL_CHECK_ERROR_START. | 44 * value of gCheckErrorGL is controlled by by GR_GL_CHECK_ERROR_START. |
45 * | 45 * |
46 * GR_GL_CHECK_ERROR_START: controls the initial value of gCheckErrorGL | 46 * GR_GL_CHECK_ERROR_START: controls the initial value of gCheckErrorGL |
47 * when GR_GL_CHECK_ERROR is 1. Defaults to 1. | 47 * when GR_GL_CHECK_ERROR is 1. Defaults to 1. |
48 * | 48 * |
49 * GR_GL_NO_CONSTANT_ATTRIBUTES: if this evaluates to true then the GL backend | 49 * GR_GL_NO_CONSTANT_ATTRIBUTES: if this evaluates to true then the GL backend |
50 * will use uniforms instead of attributes in all cases when there is not | 50 * will use uniforms instead of attributes in all cases when there is not |
51 * per-vertex data. This is important when the underlying GL implementation | 51 * per-vertex data. This is important when the underlying GL implementation |
52 * doesn't actually support immediate style attribute values (e.g. when | 52 * doesn't actually support immediate style attribute values (e.g. when |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 * GR_GL_MUST_USE_VBO: Indicates that all vertices and indices must be rendered | 100 * GR_GL_MUST_USE_VBO: Indicates that all vertices and indices must be rendered |
101 * from VBOs. Chromium's command buffer doesn't allow glVertexAttribArray with | 101 * from VBOs. Chromium's command buffer doesn't allow glVertexAttribArray with |
102 * ARARY_BUFFER 0 bound or glDrawElements with ELEMENT_ARRAY_BUFFER 0 bound. | 102 * ARARY_BUFFER 0 bound or glDrawElements with ELEMENT_ARRAY_BUFFER 0 bound. |
103 * | 103 * |
104 * GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE is for compatibility with the new versi
on | 104 * GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE is for compatibility with the new versi
on |
105 * of the OpenGLES2.0 headers from Khronos. glShaderSource now takes a const ch
ar * const *, | 105 * of the OpenGLES2.0 headers from Khronos. glShaderSource now takes a const ch
ar * const *, |
106 * instead of a const char | 106 * instead of a const char |
107 */ | 107 */ |
108 | 108 |
109 #if !defined(GR_GL_LOG_CALLS) | 109 #if !defined(GR_GL_LOG_CALLS) |
110 #define GR_GL_LOG_CALLS GR_DEBUG | 110 #define GR_GL_LOG_CALLS SK_DEBUG |
111 #endif | 111 #endif |
112 | 112 |
113 #if !defined(GR_GL_LOG_CALLS_START) | 113 #if !defined(GR_GL_LOG_CALLS_START) |
114 #define GR_GL_LOG_CALLS_START 0 | 114 #define GR_GL_LOG_CALLS_START 0 |
115 #endif | 115 #endif |
116 | 116 |
117 #if !defined(GR_GL_CHECK_ERROR) | 117 #if !defined(GR_GL_CHECK_ERROR) |
118 #define GR_GL_CHECK_ERROR GR_DEBUG | 118 #define GR_GL_CHECK_ERROR SK_DEBUG |
119 #endif | 119 #endif |
120 | 120 |
121 #if !defined(GR_GL_CHECK_ERROR_START) | 121 #if !defined(GR_GL_CHECK_ERROR_START) |
122 #define GR_GL_CHECK_ERROR_START 1 | 122 #define GR_GL_CHECK_ERROR_START 1 |
123 #endif | 123 #endif |
124 | 124 |
125 #if !defined(GR_GL_NO_CONSTANT_ATTRIBUTES) | 125 #if !defined(GR_GL_NO_CONSTANT_ATTRIBUTES) |
126 #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 | 126 #define GR_GL_NO_CONSTANT_ATTRIBUTES 0 |
127 #endif | 127 #endif |
128 | 128 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 * trick every 128 array buffer uploads. | 185 * trick every 128 array buffer uploads. |
186 * | 186 * |
187 * Hopefully we will understand this better and have a cleaner fix or get a | 187 * Hopefully we will understand this better and have a cleaner fix or get a |
188 * OS/driver level fix. | 188 * OS/driver level fix. |
189 */ | 189 */ |
190 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ | 190 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ |
191 (GR_MAC_BUILD && \ | 191 (GR_MAC_BUILD && \ |
192 !GR_GL_USE_BUFFER_DATA_NULL_HINT) | 192 !GR_GL_USE_BUFFER_DATA_NULL_HINT) |
193 | 193 |
194 #endif | 194 #endif |
OLD | NEW |