ifdef and comment out libjpeg

Chances are there are not many themes in widespread use that are
using jpeg images, but this will be easy to revert back or even
just temporarily modify if we need jpeg support in a pinch.

Change-Id: If17b05ce3ebccce724fd74b26ed8ea91b287c3cf
This commit is contained in:
Ethan Yonker
2016-01-27 10:57:26 -06:00
parent fbb4353a24
commit e95c4868b9
13 changed files with 23 additions and 18 deletions
+1 -2
View File
@@ -4,8 +4,7 @@
<resolution width="1920" height="1200"/>
<author>TeamWin</author>
<title>TWRP</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<description>splash screen</description>
<themeversion>1</themeversion>
</details>
+1 -1
View File
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
+1 -2
View File
@@ -4,8 +4,7 @@
<resolution width="800" height="480"/>
<author>TeamWin</author>
<title>TWRP</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<description>splash screen</description>
<themeversion>1</themeversion>
</details>
+1 -1
View File
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
+1 -2
View File
@@ -4,8 +4,7 @@
<resolution width="1080" height="1920"/>
<author>TeamWin</author>
<title>TWRP</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<description>splash screen</description>
<themeversion>1</themeversion>
</details>
+1 -1
View File
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
+1 -2
View File
@@ -4,8 +4,7 @@
<resolution width="480" height="800"/>
<author>TeamWin</author>
<title>TWRP</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<description>splash screen</description>
<themeversion>1</themeversion>
</details>
+1 -1
View File
@@ -5,7 +5,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
+1 -2
View File
@@ -4,8 +4,7 @@
<resolution width="320" height="320"/>
<author>TeamWin</author>
<title>TWRP</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<description>splash screen</description>
<themeversion>1</themeversion>
</details>
+1 -1
View File
@@ -6,7 +6,7 @@
<author>TeamWin</author>
<title>Backup Naowz</title>
<description>Default basic theme</description>
<preview>preview.jpg</preview>
<preview>preview.png</preview>
<themeversion>1</themeversion>
</details>
+4 -2
View File
@@ -55,10 +55,11 @@ LOCAL_C_INCLUDES += \
external/libpng \
external/zlib \
system/core/include \
external/jpeg \
external/freetype/include \
external/libcxx/include
#external/jpeg \
ifeq ($(RECOVERY_TOUCHSCREEN_SWAP_XY), true)
LOCAL_CFLAGS += -DRECOVERY_TOUCHSCREEN_SWAP_XY
endif
@@ -151,7 +152,8 @@ endif
LOCAL_CLANG := true
LOCAL_CFLAGS += -DTWRES=\"$(TWRES_PATH)\"
LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libjpeg libpng libutils
LOCAL_SHARED_LIBRARIES += libft2 libz libc libcutils libpng libutils
#libjpeg
LOCAL_STATIC_LIBRARIES += libpixelflinger_twrp
LOCAL_MODULE_TAGS := eng
LOCAL_MODULE := libminuitwrp
+8
View File
@@ -31,9 +31,11 @@
#include <png.h>
#include <pixelflinger/pixelflinger.h>
#ifdef TW_INCLUDE_JPEG
extern "C" {
#include "jpeglib.h"
}
#endif
#include "minui.h"
#define SURFACE_DATA_ALIGNMENT 8
@@ -251,6 +253,7 @@ int res_create_surface_png(const char* name, gr_surface* pSurface) {
return result;
}
#ifdef TW_INCLUDE_JPEG
int res_create_surface_jpg(const char* name, gr_surface* pSurface) {
GGLSurface* surface = NULL;
int result = 0, y;
@@ -348,18 +351,23 @@ exit:
}
return result;
}
#endif
int res_create_surface(const char* name, gr_surface* pSurface) {
int ret;
if (!name) return -1;
#ifdef TW_INCLUDE_JPEG
if (strlen(name) > 4 && strcmp(name + strlen(name) - 4, ".jpg") == 0)
return res_create_surface_jpg(name,pSurface);
#endif
ret = res_create_surface_png(name,pSurface);
#ifdef TW_INCLUDE_JPEG
if (ret < 0)
ret = res_create_surface_jpg(name,pSurface);
#endif
return ret;
}
+1 -1
View File
@@ -122,7 +122,7 @@ ifeq ($(TARGET_USERIMAGES_USE_EXT4), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libext4_utils.so
endif
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libaosprecovery.so
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
#RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libjpeg.so
ifeq ($(TWHAVE_SELINUX), true)
RELINK_SOURCE_FILES += $(TARGET_OUT_SHARED_LIBRARIES)/libselinux.so
ifneq ($(TARGET_USERIMAGES_USE_EXT4), true)