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 | 8 |
9 #include "GrGLGpu.h" | 9 #include "GrGLGpu.h" |
10 #include "GrGLGLSL.h" | 10 #include "GrGLGLSL.h" |
(...skipping 3329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3340 | 3340 |
3341 if (!abandonTexture) { | 3341 if (!abandonTexture) { |
3342 GL_CALL(DeleteTextures(1, &texID)); | 3342 GL_CALL(DeleteTextures(1, &texID)); |
3343 } | 3343 } |
3344 | 3344 |
3345 #ifndef SK_IGNORE_GL_TEXTURE_TARGET | 3345 #ifndef SK_IGNORE_GL_TEXTURE_TARGET |
3346 delete info; | 3346 delete info; |
3347 #endif | 3347 #endif |
3348 } | 3348 } |
3349 | 3349 |
| 3350 void GrGLGpu::resetShaderCacheForTesting() const { |
| 3351 fProgramCache->abandon(); |
| 3352 } |
| 3353 |
3350 /////////////////////////////////////////////////////////////////////////////// | 3354 /////////////////////////////////////////////////////////////////////////////// |
3351 GrGLAttribArrayState* GrGLGpu::HWGeometryState::bindArrayAndBuffersToDraw( | 3355 GrGLAttribArrayState* GrGLGpu::HWGeometryState::bindArrayAndBuffersToDraw( |
3352 GrGLGpu* gpu, | 3356 GrGLGpu* gpu, |
3353 const GrGLVertexBuffer* vbuffer, | 3357 const GrGLVertexBuffer* vbuffer, |
3354 const GrGLIndexBuffer* ibuffer)
{ | 3358 const GrGLIndexBuffer* ibuffer)
{ |
3355 SkASSERT(vbuffer); | 3359 SkASSERT(vbuffer); |
3356 GrGLuint vbufferID = vbuffer->bufferID(); | 3360 GrGLuint vbufferID = vbuffer->bufferID(); |
3357 GrGLuint* ibufferIDPtr = nullptr; | 3361 GrGLuint* ibufferIDPtr = nullptr; |
3358 GrGLuint ibufferID; | 3362 GrGLuint ibufferID; |
3359 if (ibuffer) { | 3363 if (ibuffer) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3398 this->setVertexArrayID(gpu, 0); | 3402 this->setVertexArrayID(gpu, 0); |
3399 } | 3403 } |
3400 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3404 int attrCount = gpu->glCaps().maxVertexAttributes(); |
3401 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3405 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
3402 fDefaultVertexArrayAttribState.resize(attrCount); | 3406 fDefaultVertexArrayAttribState.resize(attrCount); |
3403 } | 3407 } |
3404 attribState = &fDefaultVertexArrayAttribState; | 3408 attribState = &fDefaultVertexArrayAttribState; |
3405 } | 3409 } |
3406 return attribState; | 3410 return attribState; |
3407 } | 3411 } |
OLD | NEW |