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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1139723004: Preliminary attempt to remove batch tracker (Closed) Base URL: https://skia.googlesource.com/skia.git@cleanup5
Patch Set: tweaks 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 dfb07ed82026aa48b17958b6e557c7df19bf59b9..f2307574fb9fd64c70cccaf93f7561dbcaee7d1c 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1537,7 +1537,8 @@ public:
texture,
params,
fMaskFormat,
- localMatrix));
+ localMatrix,
+ this->usesLocalCoords()));
}
FlushInfo flushInfo;
@@ -1547,7 +1548,7 @@ public:
get_vertex_stride_df(fMaskFormat, fUseLCDText) :
get_vertex_stride(fMaskFormat)));
- this->initDraw(batchTarget, gp, pipeline);
+ batchTarget->initDraw(gp, pipeline);
int glyphCount = this->numGlyphs();
int instanceCount = fInstanceCount;
@@ -1657,7 +1658,7 @@ public:
if (!fFontCache->hasGlyph(glyph) &&
!strike->addGlyphToAtlas(batchTarget, glyph, scaler)) {
this->flush(batchTarget, &flushInfo);
- this->initDraw(batchTarget, gp, pipeline);
+ batchTarget->initDraw(gp, pipeline);
brokenRun = glyphIdx > 0;
SkDEBUGCODE(bool success =) strike->addGlyphToAtlas(batchTarget,
@@ -1849,20 +1850,6 @@ private:
}
}
- 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();
@@ -1992,7 +1979,8 @@ private:
texture,
params,
widthAdjust,
- flags);
+ flags,
+ this->usesLocalCoords());
} else {
flags |= kColorAttr_DistanceFieldEffectFlag;
#ifdef SK_GAMMA_APPLY_TO_A8
@@ -2003,13 +1991,15 @@ private:
texture,
params,
correction,
- flags);
+ flags,
+ this->usesLocalCoords());
#else
return GrDistanceFieldA8TextGeoProc::Create(color,
viewMatrix,
texture,
params,
- flags);
+ flags,
+ this->usesLocalCoords());
#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