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

Unified Diff: src/gpu/GrAtlasTextContext.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/GrAARectRenderer.cpp ('k') | src/gpu/GrBatchTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index f2307574fb9fd64c70cccaf93f7561dbcaee7d1c..dfb07ed82026aa48b17958b6e557c7df19bf59b9 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1537,8 +1537,7 @@
texture,
params,
fMaskFormat,
- localMatrix,
- this->usesLocalCoords()));
+ localMatrix));
}
FlushInfo flushInfo;
@@ -1548,7 +1547,7 @@
get_vertex_stride_df(fMaskFormat, fUseLCDText) :
get_vertex_stride(fMaskFormat)));
- batchTarget->initDraw(gp, pipeline);
+ this->initDraw(batchTarget, gp, pipeline);
int glyphCount = this->numGlyphs();
int instanceCount = fInstanceCount;
@@ -1658,7 +1657,7 @@
if (!fFontCache->hasGlyph(glyph) &&
!strike->addGlyphToAtlas(batchTarget, glyph, scaler)) {
this->flush(batchTarget, &flushInfo);
- batchTarget->initDraw(gp, pipeline);
+ this->initDraw(batchTarget, gp, pipeline);
brokenRun = glyphIdx > 0;
SkDEBUGCODE(bool success =) strike->addGlyphToAtlas(batchTarget,
@@ -1850,6 +1849,20 @@
}
}
+ void initDraw(GrBatchTarget* batchTarget,
+ const GrGeometryProcessor* gp,
+ const GrPipeline* pipeline) {
+ batchTarget->initDraw(gp, 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();
+ gp->initBatchTracker(batchTarget->currentBatchTracker(), init);
+ }
+
void flush(GrBatchTarget* batchTarget, FlushInfo* flushInfo) {
GrVertices vertices;
int maxGlyphsPerDraw = flushInfo->fIndexBuffer->maxQuads();
@@ -1979,8 +1992,7 @@
texture,
params,
widthAdjust,
- flags,
- this->usesLocalCoords());
+ flags);
} else {
flags |= kColorAttr_DistanceFieldEffectFlag;
#ifdef SK_GAMMA_APPLY_TO_A8
@@ -1991,15 +2003,13 @@
texture,
params,
correction,
- flags,
- this->usesLocalCoords());
+ flags);
#else
return GrDistanceFieldA8TextGeoProc::Create(color,
viewMatrix,
texture,
params,
- flags,
- this->usesLocalCoords());
+ flags);
#endif
}
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrBatchTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698