diff options
author | Jim Van Verth <jvanverth@google.com> | 2018-02-08 16:14:48 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 22:42:40 +0000 |
commit | 54d9c889fb6aca043a7b005d61de4e0e65a3ae53 (patch) | |
tree | d19bd15855296d86798d8b103c297d7f872fc330 /src/gpu/text/GrTextUtils.h | |
parent | 6ba15ecb1cdd75f57abae8eeece7886aa8f28832 (diff) |
Cleanup of large text rendering, take 2.
* Switch all path glyphs to be rendered as part of the fBigGlyphs
(now fPathGlyphs) system
* Use one flush command for both cached and throwaway blobs
* Store and render path glyphs per run rather than one list for the
entire blob (fixes a layering bug)
* Fix bug with scaled fallback glyphs, where fallback glyphs were
trying to use more than one descriptor
* Set paint flags correctly for paths
Bug: skia:7562
Change-Id: I9455eda2867860a713fbdbbda79c74109e95f9f2
Reviewed-on: https://skia-review.googlesource.com/105020
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/text/GrTextUtils.h')
-rw-r--r-- | src/gpu/text/GrTextUtils.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gpu/text/GrTextUtils.h b/src/gpu/text/GrTextUtils.h index 252cd7c626..58318e8fe3 100644 --- a/src/gpu/text/GrTextUtils.h +++ b/src/gpu/text/GrTextUtils.h @@ -115,7 +115,7 @@ public: fFilteredPremulColor = fOriginalPaint->filteredPremulColor(); } - bool modifyForRun(const SkTextBlobRunIterator&); + bool modifyForRun(std::function<void(SkPaint*)> paintModFunc); private: SkTLazy<SkPaint> fModifiedPaint; @@ -127,19 +127,6 @@ public: static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint); static bool ShouldDisableLCD(const SkPaint& paint); - - // Functions for drawing large text either as paths or (for color emoji) as scaled glyphs - static void DrawBigText(GrTextUtils::Target*, const GrClip& clip, - const SkPaint& paint, const SkMatrix& viewMatrix, const char text[], - size_t byteLength, SkScalar x, SkScalar y, - const SkIRect& clipBounds); - - static void DrawBigPosText(GrTextUtils::Target*, - const SkSurfaceProps& props, const GrClip& clip, - const SkPaint& paint, const SkMatrix& viewMatrix, - const char text[], size_t byteLength, const SkScalar pos[], - int scalarsPerPosition, const SkPoint& offset, - const SkIRect& clipBounds); }; #endif |