| 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 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3484 this->setVertexArrayID(gpu, 0); | 3484 this->setVertexArrayID(gpu, 0); |
| 3485 } | 3485 } |
| 3486 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3486 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3487 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3487 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3488 fDefaultVertexArrayAttribState.resize(attrCount); | 3488 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3489 } | 3489 } |
| 3490 attribState = &fDefaultVertexArrayAttribState; | 3490 attribState = &fDefaultVertexArrayAttribState; |
| 3491 } | 3491 } |
| 3492 return attribState; | 3492 return attribState; |
| 3493 } | 3493 } |
| 3494 |
| 3495 bool GrGLGpu::onMakeCopyForTextureParams(GrTexture* texture, const GrTexturePara
ms& textureParams, |
| 3496 GrTextureProducer::CopyParams* copyPara
ms) const { |
| 3497 if (textureParams.isTiled() || |
| 3498 GrTextureParams::kMipMap_FilterMode == textureParams.filterMode()) { |
| 3499 GrGLTexture* glTexture = static_cast<GrGLTexture*>(texture); |
| 3500 if (GR_GL_TEXTURE_EXTERNAL == glTexture->target() || |
| 3501 GR_GL_TEXTURE_RECTANGLE == glTexture->target()) { |
| 3502 copyParams->fFilter = GrTextureParams::kNone_FilterMode; |
| 3503 copyParams->fWidth = texture->width(); |
| 3504 copyParams->fHeight = texture->height(); |
| 3505 return true; |
| 3506 } |
| 3507 } |
| 3508 return false; |
| 3509 } |
| OLD | NEW |