From 599030c8fe3b60e9b23d6dab5e62122c8331ef6f Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Wed, 18 Dec 2013 15:39:37 -0800 Subject: Make destructors called explicitly rather than through callbacks While Cairo has callback support for the destructor, there's not an analogous way to do this with Skia, so instead of trying to be clever let's just build explicit destruction in. --- src/skia-image.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/skia-image.cpp') diff --git a/src/skia-image.cpp b/src/skia-image.cpp index d2fbf33..da0dbc9 100644 --- a/src/skia-image.cpp +++ b/src/skia-image.cpp @@ -2,6 +2,10 @@ #include #include +#include "image.h" + +static image_state_t *state; + SkBaseDevice * create_skia_device_image (int width, int height) { @@ -11,3 +15,9 @@ create_skia_device_image (int width, int height) skia_bitmap.allocPixels(); return new SkBitmapDevice (skia_bitmap); } + +void +destroy_skia_image(void) +{ + cleanup_state_image(state); +} -- cgit v1.3.1-4-g156e