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.

This commit is contained in:
Carl Worth 2006-01-13 11:02:25 +00:00
parent b4e4568962
commit 6f3cb04d9c
2 changed files with 14 additions and 24 deletions

View file

@ -1,3 +1,13 @@
2006-01-13 Carl Worth <cworth@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.
2006-01-13 Carl Worth <cworth@cworth.org>
* src/cairo-win32-font.c: (_flush_glyphs): Eliminate cast of

View file

@ -163,19 +163,12 @@ _cairo_paginated_surface_acquire_source_image (void *abstract_surface,
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 @@ static void
_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 @@ _cairo_paginated_surface_snapshot (void *abstract_other)
#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;