Skip to content
Snippets Groups Projects
Commit 4ef3cd51 authored by Diego Wilson's avatar Diego Wilson Committed by Gerrit - the friendly Code Review server
Browse files

hwc: display hal should report drawLayerUsingCopybit failure.

Display HAL should report drawLayerUsingCopybit failure otherwise
framework assumes HWC layers have been drawn and do not fallback
to GPU, which leads to flickers.

Change-Id: I0bb801d6b48dce143b2c917eaa77d0474c5a34f8
parent 902f538e
No related branches found
No related tags found
No related merge requests found
From 2cc3d4d9d547866e7fc1b2c38ab27cc9dda4775b Mon Sep 17 00:00:00 2001
From: Sushil Chauhan <sushilchauhan@codeaurora.org>
Date: Tue, 10 Sep 2013 15:51:12 -0700
Subject: [PATCH] hwc: display hal should report drawLayerUsingCopybit failure.
Display HAL should report drawLayerUsingCopybit failure otherwise
framework assumes HWC layers have been drawn and do not fallback
to GPU, which leads to flickers.
Change-Id: Id7366701016eb7f66bc0cf0b23ea7a5b911741a3
---
libhwcomposer/a-family/hwcomposer.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libhwcomposer/a-family/hwcomposer.cpp b/libhwcomposer/a-family/hwcomposer.cpp
index 3c0f1db..f0b21f0 100644
--- a/libhwcomposer/a-family/hwcomposer.cpp
+++ b/libhwcomposer/a-family/hwcomposer.cpp
@@ -1879,17 +1879,21 @@ static int hwc_set(hwc_composer_device_t *dev,
ctx->idleInvalidator->markForSleep();
drawLayerUsingBypass(ctx, &(list->hwLayers[i]), i);
#endif
} else if (list->hwLayers[i].compositionType == HWC_USE_OVERLAY) {
drawLayerUsingOverlay(ctx, &(list->hwLayers[i]));
} else if (list->flags & HWC_SKIP_COMPOSITION) {
continue;
} else if (list->hwLayers[i].compositionType == HWC_USE_COPYBIT) {
- drawLayerUsingCopybit(dev, &(list->hwLayers[i]), (EGLDisplay)dpy, (EGLSurface)sur);
+ ret = drawLayerUsingCopybit(dev, &(list->hwLayers[i]), (EGLDisplay)dpy, (EGLSurface)sur);
+ if (ret < 0) {
+ LOGE("%s: Copybit layer draw failed!", __FUNCTION__);
+ return ret;
+ }
}
}
} else {
if (ctx->hwcOverlayStatus == HWC_OVERLAY_OPEN)
ctx->hwcOverlayStatus = HWC_OVERLAY_PREPARE_TO_CLOSE;
}
bool canSkipComposition = list && list->flags & HWC_SKIP_COMPOSITION;
--
1.8.2.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment