mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-08 11:28:02 +02:00
debug: Add some TRACE statements for recording surfaces and snapshots
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
6b5199645a
commit
8028f04a91
3 changed files with 24 additions and 0 deletions
|
|
@ -688,6 +688,8 @@ _cairo_recording_surface_paint (void *abstract_surface,
|
|||
cairo_command_paint_t *command;
|
||||
cairo_composite_rectangles_t composite;
|
||||
|
||||
TRACE ((stderr, "%s: surface=%d\n", __FUNCTION__, surface->base.unique_id));
|
||||
|
||||
if (op == CAIRO_OPERATOR_CLEAR && clip == NULL) {
|
||||
if (surface->optimize_clears) {
|
||||
_cairo_recording_surface_reset (surface);
|
||||
|
|
@ -758,6 +760,8 @@ _cairo_recording_surface_mask (void *abstract_surface,
|
|||
cairo_command_mask_t *command;
|
||||
cairo_composite_rectangles_t composite;
|
||||
|
||||
TRACE ((stderr, "%s: surface=%d\n", __FUNCTION__, surface->base.unique_id));
|
||||
|
||||
status = _cairo_composite_rectangles_init_for_mask (&composite,
|
||||
&surface->base,
|
||||
op, source, mask,
|
||||
|
|
@ -823,6 +827,8 @@ _cairo_recording_surface_stroke (void *abstract_surface,
|
|||
cairo_command_stroke_t *command;
|
||||
cairo_composite_rectangles_t composite;
|
||||
|
||||
TRACE ((stderr, "%s: surface=%d\n", __FUNCTION__, surface->base.unique_id));
|
||||
|
||||
status = _cairo_composite_rectangles_init_for_stroke (&composite,
|
||||
&surface->base,
|
||||
op, source,
|
||||
|
|
@ -898,6 +904,8 @@ _cairo_recording_surface_fill (void *abstract_surface,
|
|||
cairo_command_fill_t *command;
|
||||
cairo_composite_rectangles_t composite;
|
||||
|
||||
TRACE ((stderr, "%s: surface=%d\n", __FUNCTION__, surface->base.unique_id));
|
||||
|
||||
status = _cairo_composite_rectangles_init_for_fill (&composite,
|
||||
&surface->base,
|
||||
op, source, path,
|
||||
|
|
@ -975,6 +983,8 @@ _cairo_recording_surface_show_text_glyphs (void *abstract_surface,
|
|||
cairo_command_show_text_glyphs_t *command;
|
||||
cairo_composite_rectangles_t composite;
|
||||
|
||||
TRACE ((stderr, "%s: surface=%d\n", __FUNCTION__, surface->base.unique_id));
|
||||
|
||||
status = _cairo_composite_rectangles_init_for_glyphs (&composite,
|
||||
&surface->base,
|
||||
op, source,
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ _cairo_surface_snapshot_finish (void *abstract_surface)
|
|||
cairo_surface_snapshot_t *surface = abstract_surface;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
|
||||
TRACE ((stderr, "%s\n", __FUNCTION__));
|
||||
|
||||
if (surface->clone != NULL) {
|
||||
cairo_surface_finish (surface->clone);
|
||||
status = surface->clone->status;
|
||||
|
|
@ -138,6 +140,9 @@ _cairo_surface_snapshot_copy_on_write (cairo_surface_t *surface)
|
|||
void *extra;
|
||||
cairo_status_t status;
|
||||
|
||||
TRACE ((stderr, "%s: target=%d\n",
|
||||
__FUNCTION__, snapshot->target->unique_id));
|
||||
|
||||
/* We need to make an image copy of the original surface since the
|
||||
* snapshot may exceed the lifetime of the original device, i.e.
|
||||
* when we later need to use the snapshot the data may have already
|
||||
|
|
@ -196,6 +201,8 @@ _cairo_surface_snapshot (cairo_surface_t *surface)
|
|||
cairo_surface_snapshot_t *snapshot;
|
||||
cairo_status_t status;
|
||||
|
||||
TRACE ((stderr, "%s: target=%d\n", __FUNCTION__, surface->unique_id));
|
||||
|
||||
if (unlikely (surface->status))
|
||||
return _cairo_surface_create_in_error (surface->status);
|
||||
|
||||
|
|
|
|||
|
|
@ -357,6 +357,8 @@ _cairo_surface_subsurface_snapshot (void *abstract_surface)
|
|||
cairo_surface_t *clone;
|
||||
cairo_status_t status;
|
||||
|
||||
TRACE ((stderr, "%s: target=%d\n", __FUNCTION__, surface->target->unique_id));
|
||||
|
||||
clone = _cairo_surface_create_similar_scratch (surface->target,
|
||||
surface->target->content,
|
||||
surface->extents.width,
|
||||
|
|
@ -541,6 +543,8 @@ _cairo_surface_subsurface_detach_snapshot (cairo_surface_t *surface)
|
|||
{
|
||||
cairo_surface_subsurface_t *ss = (cairo_surface_subsurface_t *) surface;
|
||||
|
||||
TRACE ((stderr, "%s: target=%d\n", __FUNCTION__, ss->target->unique_id));
|
||||
|
||||
cairo_surface_destroy (ss->snapshot);
|
||||
ss->snapshot = NULL;
|
||||
}
|
||||
|
|
@ -551,6 +555,9 @@ _cairo_surface_subsurface_set_snapshot (cairo_surface_t *surface,
|
|||
{
|
||||
cairo_surface_subsurface_t *ss = (cairo_surface_subsurface_t *) surface;
|
||||
|
||||
TRACE ((stderr, "%s: target=%d, snapshot=%d\n", __FUNCTION__,
|
||||
ss->target->unique_id, snapshot->unique_id));
|
||||
|
||||
if (ss->snapshot)
|
||||
_cairo_surface_detach_snapshot (ss->snapshot);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue