Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/gpu/gl/GrGpuGL.h

Issue 23542013: Improve handling of FF vertex array state (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 public: 295 public:
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();
robertphillips 2013/09/09 13:53:33 NULL !=?
bsalomon 2013/09/09 14:11:44 Done.
306 if (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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698