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 <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
This commit is contained in:
Herb Derby 2020-06-17 11:51:54 -04:00 committed by Skia Commit-Bot
parent 8346834d7c
commit ccbd3eeb58

View File

@ -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}};
};