mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-04 20:20:19 +01:00
Erradicate internal use of cairo_surface_get_content()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4b5d3436a3
commit
e23d179e08
5 changed files with 6 additions and 9 deletions
|
|
@ -2134,7 +2134,7 @@ _cairo_pdf_surface_add_padded_image_surface (cairo_pdf_surface_t *surfa
|
|||
_cairo_fixed_integer_floor(box.p2.y) > w ||
|
||||
_cairo_fixed_integer_floor(box.p2.y) > h)
|
||||
{
|
||||
pad_image = _cairo_image_surface_create_with_content (cairo_surface_get_content (&image->base),
|
||||
pad_image = _cairo_image_surface_create_with_content (image->base.content,
|
||||
rect.width,
|
||||
rect.height);
|
||||
if (pad_image->status) {
|
||||
|
|
@ -2345,7 +2345,7 @@ _cairo_pdf_surface_emit_image (cairo_pdf_surface_t *surface,
|
|||
cairo_surface_t *surf;
|
||||
cairo_surface_pattern_t pattern;
|
||||
|
||||
surf = _cairo_image_surface_create_with_content (cairo_surface_get_content (&image_surf->base),
|
||||
surf = _cairo_image_surface_create_with_content (image_surf->base.content,
|
||||
image_surf->width,
|
||||
image_surf->height);
|
||||
image = (cairo_image_surface_t *) surf;
|
||||
|
|
@ -2715,7 +2715,7 @@ _cairo_pdf_surface_emit_recording_surface (cairo_pdf_surface_t *surface,
|
|||
if (unlikely (status))
|
||||
goto err;
|
||||
|
||||
if (cairo_surface_get_content (source) == CAIRO_CONTENT_COLOR) {
|
||||
if (source->content == CAIRO_CONTENT_COLOR) {
|
||||
status = _cairo_pdf_surface_add_alpha (surface, 1.0, &alpha);
|
||||
if (unlikely (status))
|
||||
goto err;
|
||||
|
|
@ -6124,8 +6124,7 @@ _surface_pattern_supported (cairo_surface_pattern_t *pattern)
|
|||
* don't think it's worth the extra code to support it. */
|
||||
|
||||
/* XXX: Need to write this function here...
|
||||
content = cairo_surface_get_content (pattern->surface);
|
||||
if (content == CAIRO_CONTENT_ALPHA)
|
||||
if (pattern->surface->content == CAIRO_CONTENT_ALPHA)
|
||||
return FALSE;
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -2407,7 +2407,7 @@ _cairo_ps_surface_emit_image (cairo_ps_surface_t *surface,
|
|||
cairo_surface_t *surf;
|
||||
cairo_surface_pattern_t pattern;
|
||||
|
||||
surf = _cairo_image_surface_create_with_content (cairo_surface_get_content (&image_surf->base),
|
||||
surf = _cairo_image_surface_create_with_content (image_surf->base.content,
|
||||
image_surf->width,
|
||||
image_surf->height);
|
||||
image = (cairo_image_surface_t *) surf;
|
||||
|
|
|
|||
|
|
@ -238,7 +238,6 @@ cairo_surface_get_content (cairo_surface_t *surface)
|
|||
{
|
||||
return surface->content;
|
||||
}
|
||||
slim_hidden_def(cairo_surface_get_content);
|
||||
|
||||
/**
|
||||
* cairo_surface_status:
|
||||
|
|
|
|||
|
|
@ -2393,7 +2393,7 @@ _cairo_svg_surface_mask (void *abstract_surface,
|
|||
|
||||
if (mask->type == CAIRO_PATTERN_TYPE_SURFACE) {
|
||||
const cairo_surface_pattern_t *surface_pattern = (const cairo_surface_pattern_t*) mask;
|
||||
cairo_content_t content = cairo_surface_get_content (surface_pattern->surface);
|
||||
cairo_content_t content = surface_pattern->surface->content;
|
||||
if (content == CAIRO_CONTENT_ALPHA)
|
||||
discard_filter = TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1913,7 +1913,6 @@ slim_hidden_proto (cairo_surface_create_similar_image);
|
|||
slim_hidden_proto (cairo_surface_destroy);
|
||||
slim_hidden_proto (cairo_surface_finish);
|
||||
slim_hidden_proto (cairo_surface_flush);
|
||||
slim_hidden_proto (cairo_surface_get_content);
|
||||
slim_hidden_proto (cairo_surface_get_device_offset);
|
||||
slim_hidden_proto (cairo_surface_get_font_options);
|
||||
slim_hidden_proto (cairo_surface_get_mime_data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue