diff options
author | Herb Derby <herb@google.com> | 2018-06-21 16:03:47 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-28 03:36:16 +0000 |
commit | e2e52e46ca63540d429656baeee48fd3a402be26 (patch) | |
tree | 574c2f990282798988f47a5519a5ed5f3a990569 /src/gpu/GrRenderTargetContext.cpp | |
parent | 0ce5ab9d3122bcd9dce65ecb51a0da973da09816 (diff) |
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>
Diffstat (limited to 'src/gpu/GrRenderTargetContext.cpp')
-rw-r--r-- | src/gpu/GrRenderTargetContext.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index 1dbde17575..9d31a0dde6 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -237,18 +237,17 @@ void GrRenderTargetContext::drawPosText(const GrClip& clip, const SkPaint& paint clipBounds); } -void GrRenderTargetContext::drawTextBlob(const GrClip& clip, const SkPaint& paint, - const SkMatrix& viewMatrix, const SkTextBlob* blob, - SkScalar x, SkScalar y, SkDrawFilter* filter, - const SkIRect& clipBounds) { +void GrRenderTargetContext::drawGlyphRunList( + const GrClip& clip, const SkMatrix& viewMatrix, + SkGlyphRunList* blob, const SkIRect& clipBounds) { ASSERT_SINGLE_OWNER RETURN_IF_ABANDONED SkDEBUGCODE(this->validate();) - GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "drawTextBlob", fContext); + GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "drawGlyphRunList", fContext); GrTextContext* atlasTextContext = this->drawingManager()->getTextContext(); - atlasTextContext->drawTextBlob(fContext, fTextTarget.get(), clip, paint, viewMatrix, - fSurfaceProps, blob, x, y, filter, clipBounds); + atlasTextContext->drawGlyphRunList(fContext, fTextTarget.get(), clip, viewMatrix, + fSurfaceProps, blob, clipBounds); } void GrRenderTargetContext::discard() { |