[cairo-commit] cairo/src cairo-paginated-surface.c,1.8,1.9

Carl Worth commit at pdx.freedesktop.org
Fri Jan 13 11:02:29 PST 2006


Committed by: cworth

Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv24212/src

Modified Files:
	cairo-paginated-surface.c 
Log Message:

2006-01-13  Carl Worth  <cworth at cworth.org>

        * src/cairo-paginated-surface.c:
        (_cairo_paginated_surface_acquire_source_image), (_paint_page),
        (_cairo_paginated_surface_snapshot): Rip out the misguided
        paint-with-white and RGB24 surface code and go back to using
        ARGB32. It turns out that the PS backend already has its own
        blend-with-white code, and the test-paginated-surface really wants
        ARGB32.


Index: cairo-paginated-surface.c
===================================================================
RCS file: /cvs/cairo/cairo/src/cairo-paginated-surface.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- cairo-paginated-surface.c	13 Jan 2006 00:47:06 -0000	1.8
+++ cairo-paginated-surface.c	13 Jan 2006 19:02:25 -0000	1.9
@@ -163,19 +163,12 @@
     cairo_paginated_surface_t *surface = abstract_surface;
     cairo_surface_t *image;
     cairo_rectangle_t extents;
-    cairo_pattern_t *white;
 
     _cairo_surface_get_extents (surface->target, &extents);
 
-    image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+    image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
 					extents.width, extents.height);
     
-    white = _cairo_pattern_create_solid (_cairo_stock_color (CAIRO_STOCK_WHITE));
-
-    _cairo_surface_paint (image, CAIRO_OPERATOR_SOURCE, white);
-
-    cairo_pattern_destroy (white);
-
     _cairo_meta_surface_replay (surface->meta, image);
 
     *image_out = (cairo_image_surface_t*) image;
@@ -196,17 +189,11 @@
 _paint_page (cairo_paginated_surface_t *surface)
 {
     cairo_surface_t *image;
-    cairo_pattern_t *white, *pattern;
+    cairo_pattern_t *pattern;
 
-    image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+    image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
 					surface->width, surface->height);
 
-    white = _cairo_pattern_create_solid (_cairo_stock_color (CAIRO_STOCK_WHITE));
-
-    _cairo_surface_paint (image, CAIRO_OPERATOR_SOURCE, white);
-
-    cairo_pattern_destroy (white);
-
     _cairo_meta_surface_replay (surface->meta, image);
 
     pattern = cairo_pattern_create_for_surface (image);
@@ -372,20 +359,13 @@
 #else
     cairo_rectangle_t extents;
     cairo_surface_t *surface;
-    cairo_pattern_t *white;
 
     _cairo_surface_get_extents (other->target, &extents);
 
-    surface = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
+    surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
 					  extents.width,
 					  extents.height);
 
-    white = _cairo_pattern_create_solid (_cairo_stock_color (CAIRO_STOCK_WHITE));
-
-    _cairo_surface_paint (surface, CAIRO_OPERATOR_SOURCE, white);
-
-    cairo_pattern_destroy (white);
-
     _cairo_meta_surface_replay (other->meta, surface);
 
     return surface;



More information about the cairo-commit mailing list