ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/background.C
(Generate patch)

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.207 by sf-exg, Thu May 10 21:48:55 2012 UTC vs.
Revision 1.208 by sf-exg, Fri May 11 08:16:58 2012 UTC

1287 /* apply table to input image (replacing colors by newly calculated ones) */ 1287 /* apply table to input image (replacing colors by newly calculated ones) */
1288 if (ximage->bits_per_pixel == 32 1288 if (ximage->bits_per_pixel == 32
1289 && (ximage->depth == 24 || ximage->depth == 32) 1289 && (ximage->depth == 24 || ximage->depth == 32)
1290 && ximage->byte_order == host_byte_order) 1290 && ximage->byte_order == host_byte_order)
1291 { 1291 {
1292 uint32_t *p1, *pf, *p, *pl; 1292 char *line = ximage->data;
1293 p1 = (uint32_t *) ximage->data;
1294 pf = (uint32_t *) (ximage->data + ximage->height * ximage->bytes_per_line);
1295 1293
1296 while (p1 < pf) 1294 for (int y = 0; y < ximage->height; y++)
1297 { 1295 {
1298 p = p1; 1296 uint32_t *p = (uint32_t *)line;
1299 pl = p1 + ximage->width; 1297 for (int x = 0; x < ximage->width; x++)
1300 for (; p < pl; p++)
1301 { 1298 {
1302 *p = lookup_r[(*p & 0xff0000) >> 16] | 1299 *p = lookup_r[(*p & 0xff0000) >> 16] |
1303 lookup_g[(*p & 0x00ff00) >> 8] | 1300 lookup_g[(*p & 0x00ff00) >> 8] |
1304 lookup_b[(*p & 0x0000ff)] | 1301 lookup_b[(*p & 0x0000ff)] |
1305 (*p & 0xff000000); 1302 (*p & 0xff000000);
1306 } 1303 p++;
1307 p1 = (uint32_t *) ((char *) p1 + ximage->bytes_per_line); 1304 }
1305 line += ximage->bytes_per_line;
1308 } 1306 }
1309 } 1307 }
1310 else 1308 else
1311 { 1309 {
1312 for (int y = 0; y < ximage->height; y++) 1310 for (int y = 0; y < ximage->height; y++)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines