| 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 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2709 return false; | 2709 return false; |
| 2710 } | 2710 } |
| 2711 | 2711 |
| 2712 // We'll do a CopyTexSubImage. Make the dst a plain old texture. | 2712 // We'll do a CopyTexSubImage. Make the dst a plain old texture. |
| 2713 desc->fConfig = src->config(); | 2713 desc->fConfig = src->config(); |
| 2714 desc->fOrigin = src->origin(); | 2714 desc->fOrigin = src->origin(); |
| 2715 desc->fFlags = kNone_GrSurfaceFlags; | 2715 desc->fFlags = kNone_GrSurfaceFlags; |
| 2716 return true; | 2716 return true; |
| 2717 } | 2717 } |
| 2718 | 2718 |
| 2719 bool GrGLGpu::copySurface(GrSurface* dst, | 2719 bool GrGLGpu::onCopySurface(GrSurface* dst, |
| 2720 GrSurface* src, | 2720 GrSurface* src, |
| 2721 const SkIRect& srcRect, | 2721 const SkIRect& srcRect, |
| 2722 const SkIPoint& dstPoint) { | 2722 const SkIPoint& dstPoint) { |
| 2723 if (src->asTexture() && dst->asRenderTarget()) { | 2723 if (src->asTexture() && dst->asRenderTarget()) { |
| 2724 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint); | 2724 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint); |
| 2725 return true; | 2725 return true; |
| 2726 } | 2726 } |
| 2727 | 2727 |
| 2728 if (can_copy_texsubimage(dst, src, this)) { | 2728 if (can_copy_texsubimage(dst, src, this)) { |
| 2729 this->copySurfaceAsCopyTexSubImage(dst, src, srcRect, dstPoint); | 2729 this->copySurfaceAsCopyTexSubImage(dst, src, srcRect, dstPoint); |
| 2730 return true; | 2730 return true; |
| 2731 } | 2731 } |
| 2732 | 2732 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3106 this->setVertexArrayID(gpu, 0); | 3106 this->setVertexArrayID(gpu, 0); |
| 3107 } | 3107 } |
| 3108 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3108 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3109 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3109 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3110 fDefaultVertexArrayAttribState.resize(attrCount); | 3110 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3111 } | 3111 } |
| 3112 attribState = &fDefaultVertexArrayAttribState; | 3112 attribState = &fDefaultVertexArrayAttribState; |
| 3113 } | 3113 } |
| 3114 return attribState; | 3114 return attribState; |
| 3115 } | 3115 } |
| OLD | NEW |