Revert "Handle translating blob to origin in bulk"
This reverts commit 7a2ff3c9a8
.
Reason for revert: Breaks all kinds of GMs
Original change's description:
> Handle translating blob to origin in bulk
>
> Move all the glyphs in bulk. Handling the origin
> translation will be needed to use the bulk APIs.
>
> Change-Id: Ic38ebc8504d874367e4a7291e26f3dfc2c59222b
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206397
> Auto-Submit: Herb Derby <herb@google.com>
> Commit-Queue: Ben Wagner <bungeman@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=bungeman@google.com,herb@google.com
Change-Id: I007971ccf5d2af96b8dfe52c1d4a03660080a189
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206904
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
c6cfca4dac
commit
09fb824a93
@ -397,10 +397,6 @@ void SkGlyphRunListPainter::processGlyphRunList(const SkGlyphRunList& glyphRunLi
|
||||
|
||||
if (useSDFT) {
|
||||
|
||||
// Translate all glyphs to the origin.
|
||||
SkMatrix translate = SkMatrix::MakeTrans(origin.x(), origin.y());
|
||||
translate.mapPoints(fPositions, glyphRun.positions().data(), glyphRun.runSize());
|
||||
|
||||
// Setup distance field runPaint and text ratio
|
||||
SkPaint dfPaint = GrTextContext::InitDistanceFieldPaint(runPaint);
|
||||
SkScalar cacheToSourceScale;
|
||||
@ -426,7 +422,7 @@ void SkGlyphRunListPainter::processGlyphRunList(const SkGlyphRunList& glyphRunLi
|
||||
int glyphCount = 0;
|
||||
const SkPoint* positionCursor = glyphRun.positions().data();
|
||||
for (auto glyphID : glyphRun.glyphsIDs()) {
|
||||
SkPoint glyphSourcePosition = *positionCursor++;
|
||||
SkPoint glyphSourcePosition = origin + *positionCursor++;
|
||||
const SkGlyph& glyph = strike->getGlyphMetrics(glyphID, {0, 0});
|
||||
|
||||
if (glyph.isEmpty()) {
|
||||
@ -469,10 +465,6 @@ void SkGlyphRunListPainter::processGlyphRunList(const SkGlyphRunList& glyphRunLi
|
||||
}
|
||||
} else if (SkGlyphRunListPainter::ShouldDrawAsPath(runPaint, runFont, viewMatrix)) {
|
||||
|
||||
// Translate all glyphs to the origin.
|
||||
SkMatrix translate = SkMatrix::MakeTrans(origin.x(), origin.y());
|
||||
translate.mapPoints(fPositions, glyphRun.positions().data(), glyphRun.runSize());
|
||||
|
||||
// setup our std runPaint, in hopes of getting hits in the cache
|
||||
SkPaint pathPaint{runPaint};
|
||||
SkFont pathFont{runFont};
|
||||
@ -497,7 +489,7 @@ void SkGlyphRunListPainter::processGlyphRunList(const SkGlyphRunList& glyphRunLi
|
||||
int glyphCount = 0;
|
||||
const SkPoint* positionCursor = glyphRun.positions().data();
|
||||
for (auto glyphID : glyphRun.glyphsIDs()) {
|
||||
SkPoint glyphSourcePosition = *positionCursor++;
|
||||
SkPoint glyphSourcePosition = origin + *positionCursor++;
|
||||
|
||||
// Use outline from {0, 0} because all transforms including subpixel translation
|
||||
// happen during drawing.
|
||||
|
Loading…
Reference in New Issue
Block a user