Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/gpu/gl/GrGLGpu.cpp

Issue 1304263003: Fix for copy surface not handling dirty context (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698