fix rendering argb textures on solid backgrounds
This commit is contained in:
parent
4c7119f94f
commit
599b63e471
1 changed files with 6 additions and 2 deletions
|
@ -40,7 +40,7 @@ static void pixel_data_to_pixmap(RrAppearance *l,
|
||||||
|
|
||||||
Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
|
Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
|
||||||
{
|
{
|
||||||
gint i, transferred = 0, sw, sh, partial_w, partial_h;
|
gint i, transferred = 0, sw, sh, partial_w, partial_h, force_transfer = 0;
|
||||||
RrPixel32 *source, *dest;
|
RrPixel32 *source, *dest;
|
||||||
Pixmap oldp = None;
|
Pixmap oldp = None;
|
||||||
RrRect tarea; /* area in which to draw textures */
|
RrRect tarea; /* area in which to draw textures */
|
||||||
|
@ -160,14 +160,18 @@ Pixmap RrPaintPixmap(RrAppearance *a, gint w, gint h)
|
||||||
&a->texture[i].data.rgba,
|
&a->texture[i].data.rgba,
|
||||||
a->w, a->h,
|
a->w, a->h,
|
||||||
&tarea);
|
&tarea);
|
||||||
|
force_transfer = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!transferred) {
|
if (!transferred) {
|
||||||
transferred = 1;
|
transferred = 1;
|
||||||
if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced))
|
if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced) ||
|
||||||
|
force_transfer)
|
||||||
|
{
|
||||||
pixel_data_to_pixmap(a, 0, 0, w, h);
|
pixel_data_to_pixmap(a, 0, 0, w, h);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return oldp;
|
return oldp;
|
||||||
|
|
Loading…
Reference in a new issue