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

Commit 20428287 authored by Tanguy Pruvot's avatar Tanguy Pruvot Committed by Emilio López
Browse files

bootanimation: allow using RGB565 instead of ARGB8888

RGB565 uses considerably less memory, and together with texture
cache, it allows us to offer a really smooth bootanimation on
not so powerful devices.

Change-Id: I9da8fd7e6a587b5895519dd0983ec9b8f676771b
parent 49c83850
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,10 @@ ifeq ($(TARGET_BOOTANIMATION_TEXTURE_CACHE),false)
    LOCAL_CFLAGS += -DNO_TEXTURE_CACHE=1
    LOCAL_CFLAGS += -DNO_TEXTURE_CACHE=1
endif
endif


ifeq ($(TARGET_BOOTANIMATION_USE_RGB565),true)
    LOCAL_CFLAGS += -DUSE_565
endif

LOCAL_MODULE:= bootanimation
LOCAL_MODULE:= bootanimation




+4 −0
Original line number Original line Diff line number Diff line
@@ -161,7 +161,11 @@ status_t BootAnimation::initTexture(void* buffer, size_t len)
    codec->setDitherImage(false);
    codec->setDitherImage(false);
    if (codec) {
    if (codec) {
        codec->decode(&stream, &bitmap,
        codec->decode(&stream, &bitmap,
                #ifdef USE_565
                SkBitmap::kRGB_565_Config,
                #else
                SkBitmap::kARGB_8888_Config,
                SkBitmap::kARGB_8888_Config,
                #endif
                SkImageDecoder::kDecodePixels_Mode);
                SkImageDecoder::kDecodePixels_Mode);
        delete codec;
        delete codec;
    }
    }