boilerplate: Offset the xlib window

An idea courtesy of Benjamin Otte is to stress the drivers a bit more by
not rendering to 0,0. Under various circumstances rendering to a Window
is mapped onto the Screen root Window with a collection of offsets and
clips by X. It is easy for the driver to make a mistake and misrender...
This commit is contained in:
Chris Wilson 2010-07-17 10:09:14 +01:00
parent 51b0c21f02
commit bac5c28a18

View file

@ -302,11 +302,11 @@ _cairo_boilerplate_xlib_window_create_surface (const char *name,
/* tile the windows so threads do not overlap */
scr = XScreenOfDisplay (dpy, screen);
x = y = 0;
x = 10; y = 15;
if (id-- > 1) do {
x += max_width;
if (x + max_width > WidthOfScreen (scr)) {
x = 0;
x = 10;
y += max_height;
if (y + max_height > HeightOfScreen (scr)) {
XCloseDisplay (dpy);