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

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

Issue 732693002: Drawstate on stack (Closed) Base URL: https://skia.googlesource.com/skia.git@real_def_gp
Patch Set: tiny fix Created 6 years, 1 month 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/GrGpuGL.h ('k') | tests/GLProgramsTest.cpp » ('j') | 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 "GrGpuGL.h" 9 #include "GrGpuGL.h"
10 #include "GrGLStencilBuffer.h" 10 #include "GrGLStencilBuffer.h"
(...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 } 2483 }
2484 if (srcFBO) { 2484 if (srcFBO) {
2485 GL_CALL(DeleteFramebuffers(1, &srcFBO)); 2485 GL_CALL(DeleteFramebuffers(1, &srcFBO));
2486 } 2486 }
2487 copied = true; 2487 copied = true;
2488 } 2488 }
2489 } 2489 }
2490 return copied; 2490 return copied;
2491 } 2491 }
2492 2492
2493 bool GrGpuGL::canCopySurface(GrSurface* dst, 2493 bool GrGpuGL::canCopySurface(const GrSurface* dst,
2494 GrSurface* src, 2494 const GrSurface* src,
2495 const SkIRect& srcRect, 2495 const SkIRect& srcRect,
2496 const SkIPoint& dstPoint) { 2496 const SkIPoint& dstPoint) {
2497 // This mirrors the logic in onCopySurface. We prefer our base makes the co py if we need to 2497 // This mirrors the logic in onCopySurface. We prefer our base makes the co py if we need to
2498 // create a temp fbo 2498 // create a temp fbo
2499 // TODO verify this assumption, it may not be true at all 2499 // TODO verify this assumption, it may not be true at all
2500 bool wouldNeedTempFBO = false; 2500 bool wouldNeedTempFBO = false;
2501 if (can_copy_texsubimage(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) { 2501 if (can_copy_texsubimage(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) {
2502 return true; 2502 return true;
2503 } 2503 }
2504 if (can_blit_framebuffer(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) { 2504 if (can_blit_framebuffer(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2555 this->setVertexArrayID(gpu, 0); 2555 this->setVertexArrayID(gpu, 0);
2556 } 2556 }
2557 int attrCount = gpu->glCaps().maxVertexAttributes(); 2557 int attrCount = gpu->glCaps().maxVertexAttributes();
2558 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2558 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2559 fDefaultVertexArrayAttribState.resize(attrCount); 2559 fDefaultVertexArrayAttribState.resize(attrCount);
2560 } 2560 }
2561 attribState = &fDefaultVertexArrayAttribState; 2561 attribState = &fDefaultVertexArrayAttribState;
2562 } 2562 }
2563 return attribState; 2563 return attribState;
2564 } 2564 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGpuGL.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698