From ccbd3eeb58298e6b53975a00844876f5d17ff4b9 Mon Sep 17 00:00:00 2001 From: Herb Derby Date: Wed, 17 Jun 2020 11:51:54 -0400 Subject: [PATCH] use joinPossibleEmptyRect for bounding box When the fuzzer is used, some of the positions are so far out in the float space, that all values become the same making empty rects. Using joinNonEmptyArg really had no advantages. Bug: chromium:1095625 Change-Id: I46a61e422ff7053aca2f34494a2f5f0ec7e8fc74 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/297026 Commit-Queue: Herb Derby Commit-Queue: Ben Wagner Auto-Submit: Herb Derby Reviewed-by: Ben Wagner --- src/gpu/text/GrTextBlob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp index 5e5b8dc251..565d605f99 100644 --- a/src/gpu/text/GrTextBlob.cpp +++ b/src/gpu/text/GrTextBlob.cpp @@ -533,7 +533,8 @@ auto GrTextBlob::SubRun::InitForAtlas(SubRunType type, int16_t b = t + skGlyph->height(); SkPoint lt = SkPoint::Make(l, t) * strikeToSource + pos, rb = SkPoint::Make(r, b) * strikeToSource + pos; - bounds.joinNonEmptyArg(SkRect::MakeLTRB(lt.x(), lt.y(), rb.x(), rb.y())); + + bounds.joinPossiblyEmptyRect(SkRect::MakeLTRB(lt.x(), lt.y(), rb.x(), rb.y())); return Data{{skGlyph->getPackedID()}, pos, {l, t, r, b}}; };