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

Commit 1bf219d9 authored by Christopher R. Palmer's avatar Christopher R. Palmer Committed by Abhisek Devkota
Browse files

bootanimation: Allow devices to avoid loading many textures

The bootanimation attempts to guess whether or not it is safe
to load all the textures for a "part" into memory to speed
up boot time.

This is causing problems on some devices and therefore
allow devices to select the slower (but safer) mode
where it will not load all the textures into memory.

Change-Id: If18686261d024c410cc355c1f90001b9449fd0bf
parent 95163a5f
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -24,6 +24,10 @@ LOCAL_SHARED_LIBRARIES := \
    libtinyalsa \
    libmedia

ifeq ($(TARGET_SAVE_RAM_IN_BOOTANIMATION),true)
    LOCAL_CFLAGS += -DSAVE_RAM_IN_BOOTANIMATION
endif

ifeq ($(TARGET_CONTINUOUS_SPLASH_ENABLED),true)
    LOCAL_CFLAGS += -DCONTINUOUS_SPLASH
endif
+4 −0
Original line number Diff line number Diff line
@@ -706,7 +706,11 @@ bool BootAnimation::movie()
        GLuint mTextureid;
        glGetIntegerv(GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
        //ALOGD("freemem:%ld, %d", getFreeMemory(), mMaxTextureSize);
#ifdef SAVE_RAM_IN_BOOTANIMATION
        {
#else
        if(getFreeMemory() < mMaxTextureSize * mMaxTextureSize * fcount / 1024) {
#endif
            ALOGD("Use save memory method, maybe small fps in actual.");
            needSaveMem = true;
            glGenTextures(1, &mTextureid);