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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 | 306 |
307 void notifyVertexArrayDelete(GrGLuint id) { | 307 void notifyVertexArrayDelete(GrGLuint id) { |
308 if (fBoundVertexArrayIDIsValid && fBoundVertexArrayID == id) { | 308 if (fBoundVertexArrayIDIsValid && fBoundVertexArrayID == id) { |
309 // Does implicit bind to 0 | 309 // Does implicit bind to 0 |
310 fBoundVertexArrayID = 0; | 310 fBoundVertexArrayID = 0; |
311 } | 311 } |
312 } | 312 } |
313 | 313 |
314 void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) { | 314 void setVertexArrayID(GrGpuGL* gpu, GrGLuint arrayID) { |
315 if (!gpu->glCaps().vertexArrayObjectSupport()) { | 315 if (!gpu->glCaps().vertexArrayObjectSupport()) { |
316 GrAssert(0 == arrayID); | 316 SkASSERT(0 == arrayID); |
317 return; | 317 return; |
318 } | 318 } |
319 if (!fBoundVertexArrayIDIsValid || arrayID != fBoundVertexArrayID) { | 319 if (!fBoundVertexArrayIDIsValid || arrayID != fBoundVertexArrayID) { |
320 GR_GL_CALL(gpu->glInterface(), BindVertexArray(arrayID)); | 320 GR_GL_CALL(gpu->glInterface(), BindVertexArray(arrayID)); |
321 fBoundVertexArrayIDIsValid = true; | 321 fBoundVertexArrayIDIsValid = true; |
322 fBoundVertexArrayID = arrayID; | 322 fBoundVertexArrayID = arrayID; |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 void notifyVertexBufferDelete(GrGLuint id) { | 326 void notifyVertexBufferDelete(GrGLuint id) { |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 ///@} | 430 ///@} |
431 | 431 |
432 // we record what stencil format worked last time to hopefully exit early | 432 // we record what stencil format worked last time to hopefully exit early |
433 // from our loop that tries stencil formats and calls check fb status. | 433 // from our loop that tries stencil formats and calls check fb status. |
434 int fLastSuccessfulStencilFmtIdx; | 434 int fLastSuccessfulStencilFmtIdx; |
435 | 435 |
436 typedef GrGpu INHERITED; | 436 typedef GrGpu INHERITED; |
437 }; | 437 }; |
438 | 438 |
439 #endif | 439 #endif |
OLD | NEW |