mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 04:08:13 +02:00
Remove dummy create_similar in PS/PDF and let fallback do the same
which is simply creating an image surface.
This commit is contained in:
parent
88675958ef
commit
a8a0082c53
2 changed files with 2 additions and 28 deletions
|
|
@ -453,19 +453,6 @@ _cairo_pdf_surface_clear (cairo_pdf_surface_t *surface)
|
|||
_cairo_array_truncate (&surface->streams, 0);
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
_cairo_pdf_surface_create_similar (void *abstract_src,
|
||||
cairo_content_t content,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
cairo_format_t format = _cairo_format_from_content (content);
|
||||
|
||||
/* Just return an image for now, until PDF surface can be used
|
||||
* as source. */
|
||||
return cairo_image_surface_create (format, width, height);
|
||||
}
|
||||
|
||||
static cairo_pdf_resource_t
|
||||
_cairo_pdf_surface_open_stream (cairo_pdf_surface_t *surface,
|
||||
const char *fmt,
|
||||
|
|
@ -2638,7 +2625,7 @@ _cairo_pdf_surface_set_paginated_mode (void *abstract_surface,
|
|||
|
||||
static const cairo_surface_backend_t cairo_pdf_surface_backend = {
|
||||
CAIRO_SURFACE_TYPE_PDF,
|
||||
_cairo_pdf_surface_create_similar,
|
||||
NULL, /* create_similar */
|
||||
_cairo_pdf_surface_finish,
|
||||
NULL, /* acquire_source_image */
|
||||
NULL, /* release_source_image */
|
||||
|
|
|
|||
|
|
@ -1126,19 +1126,6 @@ cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface)
|
|||
}
|
||||
}
|
||||
|
||||
static cairo_surface_t *
|
||||
_cairo_ps_surface_create_similar (void *abstract_src,
|
||||
cairo_content_t content,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
cairo_format_t format = _cairo_format_from_content (content);
|
||||
|
||||
/* Just return an image for now, until PS surface can be used
|
||||
* as source. */
|
||||
return cairo_image_surface_create (format, width, height);
|
||||
}
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_ps_surface_finish (void *abstract_surface)
|
||||
{
|
||||
|
|
@ -2113,7 +2100,7 @@ _cairo_ps_surface_set_paginated_mode (void *abstract_surface,
|
|||
|
||||
static const cairo_surface_backend_t cairo_ps_surface_backend = {
|
||||
CAIRO_SURFACE_TYPE_PS,
|
||||
_cairo_ps_surface_create_similar,
|
||||
NULL, /* create_similar */
|
||||
_cairo_ps_surface_finish,
|
||||
NULL, /* acquire_source_image */
|
||||
NULL, /* release_source_image */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue