diff --git a/libqcomui/Android.mk b/libqcomui/Android.mk index cbc2639..08d971b 100644 --- a/libqcomui/Android.mk +++ b/libqcomui/Android.mk @@ -6,10 +6,16 @@ LOCAL_SRC_FILES := \ utils/profiler.cpp \ utils/IdleTimer.cpp +LOCAL_CFLAGS := -DLOG_TAG=\"libQcomUI\" + ifeq ($(TARGET_BOARD_PLATFORM),qsd8k) # these are originally for 7x27a LOCAL_CFLAGS += -DCHECK_FOR_EXTERNAL_FORMAT endif +ifeq ($(BOARD_ADRENO_DECIDE_TEXTURE_TARGET),true) + LOCAL_CFLAGS += -DDECIDE_TEXTURE_TARGET +endif + LOCAL_SHARED_LIBRARIES := \ libutils \ libcutils \ @@ -23,8 +29,6 @@ LOCAL_C_INCLUDES := $(TOP)/hardware/qcom/display/libgralloc \ $(TOP)/external/skia/include/core \ $(TOP)/external/skia/include/images -LOCAL_CFLAGS := -DLOG_TAG=\"libQcomUI\" -LOCAL_CFLAGS += -DQCOM_HARDWARE LOCAL_CFLAGS += -DDEBUG_CALC_FPS LOCAL_MODULE := libQcomUI LOCAL_MODULE_TAGS := optional diff --git a/libqcomui/qcom_ui.cpp b/libqcomui/qcom_ui.cpp index 15ded4b..b4fcda8 100644 --- a/libqcomui/qcom_ui.cpp +++ b/libqcomui/qcom_ui.cpp @@ -40,9 +40,11 @@ #include #include +#ifdef DECIDE_TEXTURE_TARGET #include #include #include +#endif using gralloc::IMemAlloc; using gralloc::IonController; @@ -152,7 +154,7 @@ bool isGPUSupportedFormat(int format) { } /* decide the texture target dynamically, based on the pixel format*/ - +#ifdef DECIDE_TEXTURE_TARGET int decideTextureTarget(int pixel_format) { @@ -177,6 +179,7 @@ int decideTextureTarget(int pixel_format) } return retVal; } +#endif /* * Checks if the format is natively supported by the GPU. diff --git a/libqcomui/qcom_ui.h b/libqcomui/qcom_ui.h index 4089022..7e7a6b1 100644 --- a/libqcomui/qcom_ui.h +++ b/libqcomui/qcom_ui.h @@ -226,8 +226,9 @@ bool isGPUSupportedFormatInHW(int format); * GL_TEXTURE_EXTERNAL_OES for YUV formats. * */ - +#ifdef DECIDE_TEXTURE_TARGET int decideTextureTarget (const int pixel_format); +#endif /* * Gets the number of arguments required for this operation.