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/SkGlyphRun.h | |
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/SkGlyphRun.h')
-rw-r--r-- | src/core/SkGlyphRun.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h index 4b392fda0f..c220a26424 100644 --- a/src/core/SkGlyphRun.h +++ b/src/core/SkGlyphRun.h @@ -56,7 +56,7 @@ public: // The temporaryShunt calls are to allow inter-operating with existing code while glyph runs // are developed. - void temporaryShuntToDrawPosText(SkBaseDevice* device); + void temporaryShuntToDrawPosText(SkBaseDevice* device, SkPoint origin); using TemporaryShuntCallback = std::function<void(size_t, const char*, const SkScalar*)>; void temporaryShuntToCallback(TemporaryShuntCallback callback); @@ -114,15 +114,16 @@ public: SkPoint origin() const { return fOrigin; } const SkPaint& paint() const { return *fOriginalPaint; } + const SkTextBlob* blob() const { return fOriginalTextBlob; } auto begin() -> decltype(fGlyphRuns.begin()) { return fGlyphRuns.begin(); } auto end() -> decltype(fGlyphRuns.end()) { return fGlyphRuns.end(); } auto size() -> decltype(fGlyphRuns.size()) { return fGlyphRuns.size(); } auto empty() -> decltype(fGlyphRuns.empty()) { return fGlyphRuns.empty(); } auto operator [] (size_t i) -> decltype(fGlyphRuns[i]) { return fGlyphRuns[i]; } - void temporaryShuntToDrawPosText(SkBaseDevice* device) { + void temporaryShuntToDrawPosText(SkBaseDevice* device, SkPoint origin) { for (auto& run : fGlyphRuns) { - run.temporaryShuntToDrawPosText(device); + run.temporaryShuntToDrawPosText(device, origin); } } |