If the canvas' device list has never been set up, or
has been set to an empty clip, the bounder's clip will not be
initialized, and checking bounding rect may fail.
Check to see if the bounder was ever called for an individual
glyph before checking the result.
bug:
4155270
Change-Id: I625e885d13208e82c44259277c74b8f0cef5b0cb
return doIRect(mUnion);
}
+ bool isEmpty() { return mUnion.isEmpty(); }
+
bool joinGlyphs(const SkIRect& rect) {
bool isGlyph = mType == kDrawGlyph_Type;
if (isGlyph)
mBounder.setEmpty();
mBounder.setType(CommonCheck::kDrawGlyph_Type);
INHERITED::drawPosText(text, byteLength, pos, paint);
- mBounder.doRect(CommonCheck::kDrawPosText_Type);
+ if (!mBounder.isEmpty())
+ mBounder.doRect(CommonCheck::kDrawPosText_Type);
}
virtual void drawPosTextH(const void* text, size_t byteLength,