diff options
author | Herb Derby <herb@google.com> | 2018-07-13 13:26:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-16 17:42:19 +0000 |
commit | b983e6baa1db462a047e14ed83be759f2361838c (patch) | |
tree | aa635035b8c573f2e93d3d38a723ea2d46028405 /src/core/SkCanvas.cpp | |
parent | b965fcb47296870643d001acb4a43cec3d88579a (diff) |
Device interface uses glyph run list
Have devices just treat all runs as drawPosText except
for SkGPUDevice and SkRemoteGlyphCache. Those two
just pass the blob to the old code. This way the
change over from blobs to run lists can happen in smaller
steps.
Change-Id: I3407bffeafe7fbd1c369f6b3c3db8d64b4b6c3b1
Reviewed-on: https://skia-review.googlesource.com/141300
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 3c5ec347c7..c1f81188ce 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2432,7 +2432,7 @@ void SkCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkSca fScratchGlyphRunBuilder->drawText( looper.paint(), text, byteLength, SkPoint::Make(x, y)); auto glyphRunList = fScratchGlyphRunBuilder->useGlyphRunList(); - iter.fDevice->drawGlyphRunList(looper.paint(), glyphRunList); + iter.fDevice->drawGlyphRunList(glyphRunList); } LOOPER_END @@ -2446,7 +2446,7 @@ void SkCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoint while (iter.next()) { fScratchGlyphRunBuilder->drawPosText(looper.paint(), text, byteLength, pos); auto glyphRunList = fScratchGlyphRunBuilder->useGlyphRunList(); - iter.fDevice->drawGlyphRunList(looper.paint(), glyphRunList); + iter.fDevice->drawGlyphRunList(glyphRunList); } LOOPER_END @@ -2461,7 +2461,7 @@ void SkCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScala fScratchGlyphRunBuilder->drawPosTextH( looper.paint(), text, byteLength, xpos, constY); auto glyphRunList = fScratchGlyphRunBuilder->useGlyphRunList(); - iter.fDevice->drawGlyphRunList(looper.paint(), glyphRunList); + iter.fDevice->drawGlyphRunList(glyphRunList); } LOOPER_END @@ -2511,7 +2511,8 @@ void SkCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, LOOPER_BEGIN(paint, bounds) while (iter.next()) { - iter.fDevice->drawTextBlob(blob, x, y, looper.paint()); + fScratchGlyphRunBuilder->drawTextBlob(looper.paint(), *blob, SkPoint::Make(x, y)); + iter.fDevice->drawGlyphRunList(fScratchGlyphRunBuilder->useGlyphRunList()); } LOOPER_END |