Eric Anholt <e...@anholt.net> writes: > Scissors provide a critical hint to tiled renderers as to what tiles > need to be load/stored because they could be modified by the > rendering. > > The bounds calculation here is limited to when we have a small number > of rects (large enough to cover rounded window corners, but probably > not xeyes) to avoid overhead on desktop GL.
Hrm. Often times, the rendering comes from a region which already has a bounds computed. I wonder if it would be useful to somehow wrap PaintWindow and capture the bounding rect from there? +static inline void +glamor_bounds_union_rect(BoxPtr bounds, xRectangle *rect) +{ + bounds->x1 = min(bounds->x1, rect->x); + bounds->y1 = min(bounds->y1, rect->y); + bounds->x2 = max(bounds->x2, rect->x + rect->width); + bounds->y2 = max(bounds->y2, rect->y + rect->height); +} You're in a world of pain here -- rect->width is an unsigned 16-bit value, bounds->x2 and rect->x are signed 16-bit values. Maybe something like: bounds->x2 = min(SHRT_MAX, max(bounds->x2, rect->x + rect->width)); bounds->y2 = min(SHRT_MAX, max(bounds->y2, rect->y + rect->height)); ? -- -keith
signature.asc
Description: PGP signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel