diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-22 09:09:23 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-02-22 09:09:23 +0100 |
commit | ea9270851a237aaa74c7b2fc5f62e6512367bc3d (patch) | |
tree | 291e10ce84e02f8eaaeb0e47db8950164a20eb59 /fb-gui.c | |
parent | 11ae121e89f401177c6a737652e260039ab38c40 (diff) | |
download | fbida-ea9270851a237aaa74c7b2fc5f62e6512367bc3d.tar.gz |
fix cairo shadow clear
Diffstat (limited to 'fb-gui.c')
-rw-r--r-- | fb-gui.c | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -110,19 +110,14 @@ void shadow_render(gfxstate *gfx) void shadow_clear_lines(int first, int last) { -#if 0 - /* FIXME: segfaults */ + int i; + cairo_rectangle(context, 0, first, swidth, last - first + 1); cairo_set_source_rgb(context, 0, 0, 0); cairo_fill(context); -#else - int i; - for (i = first; i <= last; i++) { - memset(shadow[i],0,4*swidth); + for (i = first; i <= last; i++) sdirty[i]++; - } -#endif } void shadow_clear(void) @@ -158,7 +153,6 @@ void shadow_init(gfxstate *gfx) framebuffer = malloc(swidth*sheight*4); for (i = 0; i < sheight; i++) shadow[i] = framebuffer + i*swidth*4; - shadow_clear(); surface = cairo_image_surface_create_for_data(framebuffer, CAIRO_FORMAT_RGB24, swidth, sheight, @@ -166,7 +160,7 @@ void shadow_init(gfxstate *gfx) context = cairo_create(surface); pixman = pixman_image_create_bits(PIXMAN_x8r8g8b8, swidth, sheight, (void*)framebuffer, swidth * 4); - + shadow_clear(); /* init rendering */ switch (gfx->bits_per_pixel) { |