forked from enlightenment/efl
Restrict rectangles to be inside the screen at evas_tiler
SVN revision: 30274
This commit is contained in:
parent
5a12b590ac
commit
b5c8891349
|
@ -1115,24 +1115,32 @@ evas_common_tilebuf_get_render_rects(Tilebuf *tb)
|
|||
|
||||
for (n = tb->rects.head; n != NULL; n = n->next) {
|
||||
rect_t cur;
|
||||
Tilebuf_Rect *r;
|
||||
|
||||
cur = ((rect_node_t *)n)->rect;
|
||||
|
||||
cur.left <<= 1;
|
||||
cur.top <<= 1;
|
||||
cur.width <<= 1;
|
||||
cur.height <<= 1;
|
||||
|
||||
RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height,
|
||||
0, 0, tb->outbuf_w, tb->outbuf_h);
|
||||
if ((cur.width > 0) && (cur.height > 0))
|
||||
{
|
||||
Tilebuf_Rect *r;
|
||||
|
||||
r = malloc(sizeof(Tilebuf_Rect));
|
||||
r->_list_data.next = NULL;
|
||||
r->_list_data.prev = NULL;
|
||||
r->_list_data.last = NULL;
|
||||
r->x = cur.left << 1;
|
||||
r->y = cur.top << 1;
|
||||
r->w = cur.width << 1;
|
||||
r->h = cur.height << 1;
|
||||
|
||||
/* fprintf(stderr, "\tclear: %4d,%4d %3dx%3d\n", */
|
||||
/* r->x, r->y, r->w, r->h); */
|
||||
r->x = cur.left;
|
||||
r->y = cur.top;
|
||||
r->w = cur.width;
|
||||
r->h = cur.height;
|
||||
|
||||
rects = evas_object_list_append(rects, r);
|
||||
}
|
||||
}
|
||||
return rects;
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue