diff options
author | Herb Derby <herb@google.com> | 2018-07-28 14:27:48 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-30 14:22:45 +0000 |
commit | 12e42565886ac6b28cbcae40d63ee093bde3e630 (patch) | |
tree | 8dc479b7b0e9a878cecf6015205d45884a1734b3 /src/gpu/text/GrTextContext.h | |
parent | 13449ce2439044c06847c5f9487352d98931d11d (diff) |
Make a glyphrun version of DrawBmpPosTextAsPaths
Make a copy of DrawBmpPosTextAsPaths called DrawBmpGlyphRunAsPaths
which uses a glyph run instead of having to process all the text
types.
In addition, rearrange the other loops to be located closely in the code.
So, only DrawBmpGlyphRunAsPaths is changed code.
Change-Id: Ic19678ee59189341d2151ccf55f78c8e111f8f4c
Reviewed-on: https://skia-review.googlesource.com/144300
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Diffstat (limited to 'src/gpu/text/GrTextContext.h')
-rw-r--r-- | src/gpu/text/GrTextContext.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/src/gpu/text/GrTextContext.h b/src/gpu/text/GrTextContext.h index 21657469c5..6bfa718712 100644 --- a/src/gpu/text/GrTextContext.h +++ b/src/gpu/text/GrTextContext.h @@ -151,6 +151,24 @@ private: // Determines if we need to use fake gamma (and contrast boost): static SkScalerContextFlags ComputeScalerContextFlags(const GrColorSpaceInfo&); + void drawDFGlyphRun(GrTextBlob* blob, int runIndex, GrGlyphCache*, + const SkSurfaceProps&, const GrTextUtils::Paint& paint, + SkScalerContextFlags scalerContextFlags, + const SkMatrix& viewMatrix, const SkGlyphRun& glyphRun, + const SkPoint& offset) const; + + static void DrawBmpGlyphRunAsPaths(GrTextBlob*, int runIndex, GrGlyphCache*, + const SkSurfaceProps&, const GrTextUtils::Paint& paint, + SkScalerContextFlags scalerContextFlags, + const SkMatrix& viewMatrix, + const SkGlyphRun& glyphRun, + const SkPoint& offset); + + static void DrawBmpGlyphRun(GrTextBlob*, int runIndex, GrGlyphCache*, + const SkSurfaceProps&, const GrTextUtils::Paint& paint, + SkScalerContextFlags scalerContextFlags, const SkMatrix& viewMatrix, + const SkGlyphRun& glyphRun, const SkPoint& offset); + void regenerateGlyphRunList(GrTextBlob* bmp, GrGlyphCache*, const GrShaderCaps&, @@ -178,10 +196,7 @@ private: const char text[], size_t byteLength, const SkScalar pos[], int scalarsPerPosition, const SkPoint& offset); - static void DrawBmpGlyphRun(GrTextBlob*, int runIndex, GrGlyphCache*, - const SkSurfaceProps&, const GrTextUtils::Paint& paint, - SkScalerContextFlags scalerContextFlags, const SkMatrix& viewMatrix, - const SkGlyphRun& glyphRun, const SkPoint& offset); + static void DrawBmpPosTextAsPaths(GrTextBlob*, int runIndex, GrGlyphCache*, const SkSurfaceProps&, const GrTextUtils::Paint& paint, @@ -199,11 +214,6 @@ private: size_t byteLength, const SkScalar pos[], int scalarsPerPosition, const SkPoint& offset) const; - void drawDFGlyphRun(GrTextBlob* blob, int runIndex, GrGlyphCache*, - const SkSurfaceProps&, const GrTextUtils::Paint& paint, - SkScalerContextFlags scalerContextFlags, - const SkMatrix& viewMatrix, const SkGlyphRun& glyphRun, - const SkPoint& offset) const; static void BmpAppendGlyph(GrTextBlob*, int runIndex, GrGlyphCache*, sk_sp<GrTextStrike>*, const SkGlyph&, SkScalar sx, SkScalar sy, |