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

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

Issue 1332923003: Remove batchtracker (Closed) Base URL: https://skia.googlesource.com/skia.git@latecreatepathprocessor
Patch Set: tweaks Created 5 years, 3 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') | src/gpu/gl/GrGLPathProcessor.h » ('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 "GrGLGpu.h" 9 #include "GrGLGpu.h"
10 #include "GrGLGLSL.h" 10 #include "GrGLGLSL.h"
(...skipping 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 if (fHWProgramID != programID) { 1570 if (fHWProgramID != programID) {
1571 GL_CALL(UseProgram(programID)); 1571 GL_CALL(UseProgram(programID));
1572 fHWProgramID = programID; 1572 fHWProgramID = programID;
1573 } 1573 }
1574 1574
1575 if (blendInfo.fWriteColor) { 1575 if (blendInfo.fWriteColor) {
1576 this->flushBlend(blendInfo); 1576 this->flushBlend(blendInfo);
1577 } 1577 }
1578 1578
1579 SkSTArray<8, const GrTextureAccess*> textureAccesses; 1579 SkSTArray<8, const GrTextureAccess*> textureAccesses;
1580 program->setData(*args.fPrimitiveProcessor, pipeline, *args.fBatchTracker, & textureAccesses); 1580 program->setData(*args.fPrimitiveProcessor, pipeline, &textureAccesses);
1581 1581
1582 int numTextureAccesses = textureAccesses.count(); 1582 int numTextureAccesses = textureAccesses.count();
1583 for (int i = 0; i < numTextureAccesses; i++) { 1583 for (int i = 0; i < numTextureAccesses; i++) {
1584 this->bindTexture(i, textureAccesses[i]->getParams(), 1584 this->bindTexture(i, textureAccesses[i]->getParams(),
1585 static_cast<GrGLTexture*>(textureAccesses[i]->getTextu re())); 1585 static_cast<GrGLTexture*>(textureAccesses[i]->getTextu re()));
1586 } 1586 }
1587 1587
1588 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTa rget()); 1588 GrGLRenderTarget* glRT = static_cast<GrGLRenderTarget*>(pipeline.getRenderTa rget());
1589 this->flushStencil(pipeline.getStencil()); 1589 this->flushStencil(pipeline.getStencil());
1590 this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->or igin()); 1590 this->flushScissor(pipeline.getScissorState(), glRT->getViewport(), glRT->or igin());
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 stride, 1645 stride,
1646 reinterpret_cast<GrGLvoid*>(vertexOffsetInBytes + o ffset)); 1646 reinterpret_cast<GrGLvoid*>(vertexOffsetInBytes + o ffset));
1647 offset += attrib.fOffset; 1647 offset += attrib.fOffset;
1648 } 1648 }
1649 attribState->disableUnusedArrays(this, usedAttribArraysMask); 1649 attribState->disableUnusedArrays(this, usedAttribArraysMask);
1650 } 1650 }
1651 } 1651 }
1652 1652
1653 void GrGLGpu::buildProgramDesc(GrProgramDesc* desc, 1653 void GrGLGpu::buildProgramDesc(GrProgramDesc* desc,
1654 const GrPrimitiveProcessor& primProc, 1654 const GrPrimitiveProcessor& primProc,
1655 const GrPipeline& pipeline, 1655 const GrPipeline& pipeline) const {
1656 const GrBatchTracker& batchTracker) const { 1656 if (!GrGLProgramDescBuilder::Build(desc, primProc, pipeline, this)) {
1657 if (!GrGLProgramDescBuilder::Build(desc, primProc, pipeline, this, batchTrac ker)) {
1658 SkDEBUGFAIL("Failed to generate GL program descriptor"); 1657 SkDEBUGFAIL("Failed to generate GL program descriptor");
1659 } 1658 }
1660 } 1659 }
1661 1660
1662 void GrGLGpu::disableScissor() { 1661 void GrGLGpu::disableScissor() {
1663 if (kNo_TriState != fHWScissorSettings.fEnabled) { 1662 if (kNo_TriState != fHWScissorSettings.fEnabled) {
1664 GL_CALL(Disable(GR_GL_SCISSOR_TEST)); 1663 GL_CALL(Disable(GR_GL_SCISSOR_TEST));
1665 fHWScissorSettings.fEnabled = kNo_TriState; 1664 fHWScissorSettings.fEnabled = kNo_TriState;
1666 return; 1665 return;
1667 } 1666 }
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after
3272 this->setVertexArrayID(gpu, 0); 3271 this->setVertexArrayID(gpu, 0);
3273 } 3272 }
3274 int attrCount = gpu->glCaps().maxVertexAttributes(); 3273 int attrCount = gpu->glCaps().maxVertexAttributes();
3275 if (fDefaultVertexArrayAttribState.count() != attrCount) { 3274 if (fDefaultVertexArrayAttribState.count() != attrCount) {
3276 fDefaultVertexArrayAttribState.resize(attrCount); 3275 fDefaultVertexArrayAttribState.resize(attrCount);
3277 } 3276 }
3278 attribState = &fDefaultVertexArrayAttribState; 3277 attribState = &fDefaultVertexArrayAttribState;
3279 } 3278 }
3280 return attribState; 3279 return attribState;
3281 } 3280 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpu.h ('k') | src/gpu/gl/GrGLPathProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698