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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 #endif | 163 #endif |
164 | 164 |
165 #if !defined(GR_GL_MUST_USE_VBO) | 165 #if !defined(GR_GL_MUST_USE_VBO) |
166 #define GR_GL_MUST_USE_VBO 0 | 166 #define GR_GL_MUST_USE_VBO 0 |
167 #endif | 167 #endif |
168 | 168 |
169 #if !defined(GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE) | 169 #if !defined(GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE) |
170 #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 0 | 170 #define GR_GL_USE_NEW_SHADER_SOURCE_SIGNATURE 0 |
171 #endif | 171 #endif |
172 | 172 |
173 // We now have a separate GrGLInterface function pointer entry for the IMG/EXT v
ersion of | |
174 // glRenderbufferStorageMultisampled. However, Chrome is setting the one we now
use for | |
175 // ES3 MSAA to point to the IMG/EXT function. This macro exists to make Skia ign
ore the | |
176 // ES3 MSAA and instead use the IMG/EXT version with the old function pointer en
try. It will | |
177 // be removed as soon as Chrome is updated to set the new function pointer. | |
178 #if !defined(GR_GL_IGNORE_ES3_MSAA) | |
179 #define GR_GL_IGNORE_ES3_MSAA 0 | |
180 #endif | |
181 | |
182 /** | 173 /** |
183 * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't | 174 * There is a strange bug that occurs on Macs with NVIDIA GPUs. We don't |
184 * fully understand it. When (element) array buffers are continually | 175 * fully understand it. When (element) array buffers are continually |
185 * respecified using glBufferData performance can fall off of a cliff. The | 176 * respecified using glBufferData performance can fall off of a cliff. The |
186 * driver winds up performing many DMA mapping / unmappings and chews up ~50% of | 177 * driver winds up performing many DMA mapping / unmappings and chews up ~50% of |
187 * the core. However, it has been observed that occaisonally respecifiying the | 178 * the core. However, it has been observed that occaisonally respecifiying the |
188 * buffer using glBufferData and then writing data using glBufferSubData | 179 * buffer using glBufferData and then writing data using glBufferSubData |
189 * prevents the bad behavior. | 180 * prevents the bad behavior. |
190 * | 181 * |
191 * There is a lot of uncertainty around this issue. In Chrome backgrounding | 182 * There is a lot of uncertainty around this issue. In Chrome backgrounding |
(...skipping 10 matching lines...) Expand all Loading... |
202 * trick every 128 array buffer uploads. | 193 * trick every 128 array buffer uploads. |
203 * | 194 * |
204 * Hopefully we will understand this better and have a cleaner fix or get a | 195 * Hopefully we will understand this better and have a cleaner fix or get a |
205 * OS/driver level fix. | 196 * OS/driver level fix. |
206 */ | 197 */ |
207 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ | 198 #define GR_GL_MAC_BUFFER_OBJECT_PERFOMANCE_WORKAROUND \ |
208 (defined(SK_BUILD_FOR_MAC) && \ | 199 (defined(SK_BUILD_FOR_MAC) && \ |
209 !GR_GL_USE_BUFFER_DATA_NULL_HINT) | 200 !GR_GL_USE_BUFFER_DATA_NULL_HINT) |
210 | 201 |
211 #endif | 202 #endif |
OLD | NEW |