When computing cursor rings, adjacent bitmaps and rectangles
may be joined into one. Glyphs may be non-adjacent to account
for intercharacter spacing and white space characters.
Bitmaps and rects may be close by but not joinable if they
don't share a common edge.
bug:
3322613
Change-Id: Ie9e4b4f9f66857c533a8459c0f8a9a62d0be8dcd
return false;
if (mLayerTypes.isEmpty() || mLayerTypes.last() != mType
|| !mAppendLikeTypes
- // if the last was a rect, and the current one is also a rect,
- // but the two rects have a gap between, don't join them -- push
+ // if the last and current were not glyphs,
+ // and the two bounds have a gap between, don't join them -- push
// an empty between them
- || (mType == kDrawRect_Type && !joinable(rect))) {
+ || (mType != kDrawGlyph_Type && !joinable(rect))) {
push(mType, mEmpty);
}
DBG_NAV_LOGD("RingCheck join %s (%d,%d,r=%d,b=%d) '%c'",