From cddab25218c52327ee1c527d726e69aa89540917 Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Mon, 16 Jul 2018 11:19:04 -0400 Subject: Use SkGlyphRunListIterator in gpu Instead of using the text blob through the stack start using the glyph run list. This CL is similar to a portion of https://skia-review.googlesource.com/c/skia/+/137224 which was reverted. Change-Id: I1f0619bd2d13523f9af1a68ab27fb26abd086add Reviewed-on: https://skia-review.googlesource.com/141543 Commit-Queue: Herb Derby Reviewed-by: Jim Van Verth --- src/gpu/SkGpuDevice.cpp | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/gpu/SkGpuDevice.cpp') diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index fc5638f6a7..27eeda7902 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -1637,30 +1637,13 @@ void SkGpuDevice::drawPosText(const void* text, size_t byteLength, this->devClipBounds()); } -void SkGpuDevice::drawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, - const SkPaint& paint) { - ASSERT_SINGLE_OWNER - GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawTextBlob", fContext.get()); - SkDEBUGCODE(this->validate();) - - fRenderTargetContext->drawTextBlob(this->clip(), paint, this->ctm(), blob, x, y, - this->devClipBounds()); -} - void SkGpuDevice::drawGlyphRunList(SkGlyphRunList* glyphRunList) { ASSERT_SINGLE_OWNER GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawGlyphRunList", fContext.get()); SkDEBUGCODE(this->validate();) - auto blob = glyphRunList->blob(); - - if (blob == nullptr) { - glyphRunList->temporaryShuntToDrawPosText(this, SkPoint::Make(0, 0)); - } else { - auto origin = glyphRunList->origin(); - auto paint = glyphRunList->paint(); - this->drawTextBlob(blob, origin.x(), origin.y(), paint); - } + fRenderTargetContext->drawGlyphRunList( + this->clip(), this->ctm(), glyphRunList, this->devClipBounds()); } /////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3