// return ((origBitmapSize * matrixScaleFactor) < maximumAllocationSize);
// Skip the division step:
const size_t size = provider.info().getSafeSize(provider.info().minRowBytes());
- return size < (maximumAllocation * invMat.getScaleX() * invMat.getScaleY());
+ SkScalar invScaleSqr = invMat.getScaleX() * invMat.getScaleY();
+#ifndef SK_SUPPORT_LEGACY_NEG_SCALE_HQ
+ invScaleSqr = SkScalarAbs(invScaleSqr);
+#endif
+ return size < (maximumAllocation * invScaleSqr);
}
/*
invScaleX = scale.width();
invScaleY = scale.height();
}
+#ifndef SK_SUPPORT_LEGACY_NEG_SCALE_HQ
+ invScaleX = SkScalarAbs(invScaleX);
+ invScaleY = SkScalarAbs(invScaleY);
+#endif
+
if (SkScalarNearlyEqual(invScaleX, 1) && SkScalarNearlyEqual(invScaleY, 1)) {
return false; // no need for HQ
}