Add half-resolution boot animations for low-end devices
On low-end devices, the current 48 fps boot animation can use more than 50% of CPU time, and if the texture cache is enabled, a majority of main memory as well. For these devices, add half-resolution variants of the lower-resolution boot animations which display 2x upscaled -- this greatly speeds the boot process and makes the boot animation run more smoothly. Change-Id: I0140616ca38c52a06dd4622f1c20a9ca0da95f4b
This commit is contained in:
parent
ac948f53eb
commit
367e64830f
8 changed files with 28 additions and 0 deletions
|
@ -29,8 +29,12 @@ $(eval TARGET_BOOTANIMATION_NAME := $(shell \
|
||||||
endef
|
endef
|
||||||
$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
|
$(foreach size,$(bootanimation_sizes), $(call check_and_set_bootanimation,$(size)))
|
||||||
|
|
||||||
|
ifeq ($(TARGET_BOOTANIMATION_HALF_RES),true)
|
||||||
|
PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/halfres/$(TARGET_BOOTANIMATION_NAME).zip
|
||||||
|
else
|
||||||
PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
|
PRODUCT_BOOTANIMATION := vendor/cm/prebuilt/common/bootanimation/$(TARGET_BOOTANIMATION_NAME).zip
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifdef CM_NIGHTLY
|
ifdef CM_NIGHTLY
|
||||||
PRODUCT_PROPERTY_OVERRIDES += \
|
PRODUCT_PROPERTY_OVERRIDES += \
|
||||||
|
|
BIN
prebuilt/common/bootanimation/halfres/240.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/240.zip
Normal file
Binary file not shown.
BIN
prebuilt/common/bootanimation/halfres/320.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/320.zip
Normal file
Binary file not shown.
BIN
prebuilt/common/bootanimation/halfres/360.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/360.zip
Normal file
Binary file not shown.
BIN
prebuilt/common/bootanimation/halfres/480.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/480.zip
Normal file
Binary file not shown.
BIN
prebuilt/common/bootanimation/halfres/540.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/540.zip
Normal file
Binary file not shown.
BIN
prebuilt/common/bootanimation/halfres/600.zip
Normal file
BIN
prebuilt/common/bootanimation/halfres/600.zip
Normal file
Binary file not shown.
24
prebuilt/common/bootanimation/halfres/generate-half-res-anims.sh
Executable file
24
prebuilt/common/bootanimation/halfres/generate-half-res-anims.sh
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
HALF_RES_RESOLUTIONS="240 320 360 480 540 600"
|
||||||
|
|
||||||
|
for i in $HALF_RES_RESOLUTIONS; do
|
||||||
|
mkdir $i
|
||||||
|
cd $i
|
||||||
|
if [ -f ../../$(($i/2)).zip ]; then
|
||||||
|
# use the existing scaled images
|
||||||
|
echo "Using existing half-scale images instead of scaling from $i px"
|
||||||
|
unzip ../../$(($i/2)).zip
|
||||||
|
rm -f desc.txt
|
||||||
|
unzip ../../$i.zip desc.txt
|
||||||
|
else
|
||||||
|
unzip ../../$i.zip
|
||||||
|
for j in */*.jpg; do
|
||||||
|
convert $j -resize 50% tmp.jpg
|
||||||
|
mv tmp.jpg $j
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
zip -r0 ../$i.zip .
|
||||||
|
cd ..
|
||||||
|
rm -rf $i
|
||||||
|
done
|
Loading…
Reference in a new issue