diff options
author | Eric Anholt <anholt@freebsd.org> | 2004-06-13 19:52:06 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2004-06-13 19:52:06 +0000 |
commit | 783ba8d4314ca1412e3f806cd07bfd52fb8dfc5b (patch) | |
tree | 2f7f70f0dca016a892a15ccc00d52b268a6cfeff /main.c | |
parent | 3ee9ea7cda8fe71abc77151e1a94b4dfc06767b8 (diff) |
Exercise XAA's Composite acceleration by also rendering
directly to the destination window instead of only pixmaps.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -110,7 +110,6 @@ int main(int argc, char **argv) int i, maj, min; XWindowAttributes a; picture_info window; - char window_desc[20]; dpy = XOpenDisplay(0); @@ -137,11 +136,15 @@ int main(int argc, char **argv) window.format = XRenderFindVisualFormat(dpy, a.visual); window.pict = XRenderCreatePicture(dpy, window.d, window.format, 0, 0); + window.name = (char *)malloc(20); + if (window.name == NULL) + errx(1, "malloc error"); + describe_format(window.name, 20, window.format); + printf("Window format: %s\n", window.name); + strncat(window.name, " window", 20); XSelectInput(dpy, window.d, ExposureMask); XMapWindow(dpy, window.d); - describe_format(window_desc, 20, window.format); - printf("Window format: %s\n", window_desc); /* We have to premultiply the alpha into the r, g, b values of the * sample colors. Render colors are premultiplied with alpha, so r,g,b |