Merge "Fixed inverse constant" into sc-dev am: befdba3764

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14083126

Change-Id: Id42c1d96bf1816fe2909cb08419a9369faabaf4b
This commit is contained in:
Nader Jawad
2021-04-05 18:42:03 +00:00
committed by Automerger Merge Worker

View File

@@ -186,8 +186,8 @@ sk_sp<SkImageFilter> StretchEffect::getImageFilter(const sk_sp<SkImage>& snapsho
float normOverScrollDistY = mStretchDirection.y();
float distanceStretchedX = CONTENT_DISTANCE_STRETCHED / (1 + abs(normOverScrollDistX));
float distanceStretchedY = CONTENT_DISTANCE_STRETCHED / (1 + abs(normOverScrollDistY));
float inverseDistanceStretchedX = 1.f / distanceStretchedX;
float inverseDistanceStretchedY = 1.f / distanceStretchedY;
float inverseDistanceStretchedX = 1.f / CONTENT_DISTANCE_STRETCHED;
float inverseDistanceStretchedY = 1.f / CONTENT_DISTANCE_STRETCHED;
float diffX = distanceStretchedX - CONTENT_DISTANCE_STRETCHED;
float diffY = distanceStretchedY - CONTENT_DISTANCE_STRETCHED;