aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGpuDevice.cpp
diff options
context:
space:
mode:
authorGravatar Herb Derby <herb@google.com>2018-07-16 11:19:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-19 16:25:55 +0000
commitcddab25218c52327ee1c527d726e69aa89540917 (patch)
tree91a8bd583444bed7903bc51953c35e4b6f02c92b /src/gpu/SkGpuDevice.cpp
parent297c3c8e85bdb7ed79aaa6a596f52874d79e7a25 (diff)
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 <herb@google.com> Reviewed-by: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/SkGpuDevice.cpp')
-rw-r--r--src/gpu/SkGpuDevice.cpp21
1 files changed, 2 insertions, 19 deletions
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());
}
///////////////////////////////////////////////////////////////////////////////