summaryrefslogtreecommitdiff
path: root/surface.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-11-20 21:51:55 -0800
committerAaron Plattner <aplattner@nvidia.com>2009-11-20 21:51:55 -0800
commit643aae2d650e8b1102130e79e763b479b15fca53 (patch)
treeaeae8ed3b0d130ebde26d7fa77d25e78ba56659f /surface.c
parenta3a1c41a28915ecf81567f35a27040fd7275b9c5 (diff)
Add a CA mask test
Diffstat (limited to 'surface.c')
-rw-r--r--surface.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/surface.c b/surface.c
index aee4771..6f071c1 100644
--- a/surface.c
+++ b/surface.c
@@ -4,12 +4,13 @@
#include <stdio.h>
XRenderSurf *
-xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h)
+xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h, Bool ca)
{
XRenderSurf *rs;
XRenderPictFormat *fmt;
- XRenderPictureAttributes att;
-
+ XRenderPictureAttributes att = {
+ .component_alpha = ca,
+ };
Visual *vis = DefaultVisual(disp, DefaultScreen(disp));
@@ -22,7 +23,7 @@ xrender_surf_new(Display *disp, Drawable draw, int format, int w, int h)
rs->vis = vis;
rs->draw = XCreatePixmap(disp, draw, w, h, fmt->depth);
rs->pic = XRenderCreatePicture(disp, rs->draw, fmt,
- 0, &att);
+ CPComponentAlpha, &att);
rs->allocated = 1;
return rs;
}