HWC: Fix for non-overlay targets

Do not call prepareOverlay, instead
use copybit to compose video frames

Change-Id: I5e85b0b65009de37ab792e59d259d8f1879fb0c4
This commit is contained in:
Naseer Ahmed 2011-11-21 19:51:25 -08:00 committed by Linux Build Service Account
parent d047ca874d
commit 229856bedf
2 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,9 @@ LOCAL_ADDITIONAL_DEPENDENCIES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr
ifeq ($(TARGET_HAVE_HDMI_OUT),true)
LOCAL_CFLAGS += -DHDMI_DUAL_DISPLAY
endif
ifeq ($(TARGET_USES_OVERLAY),true)
LOCAL_CFLAGS += -DUSE_OVERLAY
endif
ifeq ($(TARGET_HAVE_BYPASS),true)
LOCAL_CFLAGS += -DCOMPOSITION_BYPASS
endif

View File

@ -764,13 +764,16 @@ static int hwc_prepare(hwc_composer_device_t *dev, hwc_layer_list_t* list) {
if (!isValidDestination(hwcModule->fbDevice, list->hwLayers[i].displayFrame)) {
list->hwLayers[i].compositionType = HWC_FRAMEBUFFER;
skipComposition = false;
#ifdef USE_OVERLAY
} else if(prepareOverlay(ctx, &(list->hwLayers[i]), waitForVsync) == 0) {
list->hwLayers[i].compositionType = HWC_USE_OVERLAY;
list->hwLayers[i].hints |= HWC_HINT_CLEAR_FB;
// We've opened the channel. Set the state to open.
ctx->hwcOverlayStatus = HWC_OVERLAY_OPEN;
#endif
}
else if (hwcModule->compositionType & (COMPOSITION_TYPE_C2D)) {
else if (hwcModule->compositionType & (COMPOSITION_TYPE_C2D|
COMPOSITION_TYPE_MDP)) {
//Fail safe path: If drawing with overlay fails,
//Use C2D if available.