diff options
Diffstat (limited to 'src/skia')
-rw-r--r-- | src/skia/cairo-skia-surface.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/skia/cairo-skia-surface.cpp b/src/skia/cairo-skia-surface.cpp index cc76cfb52..bb785e192 100644 --- a/src/skia/cairo-skia-surface.cpp +++ b/src/skia/cairo-skia-surface.cpp @@ -97,16 +97,7 @@ _cairo_skia_surface_map_to_image (void *asurface, cairo_skia_surface_t *surface = (cairo_skia_surface_t *) asurface; surface->bitmap->lockPixels (); - - /* XXX: Broken! */ - if (extents->width < surface->image.width || - extents->height < surface->image.height) - { - return _cairo_surface_create_for_rectangle_int (&surface->image.base, - extents); - } - - return cairo_surface_reference (&surface->image.base); + return _cairo_image_surface_map_to_image (&surface->image, extents); } static cairo_int_status_t @@ -114,9 +105,12 @@ _cairo_skia_surface_unmap_image (void *asurface, cairo_image_surface_t *image) { cairo_skia_surface_t *surface = (cairo_skia_surface_t *) asurface; + cairo_int_status_t status; + status = _cairo_image_surface_unmap_image (&surface->image, image); surface->bitmap->unlockPixels (); - return CAIRO_INT_STATUS_SUCCESS; + + return status; } static cairo_status_t |