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

Unified Diff: src/gpu/GrAADistanceFieldPathRenderer.cpp

Issue 1132323003: Revert of Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAADistanceFieldPathRenderer.cpp
diff --git a/src/gpu/GrAADistanceFieldPathRenderer.cpp b/src/gpu/GrAADistanceFieldPathRenderer.cpp
index 31d9cc43a8393fea5ec0ab399125498b5d81abe3..c1bd885a5bbb823d4f33afef1467bdd2856279ec 100755
--- a/src/gpu/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/GrAADistanceFieldPathRenderer.cpp
@@ -197,10 +197,9 @@
this->viewMatrix(),
atlas->getTexture(),
params,
- flags,
- this->usesLocalCoords()));
-
- batchTarget->initDraw(dfProcessor, pipeline);
+ flags));
+
+ this->initDraw(batchTarget, dfProcessor, pipeline);
FlushInfo flushInfo;
@@ -415,7 +414,7 @@
&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 @@
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();
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | src/gpu/GrAAHairLinePathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698