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 #ifndef GrGpuGL_DEFINED | 8 #ifndef GrGpuGL_DEFINED |
9 #define GrGpuGL_DEFINED | 9 #define GrGpuGL_DEFINED |
10 | 10 |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 HWGeometryState() { fVBOVertexArray = NULL; this->invalidate(); } | 296 HWGeometryState() { fVBOVertexArray = NULL; this->invalidate(); } |
297 | 297 |
298 ~HWGeometryState() { SkSafeUnref(fVBOVertexArray); } | 298 ~HWGeometryState() { SkSafeUnref(fVBOVertexArray); } |
299 | 299 |
300 void invalidate() { | 300 void invalidate() { |
301 fBoundVertexArrayIDIsValid = false; | 301 fBoundVertexArrayIDIsValid = false; |
302 fBoundVertexBufferIDIsValid = false; | 302 fBoundVertexBufferIDIsValid = false; |
303 fDefaultVertexArrayBoundIndexBufferID = false; | 303 fDefaultVertexArrayBoundIndexBufferID = false; |
304 fDefaultVertexArrayBoundIndexBufferIDIsValid = false; | 304 fDefaultVertexArrayBoundIndexBufferIDIsValid = false; |
305 fDefaultVertexArrayAttribState.invalidate(); | 305 fDefaultVertexArrayAttribState.invalidate(); |
| 306 if (NULL != fVBOVertexArray) { |
| 307 fVBOVertexArray->invalidateCachedState(); |
| 308 } |
306 } | 309 } |
307 | 310 |
308 void notifyVertexArrayDelete(GrGLuint id) { | 311 void notifyVertexArrayDelete(GrGLuint id) { |
309 if (fBoundVertexArrayIDIsValid && fBoundVertexArrayID == id) { | 312 if (fBoundVertexArrayIDIsValid && fBoundVertexArrayID == id) { |
310 // Does implicit bind to 0 | 313 // Does implicit bind to 0 |
311 fBoundVertexArrayID = 0; | 314 fBoundVertexArrayID = 0; |
312 } | 315 } |
313 } | 316 } |
314 | 317 |
315 void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) { | 318 void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 ///@} | 434 ///@} |
432 | 435 |
433 // we record what stencil format worked last time to hopefully exit early | 436 // we record what stencil format worked last time to hopefully exit early |
434 // from our loop that tries stencil formats and calls check fb status. | 437 // from our loop that tries stencil formats and calls check fb status. |
435 int fLastSuccessfulStencilFmtIdx; | 438 int fLastSuccessfulStencilFmtIdx; |
436 | 439 |
437 typedef GrGpu INHERITED; | 440 typedef GrGpu INHERITED; |
438 }; | 441 }; |
439 | 442 |
440 #endif | 443 #endif |
OLD | NEW |