aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrAtlasTextBatch.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-11-23 13:08:22 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-23 13:08:22 -0800
commit60ce86d4718dab83f33488ec41710ad6763fc7f8 (patch)
treeed3933f0387cb03f35eac4cba1528ea11b7f89f9 /src/gpu/batches/GrAtlasTextBatch.h
parent095530389d8211895309107a4f74beefacce638c (diff)
Move GrAtlasTextBatch blob regeneration to template
This will remove the runtime branches. I don't think it makes the code any harder to read either BUG=skia: Review URL: https://codereview.chromium.org/1466333003
Diffstat (limited to 'src/gpu/batches/GrAtlasTextBatch.h')
-rw-r--r--src/gpu/batches/GrAtlasTextBatch.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/batches/GrAtlasTextBatch.h b/src/gpu/batches/GrAtlasTextBatch.h
index 63dfa30e6b..5997d49167 100644
--- a/src/gpu/batches/GrAtlasTextBatch.h
+++ b/src/gpu/batches/GrAtlasTextBatch.h
@@ -170,12 +170,12 @@ private:
kLCDDistanceField_MaskType == fMaskType;
}
- inline void regenerateTextureCoords(GrGlyph* glyph, intptr_t vertex, size_t vertexStride);
-
- inline void regenerateColors(intptr_t vertex, size_t vertexStride, GrColor color);
-
- inline void regeneratePositions(intptr_t vertex, size_t vertexStride, SkScalar transX,
- SkScalar transY);
+ template <bool regenTexCoords, bool regenPos, bool regenCol, bool regenGlyphs>
+ inline void regenBlob(Target* target, FlushInfo* flushInfo, Blob* blob, Run* run,
+ TextInfo* info, SkGlyphCache** cache,
+ SkTypeface** typeface, GrFontScaler** scaler, const SkDescriptor** desc,
+ const GrGeometryProcessor* gp, int glyphCount, size_t vertexStride,
+ GrColor color, SkScalar transX, SkScalar transY);
inline void flush(GrVertexBatch::Target* target, FlushInfo* flushInfo);