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

Commit 58cff53a authored by Jérôme Poichet's avatar Jérôme Poichet Committed by Android (Google) Code Review
Browse files

Merge "SkScalarDiv and its variants are deprecated" into mnc-dev

parents 3dd41596 47b34415
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -102,8 +102,8 @@ public:
            canvas->translate(bounds.fLeft, bounds.fTop);
            canvas->scale(scale, scale);

            bounds.fRight = SkScalarDiv(bounds.fRight-bounds.fLeft, scale);
            bounds.fBottom = SkScalarDiv(bounds.fBottom-bounds.fTop, scale);
            bounds.fRight = (bounds.fRight-bounds.fLeft) / scale;
            bounds.fBottom = (bounds.fBottom-bounds.fTop) / scale;
            bounds.fLeft = bounds.fTop = 0;

            ALOGV("Drawing scaled 9-patch: (%g,%g)-(%g,%g) srcDensity=%d destDensity=%d",
+1 −2
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ SkScalar calculateStretch(SkScalar boundsLimit, SkScalar startingPoint,
    SkScalar spaceRemaining = boundsLimit - startingPoint;
    SkScalar stretchySpaceRemaining =
                spaceRemaining - SkIntToScalar(numFixedPixelsRemaining);
    return SkScalarMulDiv(srcSpace, stretchySpaceRemaining,
                          numStrechyPixelsRemaining);
    return srcSpace * stretchySpaceRemaining / numStrechyPixelsRemaining;
}

void NinePatch_Draw(SkCanvas* canvas, const SkRect& bounds,