Simplify blob's appendGlyph interface
Change-Id: I62fcaef94570982d46e678b8e128b02e2514a96a Reviewed-on: https://skia-review.googlesource.com/145528 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
4f599a952f
commit
ae64e49812
@ -72,9 +72,7 @@ void GrTextBlob::appendGlyph(int runIndex,
|
|||||||
const SkRect& positions,
|
const SkRect& positions,
|
||||||
GrColor color,
|
GrColor color,
|
||||||
sk_sp<GrTextStrike> strike,
|
sk_sp<GrTextStrike> strike,
|
||||||
GrGlyph* glyph,
|
GrGlyph* glyph, bool preTransformed) {
|
||||||
SkGlyphCache* cache, const SkGlyph& skGlyph,
|
|
||||||
SkScalar x, SkScalar y, SkScalar scale, bool preTransformed) {
|
|
||||||
|
|
||||||
Run& run = fRuns[runIndex];
|
Run& run = fRuns[runIndex];
|
||||||
GrMaskFormat format = glyph->fMaskFormat;
|
GrMaskFormat format = glyph->fMaskFormat;
|
||||||
|
@ -177,9 +177,7 @@ public:
|
|||||||
const SkRect& positions,
|
const SkRect& positions,
|
||||||
GrColor color,
|
GrColor color,
|
||||||
sk_sp<GrTextStrike> strike,
|
sk_sp<GrTextStrike> strike,
|
||||||
GrGlyph* glyph,
|
GrGlyph* glyph, bool preTransformed);
|
||||||
SkGlyphCache*, const SkGlyph& skGlyph,
|
|
||||||
SkScalar x, SkScalar y, SkScalar scale, bool preTransformed);
|
|
||||||
|
|
||||||
// Appends a glyph to the blob as a path only.
|
// Appends a glyph to the blob as a path only.
|
||||||
void appendPathGlyph(int runIndex, const SkPath& path,
|
void appendPathGlyph(int runIndex, const SkPath& path,
|
||||||
|
@ -290,8 +290,7 @@ void GrTextContext::AppendGlyph(GrTextBlob* blob, int runIndex,
|
|||||||
SkRect glyphRect = rect_to_draw(skGlyph, {sx, sy}, textRatio, maskStyle);
|
SkRect glyphRect = rect_to_draw(skGlyph, {sx, sy}, textRatio, maskStyle);
|
||||||
|
|
||||||
if (!glyphRect.isEmpty()) {
|
if (!glyphRect.isEmpty()) {
|
||||||
blob->appendGlyph(runIndex, glyphRect, color, *strike, glyph,
|
blob->appendGlyph(runIndex, glyphRect, color, *strike, glyph, !needsTransform);
|
||||||
skGlyphCache, skGlyph, sx, sy, textRatio, !needsTransform);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user