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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 * stencil formats as attachments. If the FBO is complete we will assume | 93 * stencil formats as attachments. If the FBO is complete we will assume |
94 * subsequent attachments with the same formats are complete as well. | 94 * subsequent attachments with the same formats are complete as well. |
95 * | 95 * |
96 * GR_GL_USE_NV_PATH_RENDERING: Enable experimental support for | 96 * GR_GL_USE_NV_PATH_RENDERING: Enable experimental support for |
97 * GL_NV_path_rendering. There are known issues with clipping, non-AA paths, and | 97 * GL_NV_path_rendering. There are known issues with clipping, non-AA paths, and |
98 * perspective. | 98 * perspective. |
99 * | 99 * |
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 * |
| 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 *, |
| 106 * instead of a const char |
103 */ | 107 */ |
104 | 108 |
105 #if !defined(GR_GL_LOG_CALLS) | 109 #if !defined(GR_GL_LOG_CALLS) |
106 #define GR_GL_LOG_CALLS GR_DEBUG | 110 #define GR_GL_LOG_CALLS GR_DEBUG |
107 #endif | 111 #endif |
108 | 112 |
109 #if !defined(GR_GL_LOG_CALLS_START) | 113 #if !defined(GR_GL_LOG_CALLS_START) |
110 #define GR_GL_LOG_CALLS_START 0 | 114 #define GR_GL_LOG_CALLS_START 0 |
111 #endif | 115 #endif |
112 | 116 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 #endif | 151 #endif |
148 | 152 |
149 #if !defined(GR_GL_USE_NV_PATH_RENDERING) | 153 #if !defined(GR_GL_USE_NV_PATH_RENDERING) |
150 #define GR_GL_USE_NV_PATH_RENDERING 0 | 154 #define GR_GL_USE_NV_PATH_RENDERING 0 |
151 #endif | 155 #endif |
152 | 156 |
153 #if !defined(GR_GL_MUST_USE_VBO) | 157 #if !defined(GR_GL_MUST_USE_VBO) |
154 #define GR_GL_MUST_USE_VBO 0 | 158 #define GR_GL_MUST_USE_VBO 0 |
155 #endif | 159 #endif |
156 | 160 |
| 161 #if !defined(GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE) |
| 162 #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 0 |
| 163 #endif |
| 164 |
157 /** | 165 /** |
158 * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't | 166 * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't |
159 * fully understand it. When (element) array buffers are continually | 167 * fully understand it. When (element) array buffers are continually |
160 * respecified using glBufferData performance can fall off of a cliff. The | 168 * respecified using glBufferData performance can fall off of a cliff. The |
161 * driver winds up performing many DMA mapping / unmappings and chews up ~50% of | 169 * driver winds up performing many DMA mapping / unmappings and chews up ~50% of |
162 * the core. However, it has been observed that occaisonally respecifiying the | 170 * the core. However, it has been observed that occaisonally respecifiying the |
163 * buffer using glBufferData and then writing data using glBufferSubData | 171 * buffer using glBufferData and then writing data using glBufferSubData |
164 * prevents the bad behavior. | 172 * prevents the bad behavior. |
165 * | 173 * |
166 * There is a lot of uncertainty around this issue. In Chrome backgrounding | 174 * There is a lot of uncertainty around this issue. In Chrome backgrounding |
(...skipping 10 matching lines...) Expand all Loading... |
177 * trick every 128 array buffer uploads. | 185 * trick every 128 array buffer uploads. |
178 * | 186 * |
179 * 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 |
180 * OS/driver level fix. | 188 * OS/driver level fix. |
181 */ | 189 */ |
182 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ | 190 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ |
183 (GR_MAC_BUILD && \ | 191 (GR_MAC_BUILD && \ |
184 !GR_GL_USE_BUFFER_DATA_NULL_HINT) | 192 !GR_GL_USE_BUFFER_DATA_NULL_HINT) |
185 | 193 |
186 #endif | 194 #endif |
OLD | NEW |