summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-07-26 13:49:25 -0500
committerDaniel Levin <dendy@ti.com>2012-11-28 21:16:24 +0200
commit28d6d8e955b588edaba5c255ccd8ab4a4fc600ce (patch)
treec3edd934a84248d8b3ca9b26320dfa5ab0234230
parent469c35b3ca3d15e668a9a853077727ce392f544a (diff)
downloadhardware_ti_omap4-28d6d8e955b588edaba5c255ccd8ab4a4fc600ce.zip
hardware_ti_omap4-28d6d8e955b588edaba5c255ccd8ab4a4fc600ce.tar.gz
hardware_ti_omap4-28d6d8e955b588edaba5c255ccd8ab4a4fc600ce.tar.bz2
hwc: rgz: Fix for pixel wide regions returning no ops
A region that is pixel wide is in the top-left corner of the screen (0,0,1,1) makes the empty_rect function to return true, which is wrong since the region is not an empty rectangle. Since this function is being used in the moment the blits are generated, the regionizer thinks the region is empty with no intersections leading to error messages. Change-Id: I5f838008a39dcd469e325cb3fdd834408aa91291 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>
-rw-r--r--hwc/rgz_2d.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hwc/rgz_2d.c b/hwc/rgz_2d.c
index abf2722..63dfaf1 100644
--- a/hwc/rgz_2d.c
+++ b/hwc/rgz_2d.c
@@ -136,7 +136,7 @@ static void svgout_rect(blit_rect_t *r, char *color, char *text)
static int empty_rect(blit_rect_t *r)
{
- return !((((r->left == r->top) == r->right) == r->bottom) == 0);
+ return !r->left && !r->top && !r->right && !r->bottom;
}
static int get_top_rect(blit_hregion_t *hregion, int subregion, blit_rect_t **routp)
@@ -1500,7 +1500,8 @@ static int rgz_out_region(rgz_t *rgz, rgz_out_params_t *params)
}
for (s = 0; s < hregion->nsubregions; s++) {
ALOGD_IF(debug, "h[%d] -> [%d]", i, s);
- rgz_hwc_subregion_blit(hregion, s, params);
+ if (rgz_hwc_subregion_blit(hregion, s, params))
+ return -1;
}
}