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

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: ready 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
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 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 } 2482 }
2483 if (srcFBO) { 2483 if (srcFBO) {
2484 GL_CALL(DeleteFramebuffers(1, &srcFBO)); 2484 GL_CALL(DeleteFramebuffers(1, &srcFBO));
2485 } 2485 }
2486 copied = true; 2486 copied = true;
2487 } 2487 }
2488 } 2488 }
2489 return copied; 2489 return copied;
2490 } 2490 }
2491 2491
2492 bool GrGpuGL::canCopySurface(GrSurface* dst, 2492 bool GrGpuGL::canCopySurface(const GrSurface* dst,
2493 GrSurface* src, 2493 const GrSurface* src,
2494 const SkIRect& srcRect, 2494 const SkIRect& srcRect,
2495 const SkIPoint& dstPoint) { 2495 const SkIPoint& dstPoint) {
2496 // This mirrors the logic in onCopySurface. We prefer our base makes the co py if we need to 2496 // This mirrors the logic in onCopySurface. We prefer our base makes the co py if we need to
2497 // create a temp fbo 2497 // create a temp fbo
2498 // TODO verify this assumption, it may not be true at all 2498 // TODO verify this assumption, it may not be true at all
2499 bool wouldNeedTempFBO = false; 2499 bool wouldNeedTempFBO = false;
2500 if (can_copy_texsubimage(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) { 2500 if (can_copy_texsubimage(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) {
2501 return true; 2501 return true;
2502 } 2502 }
2503 if (can_blit_framebuffer(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) { 2503 if (can_blit_framebuffer(dst, src, this, &wouldNeedTempFBO) && !wouldNeedTem pFBO) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2554 this->setVertexArrayID(gpu, 0); 2554 this->setVertexArrayID(gpu, 0);
2555 } 2555 }
2556 int attrCount = gpu->glCaps().maxVertexAttributes(); 2556 int attrCount = gpu->glCaps().maxVertexAttributes();
2557 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2557 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2558 fDefaultVertexArrayAttribState.resize(attrCount); 2558 fDefaultVertexArrayAttribState.resize(attrCount);
2559 } 2559 }
2560 attribState = &fDefaultVertexArrayAttribState; 2560 attribState = &fDefaultVertexArrayAttribState;
2561 } 2561 }
2562 return attribState; 2562 return attribState;
2563 } 2563 }
OLDNEW
« src/gpu/GrDrawTarget.cpp ('K') | « src/gpu/gl/GrGpuGL.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698