recording: remove the duplicate 'content' field

Just use the member in the base class.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-08-13 21:15:39 +01:00
parent 4a990925e9
commit 9f6428c517
5 changed files with 7 additions and 11 deletions

View file

@ -124,8 +124,6 @@ typedef union _cairo_command {
typedef struct _cairo_recording_surface {
cairo_surface_t base;
cairo_content_t content;
/* A recording-surface is logically unbounded, but when used as a
* source we need to render it to an image, so we need a size at
* which to create that image. */

View file

@ -388,7 +388,6 @@ cairo_recording_surface_create (cairo_content_t content,
NULL, /* device */
content);
surface->content = content;
surface->unbounded = TRUE;
@ -507,7 +506,7 @@ _cairo_recording_surface_acquire_source_image_transformed (void *abstract_s
width = surface->extents.width * device_transform->xx;
height = surface->extents.height * device_transform->yy;
image = _cairo_image_surface_create_with_content (surface->content,
image = _cairo_image_surface_create_with_content (surface->base.content,
width, height);
if (unlikely (image->status))
return image->status;
@ -1019,7 +1018,6 @@ _cairo_recording_surface_snapshot (void *abstract_other)
surface->extents_pixels = other->extents_pixels;
surface->extents = other->extents;
surface->unbounded = other->unbounded;
surface->content = other->content;
surface->base.is_clear = TRUE;
@ -1471,7 +1469,7 @@ _recording_surface_get_ink_bbox (cairo_recording_surface_t *surface,
cairo_surface_t *analysis_surface;
cairo_status_t status;
null_surface = _cairo_null_surface_create (surface->content);
null_surface = _cairo_null_surface_create (surface->base.content);
analysis_surface = _cairo_analysis_surface_create (null_surface);
cairo_surface_destroy (null_surface);

View file

@ -1049,7 +1049,7 @@ _emit_recording_surface_pattern (cairo_script_surface_t *surface,
extents = &r;
similar = _cairo_script_surface_create_internal (to_context (surface),
source->content,
source->base.content,
extents,
NULL);
if (unlikely (similar->base.status))
@ -1059,7 +1059,7 @@ _emit_recording_surface_pattern (cairo_script_surface_t *surface,
_cairo_output_stream_printf (to_context (surface)->stream,
"//%s ",
_content_to_string (source->content));
_content_to_string (source->base.content));
if (extents) {
_cairo_output_stream_printf (to_context (surface)->stream,
"[%f %f %f %f]",

View file

@ -341,7 +341,7 @@ _cairo_surface_subsurface_acquire_source_image (void *abstrac
&_cairo_image_surface_backend))
{
image = (cairo_image_surface_t *)
_cairo_image_surface_create_with_content (meta->content,
_cairo_image_surface_create_with_content (meta->base.content,
surface->extents.width,
surface->extents.height);
if (unlikely (image->base.status))

View file

@ -1388,7 +1388,7 @@ _cairo_svg_surface_emit_recording_surface (cairo_svg_document_t *document,
}
paginated_surface = _cairo_svg_surface_create_for_document (document,
source->content,
source->base.content,
source->extents_pixels.width,
source->extents_pixels.height);
if (unlikely (paginated_surface->status))
@ -1427,7 +1427,7 @@ _cairo_svg_surface_emit_recording_surface (cairo_svg_document_t *document,
svg_surface->height);
}
if (source->content == CAIRO_CONTENT_ALPHA) {
if (source->base.content == CAIRO_CONTENT_ALPHA) {
_cairo_svg_surface_emit_alpha_filter (document);
_cairo_output_stream_printf (document->xml_node_defs,
"<g id=\"surface%d\" "