From: Dana Jansens Date: Thu, 4 Sep 2003 06:23:57 +0000 (+0000) Subject: new scaling based on the Bresenham algorithm X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=4cbfe3eac0570679ae3a8e5c4df20e06d5418573;p=chaz%2Fopenbox new scaling based on the Bresenham algorithm --- diff --git a/render/image.h b/render/image.h index 5bf6ea55..639168d2 100644 --- a/render/image.h +++ b/render/image.h @@ -4,6 +4,8 @@ #include "render.h" #include "geom.h" -void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, RrRect *area); +void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba, + gint target_w, gint target_h, + RrRect *area); #endif diff --git a/render/render.c b/render/render.c index 2cfb70c7..95c5095b 100644 --- a/render/render.c +++ b/render/render.c @@ -109,7 +109,9 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h) case RR_TEXTURE_RGBA: g_assert(!transferred); RrImageDraw(a->surface.pixel_data, - &a->texture[i].data.rgba, &tarea); + &a->texture[i].data.rgba, + a->w, a->h, + &tarea); break; } } @@ -203,7 +205,6 @@ RrAppearance *RrAppearanceCopy(RrAppearance *orig) orig->textures * sizeof(RrTexture)); for (i = 0; i < copy->textures; ++i) if (copy->texture[i].type == RR_TEXTURE_RGBA) { - g_free(copy->texture[i].data.rgba.cache); copy->texture[i].data.rgba.cache = NULL; } copy->pixmap = None;