| 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 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2759 return false; | 2759 return false; |
| 2760 } | 2760 } |
| 2761 | 2761 |
| 2762 // We'll do a CopyTexSubImage. Make the dst a plain old texture. | 2762 // We'll do a CopyTexSubImage. Make the dst a plain old texture. |
| 2763 desc->fConfig = src->config(); | 2763 desc->fConfig = src->config(); |
| 2764 desc->fOrigin = src->origin(); | 2764 desc->fOrigin = src->origin(); |
| 2765 desc->fFlags = kNone_GrSurfaceFlags; | 2765 desc->fFlags = kNone_GrSurfaceFlags; |
| 2766 return true; | 2766 return true; |
| 2767 } | 2767 } |
| 2768 | 2768 |
| 2769 bool GrGLGpu::copySurface(GrSurface* dst, | 2769 bool GrGLGpu::onCopySurface(GrSurface* dst, |
| 2770 GrSurface* src, | 2770 GrSurface* src, |
| 2771 const SkIRect& srcRect, | 2771 const SkIRect& srcRect, |
| 2772 const SkIPoint& dstPoint) { | 2772 const SkIPoint& dstPoint) { |
| 2773 if (src->asTexture() && dst->asRenderTarget()) { | 2773 if (src->asTexture() && dst->asRenderTarget()) { |
| 2774 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint); | 2774 this->copySurfaceAsDraw(dst, src, srcRect, dstPoint); |
| 2775 return true; | 2775 return true; |
| 2776 } | 2776 } |
| 2777 | 2777 |
| 2778 if (can_copy_texsubimage(dst, src, this)) { | 2778 if (can_copy_texsubimage(dst, src, this)) { |
| 2779 this->copySurfaceAsCopyTexSubImage(dst, src, srcRect, dstPoint); | 2779 this->copySurfaceAsCopyTexSubImage(dst, src, srcRect, dstPoint); |
| 2780 return true; | 2780 return true; |
| 2781 } | 2781 } |
| 2782 | 2782 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3196 this->setVertexArrayID(gpu, 0); | 3196 this->setVertexArrayID(gpu, 0); |
| 3197 } | 3197 } |
| 3198 int attrCount = gpu->glCaps().maxVertexAttributes(); | 3198 int attrCount = gpu->glCaps().maxVertexAttributes(); |
| 3199 if (fDefaultVertexArrayAttribState.count() != attrCount) { | 3199 if (fDefaultVertexArrayAttribState.count() != attrCount) { |
| 3200 fDefaultVertexArrayAttribState.resize(attrCount); | 3200 fDefaultVertexArrayAttribState.resize(attrCount); |
| 3201 } | 3201 } |
| 3202 attribState = &fDefaultVertexArrayAttribState; | 3202 attribState = &fDefaultVertexArrayAttribState; |
| 3203 } | 3203 } |
| 3204 return attribState; | 3204 return attribState; |
| 3205 } | 3205 } |
| OLD | NEW |