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

Commit e0b39fc1 authored by Chris Craik's avatar Chris Craik Committed by Android (Google) Code Review
Browse files

Merge "Account for hairlines in quick rejection logic" into jb-mr2-dev

parents bc9da0f4 e7c69c6f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -165,7 +165,11 @@ public:
        return DeferredDisplayList::kOpBatch_None;
    }

    float strokeWidthOutset() { return mPaint->getStrokeWidth() * 0.5f; }
    float strokeWidthOutset() {
        float width = mPaint->getStrokeWidth();
        if (width == 0) return 0.5f; // account for hairline
        return width * 0.5f;
    }

protected:
    SkPaint* getPaint(OpenGLRenderer& renderer) {
+1 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ void PathTessellator::expandBoundsForStroke(SkRect& bounds, const SkPaint* paint
        bool forceExpand) {
    if (forceExpand || paint->getStyle() != SkPaint::kFill_Style) {
        float outset = paint->getStrokeWidth() * 0.5f;
        if (outset == 0) outset = 0.5f; // account for hairline
        bounds.outset(outset, outset);
    }
}