Revert "Naive CPU large emoji"
This reverts commit 42ea8e6619
.
Reason for revert: Breaks a chrome layout test.
Original change's description:
> Naive CPU large emoji
>
> This CL uses the GPU prepare path code to calculate reject which
> are color.
>
> What is missing is a system for scaling glyphs to the screen
> from the cache. Or a way to draw glyphs directly with no cache.
>
> Change-Id: Id5072c3cbffb91bad06ad840549c2711f5063c5c
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255980
> 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,reed@google.com
Change-Id: I62d27fd3ac1150ab21263afa948ee06a2932c2c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256937
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This commit is contained in:
parent
81777ac947
commit
2a8799ff08
@ -97,8 +97,6 @@ void SkGlyphRunListPainter::drawForBitmapDevice(
|
|||||||
for (auto& glyphRun : glyphRunList) {
|
for (auto& glyphRun : glyphRunList) {
|
||||||
const SkFont& runFont = glyphRun.font();
|
const SkFont& runFont = glyphRun.font();
|
||||||
|
|
||||||
fRejects.setSource(glyphRun.source());
|
|
||||||
|
|
||||||
if (SkStrikeSpec::ShouldDrawAsPath(runPaint, runFont, deviceMatrix)) {
|
if (SkStrikeSpec::ShouldDrawAsPath(runPaint, runFont, deviceMatrix)) {
|
||||||
|
|
||||||
SkStrikeSpec strikeSpec = SkStrikeSpec::MakePath(
|
SkStrikeSpec strikeSpec = SkStrikeSpec::MakePath(
|
||||||
@ -106,9 +104,8 @@ void SkGlyphRunListPainter::drawForBitmapDevice(
|
|||||||
|
|
||||||
auto strike = strikeSpec.findOrCreateExclusiveStrike();
|
auto strike = strikeSpec.findOrCreateExclusiveStrike();
|
||||||
|
|
||||||
fDrawable.startSource(fRejects.source(), origin);
|
fDrawable.startSource(glyphRun.source(), origin);
|
||||||
strike->prepareForPathDrawing(&fDrawable, &fRejects);
|
strike->prepareForDrawingPathsCPU(&fDrawable);
|
||||||
fRejects.flipRejectsToSource();
|
|
||||||
|
|
||||||
// The paint we draw paths with must have the same anti-aliasing state as the runFont
|
// The paint we draw paths with must have the same anti-aliasing state as the runFont
|
||||||
// allowing the paths to have the same edging as the glyph masks.
|
// allowing the paths to have the same edging as the glyph masks.
|
||||||
@ -116,21 +113,16 @@ void SkGlyphRunListPainter::drawForBitmapDevice(
|
|||||||
pathPaint.setAntiAlias(runFont.hasSomeAntiAliasing());
|
pathPaint.setAntiAlias(runFont.hasSomeAntiAliasing());
|
||||||
|
|
||||||
bitmapDevice->paintPaths(&fDrawable, strikeSpec.strikeToSourceRatio(), pathPaint);
|
bitmapDevice->paintPaths(&fDrawable, strikeSpec.strikeToSourceRatio(), pathPaint);
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (!fRejects.source().empty()) {
|
|
||||||
SkStrikeSpec strikeSpec = SkStrikeSpec::MakeMask(
|
SkStrikeSpec strikeSpec = SkStrikeSpec::MakeMask(
|
||||||
runFont, runPaint, props, fScalerContextFlags, deviceMatrix);
|
runFont, runPaint, props, fScalerContextFlags, deviceMatrix);
|
||||||
|
|
||||||
auto strike = strikeSpec.findOrCreateExclusiveStrike();
|
auto strike = strikeSpec.findOrCreateExclusiveStrike();
|
||||||
|
|
||||||
fDrawable.startDevice(fRejects.source(), origin, deviceMatrix, strike->roundingSpec());
|
fDrawable.startDevice(glyphRun.source(), origin, deviceMatrix, strike->roundingSpec());
|
||||||
strike->prepareForDrawingMasksCPU(&fDrawable);
|
strike->prepareForDrawingMasksCPU(&fDrawable);
|
||||||
bitmapDevice->paintMasks(&fDrawable, runPaint);
|
bitmapDevice->paintMasks(&fDrawable, runPaint);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: have the mask stage above reject the glyphs that are too big, and handle the
|
|
||||||
// rejects in a more sophisticated stage.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user