diff options
author | joshualitt <joshualitt@google.com> | 2015-05-19 07:15:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-19 07:15:28 -0700 |
commit | d3a560fa80bfb3e2d2e989f951bb3b1c52316654 (patch) | |
tree | 6702bf0af4281910271596fe9b11316902194d79 /src/gpu/GrAADistanceFieldPathRenderer.cpp | |
parent | cbfe91d82500f4ae8c3ff7bd74b3021a4b89fd84 (diff) |
Revert of Preliminary attempt to remove batch tracker (patchset #3 id:40001 of https://codereview.chromium.org/1139723004/)
Reason for revert:
breaking bots
Original issue's description:
> Preliminary attempt to remove batch tracker
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/cbfe91d82500f4ae8c3ff7bd74b3021a4b89fd84
TBR=robertphillips@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1132323003
Diffstat (limited to 'src/gpu/GrAADistanceFieldPathRenderer.cpp')
-rwxr-xr-x | src/gpu/GrAADistanceFieldPathRenderer.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp index 21fbcb37fb..b6a9797bc3 100755 --- a/src/gpu/GrAADistanceFieldPathRenderer.cpp +++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp @@ -197,10 +197,9 @@ public: this->viewMatrix(), atlas->getTexture(), params, - flags, - this->usesLocalCoords())); + flags)); - batchTarget->initDraw(dfProcessor, pipeline); + this->initDraw(batchTarget, dfProcessor, pipeline); FlushInfo flushInfo; @@ -415,7 +414,7 @@ private: &atlasLocation); if (!success) { this->flush(batchTarget, flushInfo); - batchTarget->initDraw(dfProcessor, pipeline); + this->initDraw(batchTarget, dfProcessor, pipeline); SkDEBUGCODE(success =) atlas->addToAtlas(&id, batchTarget, width, height, dfStorage.get(), &atlasLocation); @@ -492,6 +491,20 @@ private: vertexStride); } + void initDraw(GrBatchTarget* batchTarget, + const GrGeometryProcessor* dfProcessor, + const GrPipeline* pipeline) { + batchTarget->initDraw(dfProcessor, pipeline); + + // TODO remove this when batch is everywhere + GrPipelineInfo init; + init.fColorIgnored = fBatch.fColorIgnored; + init.fOverrideColor = GrColor_ILLEGAL; + init.fCoverageIgnored = fBatch.fCoverageIgnored; + init.fUsesLocalCoords = this->usesLocalCoords(); + dfProcessor->initBatchTracker(batchTarget->currentBatchTracker(), init); + } + void flush(GrBatchTarget* batchTarget, FlushInfo* flushInfo) { GrVertices vertices; int maxInstancesPerDraw = flushInfo->fIndexBuffer->maxQuads(); |