summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2009-09-12 15:58:48 -0400
committerKristian Høgsberg <krh@redhat.com>2009-09-12 15:58:48 -0400
commit5fc96ff6e2e23bc6fab267392ead0594ccf88044 (patch)
tree990853d0a320e4a7c9d24168d59893ece4c007e4
parentb0a167cdc98b94951ba82e2b6649fc74b69d35cb (diff)
downloadwayland-5fc96ff6e2e23bc6fab267392ead0594ccf88044.tar.gz
wayland-5fc96ff6e2e23bc6fab267392ead0594ccf88044.tar.xz
wayland-5fc96ff6e2e23bc6fab267392ead0594ccf88044.zip
Dont use an image surface for the tmp
It may have a incompatible stride and there's no point in using a cairo surface for this.
-rw-r--r--cairo-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/cairo-util.c b/cairo-util.c
index 0dfa3ad..1a27046 100644
--- a/cairo-util.c
+++ b/cairo-util.c
@@ -33,7 +33,6 @@
void
blur_surface(cairo_surface_t *surface, int margin)
{
- cairo_surface_t *tmp;
int32_t width, height, stride, x, y, z, w;
uint8_t *src, *dst;
uint32_t *s, *d, a, p;
@@ -47,8 +46,7 @@ blur_surface(cairo_surface_t *surface, int margin)
stride = cairo_image_surface_get_stride(surface);
src = cairo_image_surface_get_data(surface);
- tmp = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
- dst = cairo_image_surface_get_data(tmp);
+ dst = malloc(height * stride);
half = size / 2;
a = 0;
@@ -113,5 +111,5 @@ blur_surface(cairo_surface_t *surface, int margin)
}
}
- cairo_surface_destroy(tmp);
+ free(dst);
}