diff options
author | Robert Phillips <robertphillips@google.com> | 2018-06-28 12:00:35 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-28 12:00:47 +0000 |
commit | 385804514edf602f978975c825b78692a044c6b9 (patch) | |
tree | 891790d5b77fa447c75ec9a25487ecd8ae22c332 /src/core/SkCanvas.cpp | |
parent | e97bb26893a1c24deeb38b818a1f4c1638a9983d (diff) |
Revert "Remove drawTextBlob from device use drawGlyphRunList"
This reverts commit e2e52e46ca63540d429656baeee48fd3a402be26.
Reason for revert: See if this is blocking the Chrome roll
Original change's description:
> Remove drawTextBlob from device use drawGlyphRunList
>
> Convert all backends to use GlyphRunList instead of
> text blobs. If the device did not originally implement
> drawTextBlob it will be simulated by drawPosText on the
> device.
>
> Other changes:
> Change to using an origin from absolulte positioning. The GPU
> code uses origin change to update blobs under translation.
>
> Change cluster to use const uint32_t instead of just
> uint32_t.
>
> Add SkPaint to runs.
>
> The draw filter is hosted up to the canavas level and applied there.
>
> Change-Id: Ib105b6bd26b67db55f1c954e37c79fbdcaa9d4a2
> Reviewed-on: https://skia-review.googlesource.com/137224
> Reviewed-by: Herb Derby <herb@google.com>
> Reviewed-by: Khusal Sagar <khushalsagar@chromium.org>
> Reviewed-by: Hal Canary <halcanary@google.com>
> Reviewed-by: Jim Van Verth <jvanverth@google.com>
> Commit-Queue: Herb Derby <herb@google.com>
TBR=jvanverth@google.com,halcanary@google.com,bungeman@google.com,herb@google.com,reed@google.com,khushalsagar@chromium.org,khushalsagar@google.com
Change-Id: I4d93a534990c89deee7d3aaa00ec40d47e0d2ece
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/138120
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index c590d77cb7..b297f98156 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -2453,7 +2453,8 @@ void SkCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkSca while (iter.next()) { fScratchGlyphRunBuilder->prepareDrawText( looper.paint(), text, byteLength, SkPoint::Make(x, y)); - fScratchGlyphRunBuilder->draw(iter.fDevice); + auto glyphRun = fScratchGlyphRunBuilder->useGlyphRun(); + iter.fDevice->drawGlyphRun(looper.paint(), glyphRun); } LOOPER_END @@ -2466,7 +2467,8 @@ void SkCanvas::onDrawPosText(const void* text, size_t byteLength, const SkPoint while (iter.next()) { fScratchGlyphRunBuilder->prepareDrawPosText(looper.paint(), text, byteLength, pos); - fScratchGlyphRunBuilder->draw(iter.fDevice); + auto glyphRun = fScratchGlyphRunBuilder->useGlyphRun(); + iter.fDevice->drawGlyphRun(looper.paint(), glyphRun); } LOOPER_END @@ -2480,7 +2482,8 @@ void SkCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScala while (iter.next()) { fScratchGlyphRunBuilder->prepareDrawPosTextH( looper.paint(), text, byteLength, xpos, constY); - fScratchGlyphRunBuilder->draw(iter.fDevice); + const auto& glyphRun = fScratchGlyphRunBuilder->useGlyphRun(); + iter.fDevice->drawGlyphRun(looper.paint(), glyphRun); } LOOPER_END @@ -2533,9 +2536,7 @@ void SkCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, LOOPER_BEGIN(paint, SkDrawFilter::kText_Type, bounds) while (iter.next()) { - fScratchGlyphRunBuilder->prepareTextBlob( - looper.paint(), *blob, SkPoint::Make(x, y), drawFilter); - fScratchGlyphRunBuilder->draw(iter.fDevice); + iter.fDevice->drawTextBlob(blob, x, y, looper.paint(), drawFilter); } LOOPER_END |