Display: Add support in libqcomui to check FB update

This change adds support in libqcomui to check if FB is updated
by a composition type

Change-Id: Ic23f24d95166cb9b1a03614f1c0fd562f321a1fd
This commit is contained in:
Jeykumar Sankaran 2011-12-13 19:41:03 -08:00 committed by toastcfh
parent 2ce4ec69b8
commit 5312f7f48e
3 changed files with 36 additions and 6 deletions

View File

@ -54,12 +54,6 @@ enum {
COMPOSITION_TYPE_DYN = 0x8
};
enum HWCCompositionType {
HWC_USE_GPU = HWC_FRAMEBUFFER, // This layer is to be handled by Surfaceflinger
HWC_USE_OVERLAY = HWC_OVERLAY, // This layer is to be handled by the overlay
HWC_USE_COPYBIT // This layer is to be handled by copybit
};
enum HWCLayerType{
HWC_SINGLE_VIDEO = 0x1,
HWC_ORIG_RESOLUTION = 0x2,

View File

@ -291,3 +291,23 @@ int getPerFrameFlags(int hwclFlags, int layerFlags) {
return flags;
}
/*
* Checks if FB is updated by this composition type
*
* @param: composition type
* @return: true if FB is updated, false if not
*/
bool isUpdatingFB(HWCCompositionType compositionType)
{
switch(compositionType)
{
case HWC_USE_COPYBIT:
return true;
default:
LOGE("%s: invalid composition type(%d)", __FUNCTION__, compositionType);
return false;
};
}

View File

@ -32,6 +32,7 @@
#include <cutils/native_handle.h>
#include <ui/GraphicBuffer.h>
#include <hardware/hwcomposer.h>
using android::sp;
using android::GraphicBuffer;
@ -68,6 +69,12 @@ enum {
HWC_COMP_BYPASS = 0x40000000,
};
enum HWCCompositionType {
HWC_USE_GPU = HWC_FRAMEBUFFER, // This layer is to be handled by Surfaceflinger
HWC_USE_OVERLAY = HWC_OVERLAY, // This layer is to be handled by the overlay
HWC_USE_COPYBIT // This layer is to be handled by copybit
};
/*
* Structure to hold the buffer geometry
*/
@ -155,4 +162,13 @@ int updateLayerQcomFlags(eLayerAttrib attribute, bool enable, int& currentFlags)
*/
int getPerFrameFlags(int hwclFlags, int layerFlags);
/*
* Checks if FB is updated by this composition type
*
* @param: composition type
* @return: true if FB is updated, false if not
*/
bool isUpdatingFB(HWCCompositionType compositionType);
#endif // INCLUDE_LIBQCOM_UI