mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-09 03:48:03 +02:00
Reviewed by keithp
Change the paginated surface to force all output to come from an image surface (to be refined incrementally as we hook real surface backends up to it).
This commit is contained in:
parent
fbb8a62797
commit
7ce7b20a82
2 changed files with 32 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
|||
2006-01-06 Carl Worth <cworth@cworth.org>
|
||||
|
||||
Reviewed by keithp
|
||||
|
||||
* src/cairo-paginated-surface.c: (_paint_page),
|
||||
(_cairo_paginated_surface_copy_page),
|
||||
(_cairo_paginated_surface_show_page): Change the paginated surface
|
||||
to force all output to come from an image surface (to be refined
|
||||
incrementally as we hook real surface backends up to it).
|
||||
|
||||
2006-01-06 Carl Worth <cworth@cworth.org>
|
||||
|
||||
Reviewed by keithp
|
||||
|
|
|
|||
|
|
@ -168,13 +168,33 @@ _cairo_paginated_surface_release_source_image (void *abstract_surface,
|
|||
cairo_surface_destroy (&image->base);
|
||||
}
|
||||
|
||||
static void
|
||||
_paint_page (cairo_paginated_surface_t *surface)
|
||||
{
|
||||
cairo_surface_t *image;
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
image = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
|
||||
surface->width, surface->height);
|
||||
|
||||
_cairo_meta_surface_replay (surface->meta, image);
|
||||
|
||||
pattern = cairo_pattern_create_for_surface (image);
|
||||
|
||||
_cairo_surface_paint (surface->target, CAIRO_OPERATOR_SOURCE, pattern);
|
||||
|
||||
cairo_pattern_destroy (pattern);
|
||||
|
||||
cairo_surface_destroy (image);
|
||||
}
|
||||
|
||||
static cairo_int_status_t
|
||||
_cairo_paginated_surface_copy_page (void *abstract_surface)
|
||||
{
|
||||
cairo_paginated_surface_t *surface = abstract_surface;
|
||||
cairo_int_status_t status;
|
||||
|
||||
_cairo_meta_surface_replay (surface->meta, surface->target);
|
||||
_paint_page (surface);
|
||||
|
||||
status = _cairo_surface_copy_page (surface->target);
|
||||
|
||||
|
|
@ -206,7 +226,7 @@ _cairo_paginated_surface_show_page (void *abstract_surface)
|
|||
{
|
||||
cairo_paginated_surface_t *surface = abstract_surface;
|
||||
|
||||
_cairo_meta_surface_replay (surface->meta, surface->target);
|
||||
_paint_page (surface);
|
||||
|
||||
_cairo_surface_show_page (surface->target);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue