mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-11-02 09:01:39 -05:00
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.
This commit is contained in:
parent
b0a167cdc9
commit
5fc96ff6e2
1 changed files with 2 additions and 4 deletions
|
|
@ -33,7 +33,6 @@
|
||||||
void
|
void
|
||||||
blur_surface(cairo_surface_t *surface, int margin)
|
blur_surface(cairo_surface_t *surface, int margin)
|
||||||
{
|
{
|
||||||
cairo_surface_t *tmp;
|
|
||||||
int32_t width, height, stride, x, y, z, w;
|
int32_t width, height, stride, x, y, z, w;
|
||||||
uint8_t *src, *dst;
|
uint8_t *src, *dst;
|
||||||
uint32_t *s, *d, a, p;
|
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);
|
stride = cairo_image_surface_get_stride(surface);
|
||||||
src = cairo_image_surface_get_data(surface);
|
src = cairo_image_surface_get_data(surface);
|
||||||
|
|
||||||
tmp = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
|
dst = malloc(height * stride);
|
||||||
dst = cairo_image_surface_get_data(tmp);
|
|
||||||
|
|
||||||
half = size / 2;
|
half = size / 2;
|
||||||
a = 0;
|
a = 0;
|
||||||
|
|
@ -113,5 +111,5 @@ blur_surface(cairo_surface_t *surface, int margin)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cairo_surface_destroy(tmp);
|
free(dst);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue