mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-04 09:50:20 +01:00
trace: Add breadcrumb for cairo_image_surface_get_data()
Just emit a marker for when cairo_image_surface_get_data() is called on a surface so that we have a breadcrumb for when the pixels are first exported. (Though note that pointer may be kept around and used much later.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
efb2018309
commit
f5b5fad66e
1 changed files with 22 additions and 0 deletions
|
|
@ -3510,6 +3510,24 @@ cairo_image_surface_create_for_data (unsigned char *data, cairo_format_t format,
|
|||
return ret;
|
||||
}
|
||||
|
||||
unsigned char *
|
||||
cairo_image_surface_get_data (cairo_surface_t *surface)
|
||||
{
|
||||
unsigned char *ptr;
|
||||
|
||||
/* Just leave some breadcrumbs */
|
||||
_enter_trace ();
|
||||
_emit_line_info ();
|
||||
if (surface != NULL && _write_lock ()) {
|
||||
_trace_printf ("%% s%ld get-data\n", _get_surface_id (surface));
|
||||
_write_unlock ();
|
||||
}
|
||||
ptr = DLCALL (cairo_image_surface_get_data, surface);
|
||||
_exit_trace ();
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
cairo_pattern_t *
|
||||
cairo_pattern_create_raster_source (void *data, cairo_content_t content, int width, int height)
|
||||
{
|
||||
|
|
@ -3746,6 +3764,10 @@ cairo_surface_flush (cairo_surface_t *surface)
|
|||
{
|
||||
_enter_trace ();
|
||||
_emit_line_info ();
|
||||
if (surface != NULL && _write_lock ()) {
|
||||
_trace_printf ("%% s%ld flush\n", _get_surface_id (surface));
|
||||
_write_unlock ();
|
||||
}
|
||||
DLCALL (cairo_surface_flush, surface);
|
||||
_exit_trace ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue