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

Commit f935dae4 authored by Leon Scroggins III's avatar Leon Scroggins III Committed by Leon Scroggins
Browse files

Use HARDWARE ALPHA_8 Bitmaps

Ibfec753b1f82b0ff97341a742b2933e2f18b234a adds the ability to upload
ALPHA_8 Bitmaps to HARDWARE. Take advantage of it when possible for the
themed icons.

Bug: 141480329
Test: manual
Change-Id: Ibcc75e0fd22c1600b54e562f2153c1cb25e461bf
parent 7bc26cd6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -594,6 +594,11 @@ public abstract class BaseIconCache {
                Bitmap monoBitmap = Bitmap.createBitmap(
                        icon.getWidth(), icon.getHeight(), Config.ALPHA_8);
                monoBitmap.copyPixelsFromBuffer(ByteBuffer.wrap(data));
                Bitmap hwMonoBitmap = monoBitmap.copy(Config.HARDWARE, false /*isMutable*/);
                if (hwMonoBitmap != null) {
                    monoBitmap.recycle();
                    monoBitmap = hwMonoBitmap;
                }
                try (BaseIconFactory factory = getIconFactory()) {
                    entry.bitmap.setMonoIcon(monoBitmap, factory);
                }