libqcomui: Do not create EGL image for 420 SP formats in 7x27A

This change is done to reduce the CPU utilization by SurfaceFlinger
thread. This feature may be turned On/Off using a compile time flag

(cherry picked from commit 9691e73556e5c0b66553aa55eb504b9ebb0fd400)

Change-Id: I1cb5b5c8abef135bc520c6e39c6ccf236b2270c3

Conflicts:

	libqcomui/Android.mk
This commit is contained in:
Neti Ravi Kumar 2012-01-17 16:30:14 +05:30 committed by Andrew Sutherland
parent 6f273c5c6e
commit c616c48fc5
2 changed files with 12 additions and 3 deletions

View File

@ -4,9 +4,10 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
qcom_ui.cpp
ifeq ($(call is-board-platform,msm7x27a),true)
LOCAL_CFLAGS += -DCHECK_FOR_EXTERNAL_FORMAT
endif
#ifeq ($(TARGET_BOARD_PLATFORM),qsd8k) # these are originally for 7x27a
# LOCAL_CFLAGS += -DCHECK_FOR_EXTERNAL_FORMAT
# LOCAL_CFLAGS += -DBYPASS_EGLIMAGE
#endif
LOCAL_SHARED_LIBRARIES := \
libutils \

View File

@ -134,6 +134,14 @@ int getNumberOfArgsForOperation(int operation) {
* @return true if the format is supported by the GPU.
*/
bool isGPUSupportedFormat(int format) {
// For 7x27A bypass creating EGL image for 420 SP
// This is done to save CPU utilization by SurfaceFlinger thread
#ifdef BYPASS_EGLIMAGE
if (format == HAL_PIXEL_FORMAT_YCrCb_420_SP){
return false;
}
#endif
if (format == HAL_PIXEL_FORMAT_YV12) {
// We check the YV12 formats, since some Qcom specific formats
// could have the bits set.