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

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

Issue 14461006: Plumbed in discard_framebuffer extension (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Removed desktop side changes & validation test Created 7 years, 7 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 | Annotate | Revision Log
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 1501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 } 1512 }
1513 1513
1514 void GrGpuGL::flushRenderTarget(const GrIRect* bound) { 1514 void GrGpuGL::flushRenderTarget(const GrIRect* bound) {
1515 1515
1516 GrGLRenderTarget* rt = 1516 GrGLRenderTarget* rt =
1517 static_cast<GrGLRenderTarget*>(this->drawState()->getRenderTarget()); 1517 static_cast<GrGLRenderTarget*>(this->drawState()->getRenderTarget());
1518 GrAssert(NULL != rt); 1518 GrAssert(NULL != rt);
1519 1519
1520 if (fHWBoundRenderTarget != rt) { 1520 if (fHWBoundRenderTarget != rt) {
1521 GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, rt->renderFBOID())); 1521 GL_CALL(BindFramebuffer(GR_GL_FRAMEBUFFER, rt->renderFBOID()));
1522 #if GR_DEBUG 1522 #if GR_DEBUG
1523 GrGLenum status; 1523 GrGLenum status;
1524 GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER)); 1524 GL_CALL_RET(status, CheckFramebufferStatus(GR_GL_FRAMEBUFFER));
1525 if (status != GR_GL_FRAMEBUFFER_COMPLETE) { 1525 if (status != GR_GL_FRAMEBUFFER_COMPLETE) {
1526 GrPrintf("GrGpuGL::flushRenderTarget glCheckFramebufferStatus %x\n", status); 1526 GrPrintf("GrGpuGL::flushRenderTarget glCheckFramebufferStatus %x\n", status);
1527 } 1527 }
1528 #endif 1528 #endif
1529 fHWBoundRenderTarget = rt; 1529 fHWBoundRenderTarget = rt;
1530 const GrGLIRect& vp = rt->getViewport(); 1530 const GrGLIRect& vp = rt->getViewport();
1531 if (fHWViewport != vp) { 1531 if (fHWViewport != vp) {
1532 vp.pushToGLViewport(this->glInterface()); 1532 vp.pushToGLViewport(this->glInterface());
1533 fHWViewport = vp; 1533 fHWViewport = vp;
1534 } 1534 }
1535 } 1535 }
1536 if (NULL == bound || !bound->isEmpty()) { 1536 if (NULL == bound || !bound->isEmpty()) {
1537 rt->flagAsNeedingResolve(bound); 1537 rt->flagAsNeedingResolve(bound);
1538 } 1538 }
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2501 this->setVertexArrayID(gpu, 0); 2501 this->setVertexArrayID(gpu, 0);
2502 } 2502 }
2503 int attrCount = gpu->glCaps().maxVertexAttributes(); 2503 int attrCount = gpu->glCaps().maxVertexAttributes();
2504 if (fDefaultVertexArrayAttribState.count() != attrCount) { 2504 if (fDefaultVertexArrayAttribState.count() != attrCount) {
2505 fDefaultVertexArrayAttribState.resize(attrCount); 2505 fDefaultVertexArrayAttribState.resize(attrCount);
2506 } 2506 }
2507 attribState = &fDefaultVertexArrayAttribState; 2507 attribState = &fDefaultVertexArrayAttribState;
2508 } 2508 }
2509 return attribState; 2509 return attribState;
2510 } 2510 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLNoOpInterface.cpp ('k') | src/gpu/gl/android/GrGLCreateNativeInterface_android.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698