[cairo] [PATCH] don't wipe out quartz data with memset
joshmoz at gmail.com
Wed Sep 14 01:48:20 PDT 2005
Right now, the quartz backend draws into a buffer and dumps that buffer
down the CGContextRef pipe when it is ready (release_dest_image).
Problem is, right now we memset that whole buffer to zero after dumping
it each time. Thus, if you use an operator like
CAIRO_OPERATOR_DEST_OVER, it won't be aware of any existing dest data.
Here is a patch that drops the memset, and makes quartz drawing much
For the record, I'm not endorsing the way things are done now by fixing
it. I'm just saying this fixes our current totally wrong rendering. I'm
working on a better way to organize the quartz backend.
-------------- next part --------------
RCS file: /cvs/cairo/cairo/src/cairo-quartz-surface.c,v
retrieving revision 1.20
diff -u -r1.20 cairo-quartz-surface.c
--- src/cairo-quartz-surface.c 18 Aug 2005 21:34:10 -0000 1.20
+++ src/cairo-quartz-surface.c 14 Sep 2005 08:36:49 -0000
@@ -175,8 +175,6 @@
rect = CGRectMake(0, 0, surface->width, surface->height);
CGContextDrawImage(surface->context, rect, surface->cgImage);
- memset(surface->image->data, 0, surface->width * surface->height * 4);
More information about the cairo