summaryrefslogtreecommitdiffstats
path: root/hwc
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-09-02 11:47:13 -0700
committerMathias Agopian <mathias@google.com>2011-09-02 11:47:13 -0700
commita3a76c576a0a1706c102570697b4fc0017eb46fb (patch)
treeb14a225e41f23c15aebf68911bb9fa88fb616f2a /hwc
parent263503952fda88ce3a03219adb55fe207b9ab4c4 (diff)
downloadhardware_ti_omap4xxx-a3a76c576a0a1706c102570697b4fc0017eb46fb.tar.gz
hardware_ti_omap4xxx-a3a76c576a0a1706c102570697b4fc0017eb46fb.tar.bz2
hardware_ti_omap4xxx-a3a76c576a0a1706c102570697b4fc0017eb46fb.zip
fix more drawing artifacts caused by hw composer
hwc used the pixelformat to determine if a layer was opaque instead of using the blending field. Change-Id: I0e3dba7234639cb75156c6e941bf5e6aa0ecaf8d
Diffstat (limited to 'hwc')
-rw-r--r--hwc/hwc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hwc/hwc.c b/hwc/hwc.c
index c22f85b..6b69e4b 100644
--- a/hwc/hwc.c
+++ b/hwc/hwc.c
@@ -178,7 +178,8 @@ static int scaled(hwc_layer_t *layer)
static int sync_id = 0;
-#define is_ALPHA(format) ((format) == HAL_PIXEL_FORMAT_BGRA_8888 || (format) == HAL_PIXEL_FORMAT_RGBA_8888)
+#define is_BLENDED(blending) ((blending) != HWC_BLENDING_NONE)
+
#define is_RGB(format) ((format) == HAL_PIXEL_FORMAT_BGRA_8888 || (format) == HAL_PIXEL_FORMAT_RGB_565 || (format) == HAL_PIXEL_FORMAT_BGRX_8888)
#define is_BGR(format) ((format) == HAL_PIXEL_FORMAT_RGBX_8888 || (format) == HAL_PIXEL_FORMAT_RGBA_8888)
#define is_NV12(format) ((format) == HAL_PIXEL_FORMAT_TI_NV12 || (format) == HAL_PIXEL_FORMAT_TI_NV12_PADDED)
@@ -607,7 +608,7 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t*
if (can_dss_render_layer(hwc_dev, layer) &&
mem_used + mem1d(handle) < MAX_TILER_SLOT &&
/* can't have a transparent overlay in the middle of the framebuffer stack */
- !(is_ALPHA(handle->iFormat) && fb_z >= 0)) {
+ !(is_BLENDED(layer->blending) && fb_z >= 0)) {
/* render via DSS overlay */
mem_used += mem1d(handle);
layer->compositionType = HWC_OVERLAY;
@@ -663,7 +664,7 @@ static int omap4_hwc_prepare(struct hwc_composer_device *dev, hwc_layer_list_t*
IMG_native_handle_t *handle = (IMG_native_handle_t *)layer->handle;
if ((layer->flags & HWC_SKIP_LAYER) || !layer->handle)
continue;
- if (!is_ALPHA(handle->iFormat))
+ if (!is_BLENDED(layer->blending))
layer->hints |= HWC_HINT_CLEAR_FB;
}
}