Merging ScrimView into GradientView

Less banding, less drawing for All Apps Transition.

Bug: 63873246

Change-Id: I6c7c856e2939a10db7e44b266c1d6d51334fd152
This commit is contained in:
Mario Bertschler committed 2017-07-26 14:33:22 -07:00
1 parent 8806475b8e
commit 254bd42729
14 files changed
+84 -207

No files matched your search

-24
View File
@@ -28,7 +28,6 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
@@ -654,27 +653,4 @@ public final class Utilities {
return hashSet;
}
/**
* @return creates a new alpha mask bitmap out of an existing bitmap
*/
public static Bitmap convertToAlphaMask(Bitmap b, int applyAlpha) {
Bitmap a = Bitmap.createBitmap(b.getWidth(), b.getHeight(), Bitmap.Config.ALPHA_8);
Canvas c = new Canvas(a);
Paint paint = new Paint();
paint.setAlpha(applyAlpha);
c.drawBitmap(b, 0f, 0f, paint);
return a;
}
/**
* @return a new white 1x1 bitmap with ALPHA_8
*/
public static Bitmap createOnePixBitmap() {
Bitmap a = Bitmap.createBitmap(1, 1, Bitmap.Config.ALPHA_8);
Canvas c = new Canvas(a);
Paint paint = new Paint();
paint.setColor(Color.WHITE);
c.drawPaint(paint);
return a;
}
}