mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-02 14:40:15 +01:00
[quartz] implementing release_source_image (#11059)
The image surface that _cairo_quartz_surface_acquire_source_image creates never seems to be released, probably because there is no release_source_image callback in the quartz code. The attached patch fixes that problem, at least insofar as the image surface itself is no longer leaking. I'm not sure whether any other cleanup needs to happen here. -Boris
This commit is contained in:
parent
2c8598aafb
commit
fcdfda8365
1 changed files with 10 additions and 1 deletions
|
|
@ -869,6 +869,15 @@ _cairo_quartz_surface_acquire_source_image (void *abstract_surface,
|
|||
return _cairo_quartz_get_image (surface, image_out, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_quartz_surface_release_source_image (void *abstract_surface,
|
||||
cairo_image_surface_t *image,
|
||||
void *image_extra)
|
||||
{
|
||||
cairo_surface_destroy ((cairo_surface_t *) image);
|
||||
}
|
||||
|
||||
|
||||
static cairo_status_t
|
||||
_cairo_quartz_surface_acquire_dest_image (void *abstract_surface,
|
||||
cairo_rectangle_int16_t *interest_rect,
|
||||
|
|
@ -1442,7 +1451,7 @@ static const struct _cairo_surface_backend cairo_quartz_surface_backend = {
|
|||
_cairo_quartz_surface_create_similar,
|
||||
_cairo_quartz_surface_finish,
|
||||
_cairo_quartz_surface_acquire_source_image,
|
||||
NULL, /* release_source_image */
|
||||
_cairo_quartz_surface_release_source_image,
|
||||
_cairo_quartz_surface_acquire_dest_image,
|
||||
_cairo_quartz_surface_release_dest_image,
|
||||
_cairo_quartz_surface_clone_similar,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue