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.140 by sf-exg, Sun Jan 23 12:28:47 2011 UTC vs.
Revision 1.141 by sf-exg, Sun Jan 23 12:54:42 2011 UTC

396 396
397# ifdef ENABLE_TRANSPARENCY 397# ifdef ENABLE_TRANSPARENCY
398 if (background_flags) 398 if (background_flags)
399 background = pixmap2ximage (target->asv, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, 100); 399 background = pixmap2ximage (target->asv, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, 100);
400 400
401 if (!(background_flags & transpPmapTinted) && (flags & tintNeeded)) 401 if (background_flags & tintNeeded)
402 { 402 {
403 ShadingInfo as_shade; 403 ShadingInfo as_shade;
404 as_shade.shading = shade; 404 as_shade.shading = shade;
405 405
406 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 406 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
411 as_shade.tintColor.blue = c.b; 411 as_shade.tintColor.blue = c.b;
412 412
413 background_tint = shading2tint32 (&as_shade); 413 background_tint = shading2tint32 (&as_shade);
414 } 414 }
415 415
416 if (!(background_flags & transpPmapBlurred) && (flags & blurNeeded) && background != NULL) 416 if ((background_flags & blurNeeded) && background != NULL)
417 { 417 {
418 ASImage *tmp = blur_asimage_gauss (target->asv, background, h_blurRadius, v_blurRadius, 0xFFFFFFFF, 418 ASImage *tmp = blur_asimage_gauss (target->asv, background, h_blurRadius, v_blurRadius, 0xFFFFFFFF,
419 (original_asim == NULL || tint == TINT_LEAVE_SAME) ? ASA_XImage : ASA_ASImage, 419 (original_asim == NULL || tint == TINT_LEAVE_SAME) ? ASA_XImage : ASA_ASImage,
420 100, ASIMAGE_QUALITY_DEFAULT); 420 100, ASIMAGE_QUALITY_DEFAULT);
421 if (tmp) 421 if (tmp)
1330 gc = XCreateGC (dpy, target->vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); 1330 gc = XCreateGC (dpy, target->vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
1331 1331
1332 if (gc) 1332 if (gc)
1333 { 1333 {
1334 XFillRectangle (dpy, pixmap, gc, 0, 0, window_width, window_height); 1334 XFillRectangle (dpy, pixmap, gc, 0, 0, window_width, window_height);
1335 result |= transpPmapTiled; 1335 result |= isValid | (flags & effectsFlags);
1336 XFreeGC (dpy, gc); 1336 XFreeGC (dpy, gc);
1337 1337
1338 if (!(flags & CLIENT_RENDER)) 1338 if (!(flags & CLIENT_RENDER))
1339 { 1339 {
1340 if ((flags & blurNeeded) 1340 if ((flags & blurNeeded)
1341 && (flags & HAS_RENDER_CONV)) 1341 && (flags & HAS_RENDER_CONV))
1342 { 1342 {
1343 if (blur_pixmap (pixmap, target->visual, window_width, window_height)) 1343 if (blur_pixmap (pixmap, target->visual, window_width, window_height))
1344 result |= transpPmapBlurred; 1344 result &= ~blurNeeded;
1345 } 1345 }
1346 if ((flags & tintNeeded) 1346 if ((flags & tintNeeded)
1347 && (flags & (tintWholesome | HAS_RENDER))) 1347 && (flags & (tintWholesome | HAS_RENDER)))
1348 { 1348 {
1349 if (tint_pixmap (pixmap, target->visual, window_width, window_height)) 1349 if (tint_pixmap (pixmap, target->visual, window_width, window_height))
1350 result |= transpPmapTinted; 1350 result &= ~tintNeeded;
1351 } 1351 }
1352 } /* server side rendering completed */ 1352 } /* server side rendering completed */
1353 } 1353 }
1354 1354
1355 if (recoded_root_pmap != root_pixmap) 1355 if (recoded_root_pmap != root_pixmap)
1387 { 1387 {
1388 /* we need to re-generate transparency pixmap in that case ! */ 1388 /* we need to re-generate transparency pixmap in that case ! */
1389 background_flags = make_transparency_pixmap (); 1389 background_flags = make_transparency_pixmap ();
1390 if (background_flags == 0) 1390 if (background_flags == 0)
1391 return false; 1391 return false;
1392 else if ((background_flags & transpTransformations) == (flags & transpTransformations)) 1392 else if (!(background_flags & effectsFlags))
1393 flags |= isValid; 1393 flags |= isValid;
1394 } 1394 }
1395# endif 1395# endif
1396 1396
1397# ifdef BG_IMAGE_FROM_FILE 1397# ifdef BG_IMAGE_FROM_FILE
1398 if (have_image 1398 if (have_image
1399 || (background_flags & transpTransformations) != (flags & transpTransformations)) 1399 || (background_flags & effectsFlags))
1400 { 1400 {
1401 if (render_image (background_flags)) 1401 if (render_image (background_flags))
1402 flags |= isValid; 1402 flags |= isValid;
1403 } 1403 }
1404# endif 1404# endif
1412 } 1412 }
1413 1413
1414 if (result) 1414 if (result)
1415 { 1415 {
1416 /* our own client-side tinting */ 1416 /* our own client-side tinting */
1417 if (!(background_flags & transpPmapTinted) && (flags & tintNeeded)) 1417 if (background_flags & tintNeeded)
1418 { 1418 {
1419 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 1419 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
1420 if (flags & tintSet) 1420 if (flags & tintSet)
1421 tint.get (c); 1421 tint.get (c);
1422 shade_ximage (DefaultVisual (target->dpy, target->display->screen), result, shade, c); 1422 shade_ximage (DefaultVisual (target->dpy, target->display->screen), result, shade, c);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines