Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6dcfdecc authored by Stan Iliev's avatar Stan Iliev
Browse files

Filter empty paths at record time

Filter empty paths at record time. Quick settings pull test has
about 18% empty paths.

Test: Ran quick settings pull jank test
Bug: 64487466
Change-Id: I5b1650060ae4d157d313efb435ecda26c03d4b72
parent b1671e0e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -533,6 +533,9 @@ void SkiaCanvas::drawArc(float left, float top, float right, float bottom,

void SkiaCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
    if (CC_UNLIKELY(paint.nothingToDraw())) return;
    if (CC_UNLIKELY(path.isEmpty() && (!path.isInverseFillType()))) {
        return;
    }
    mCanvas->drawPath(path, paint);
}