diff options
author | Hal Canary <halcanary@google.com> | 2018-07-23 10:50:49 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-23 15:14:24 +0000 |
commit | 98caedd213775b61d93a320909e947735c626968 (patch) | |
tree | 89d5a6867a44c99d315e9063fc2ae19043485058 /src/pdf/SkClusterator.h | |
parent | 5e6cd2affe41af71399c247fcd144e8d28a3ec16 (diff) |
SkPDF: only draw text with SkglyphRuns
Change-Id: I24e79c73a9c65a5d6a974bf52b0d0aee21be07db
Reviewed-on: https://skia-review.googlesource.com/142695
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Herb Derby <herb@google.com>
Diffstat (limited to 'src/pdf/SkClusterator.h')
-rw-r--r-- | src/pdf/SkClusterator.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/pdf/SkClusterator.h b/src/pdf/SkClusterator.h index 97aded2197..40d9994ba3 100644 --- a/src/pdf/SkClusterator.h +++ b/src/pdf/SkClusterator.h @@ -8,21 +8,15 @@ #define SkClusterator_DEFINED #include <vector> +#include <cstdint> -#include "SkTypes.h" -#include "SkPaint.h" +class SkGlyphRun; /** Given the m-to-n glyph-to-character mapping data (as returned by harfbuzz), iterate over the clusters. */ class SkClusterator { public: - SkClusterator(const void* sourceText, - size_t sourceByteCount, - const SkPaint& paint, - const uint32_t* clusters, - uint32_t utf8TextByteLength, - const char* utf8Text); - const SkGlyphID* glyphs() const { return fGlyphs; } + SkClusterator(const SkGlyphRun& run); uint32_t glyphCount() const { return fGlyphCount; } bool reversedChars() const { return fReversedChars; } struct Cluster { @@ -37,15 +31,10 @@ public: && fGlyphIndex == o.fGlyphIndex && fGlyphCount == o.fGlyphCount; } - }; Cluster next(); private: - std::vector<SkGlyphID> fGlyphStorage; - std::vector<char> fUtf8textStorage; - std::vector<uint32_t> fClusterStorage; - const SkGlyphID* fGlyphs; const uint32_t* fClusters; const char* fUtf8Text; uint32_t fGlyphCount; |