Skip to content

Commit

Permalink
Create EGL image for all formats
Browse files Browse the repository at this point in the history
Do not bypass creating EGL image for formats not natively
supported by GPU. Required changes were made in ADRENO driver
to reduce CPU utilization, and this change is no longer required.

CRs-fixed: 338153

(cherry picked from commit 979aa3d)

Change-Id: I4e4515dcf0512caed5ebc4d5f038f91b719b273c
  • Loading branch information
Neti Ravi Kumar authored and Srivalli Oguri committed Mar 20, 2012
1 parent 14786e8 commit 8fce0ff
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 45 deletions.
4 changes: 0 additions & 4 deletions libqcomui/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
qcom_ui.cpp

ifeq ($(call is-board-platform,msm7627a),true)
LOCAL_CFLAGS += -DCHECK_FOR_EXTERNAL_FORMAT
endif

LOCAL_SHARED_LIBRARIES := \
libutils \
libcutils \
Expand Down
30 changes: 0 additions & 30 deletions libqcomui/qcom_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,36 +178,6 @@ int decideTextureTarget(int pixel_format)
return retVal;
}

/*
* Checks if the format is natively supported by the GPU.
* For now, we use this function to check only if CHECK_FOR_EXTERNAL_FORMAT
* is set.
*
* @param: format to check
*
* @return true if the format is supported by the GPU.
*/
bool isGPUSupportedFormatInHW(int format) {
// For 7x27A bypass creating EGL image for formats not natively supported
// in GPU.
// This is done to save CPU utilization by SurfaceFlinger thread
#ifdef CHECK_FOR_EXTERNAL_FORMAT

if (format == HAL_PIXEL_FORMAT_YV12){
return false;
} else if (format == HAL_PIXEL_FORMAT_YCrCb_420_SP) {
return false;
} else if (format == HAL_PIXEL_FORMAT_YCbCr_420_SP) {
return false;
} else if (format == HAL_PIXEL_FORMAT_NV12_ENCODEABLE) {
return false;
}
#endif

return true;
}


/*
* Function to check if the allocated buffer is of the correct size.
* Reallocate the buffer with the correct size, if the size doesn't
Expand Down
11 changes: 0 additions & 11 deletions libqcomui/qcom_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,6 @@ int checkBuffer(native_handle_t *buffer_handle, int size, int usage);
*/
bool isGPUSupportedFormat(int format);

/*
* Checks if the format is natively supported by the GPU.
* For now, we use this function to check only if CHECK_FOR_EXTERNAL_FORMAT
* is set.
*
* @param: format to check
*
* @return true if the format is supported by the GPU.
*/
bool isGPUSupportedFormatInHW(int format);

/*
* Adreno is not optimized for GL_TEXTURE_EXTERNAL_OES
* texure target. DO NOT choose TEXTURE_EXTERNAL_OES
Expand Down

0 comments on commit 8fce0ff

Please sign in to comment.