summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Lofthouse <a0741364@ti.com>2012-07-26 13:49:25 -0500
committerJason Simmons <jsimmons@google.com>2012-10-22 15:40:28 -0700
commit362d76501749eaa6221ebbb63fcf58542449a391 (patch)
tree14ae609dc6ca6e56fe560f2bb27744e29e7e0390
parent90b0b5624e863d01c6a6bdc736546745db6a4c8f (diff)
downloadomap4-aah-362d76501749eaa6221ebbb63fcf58542449a391.tar.gz
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> (cherry picked from commit 7863b0c86de6bae53e2afb4294b32f2f9840f2b8)
-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;
}
}