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.94 by sf-exg, Wed Oct 20 09:04:55 2010 UTC vs.
Revision 1.95 by sf-exg, Fri Oct 22 16:21:05 2010 UTC

530 int x = 0; 530 int x = 0;
531 int y = 0; 531 int y = 0;
532 int w = 0; 532 int w = 0;
533 int h = 0; 533 int h = 0;
534 534
535 TIMING_TEST_START (asim);
536
537 if (original_asim) 535 if (original_asim)
538 get_image_geometry (original_asim->width, original_asim->height, w, h, x, y); 536 get_image_geometry (original_asim->width, original_asim->height, w, h, x, y);
539 537
540 if (!original_asim 538 if (!original_asim
541 || (!(flags & rootAlign) 539 || (!(flags & rootAlign)
657 } 655 }
658 656
659 free (layers); 657 free (layers);
660 } 658 }
661 } 659 }
662 TIMING_TEST_PRINT_RESULT (asim);
663 660
664 bool ret = false; 661 bool ret = false;
665 662
666 if (result) 663 if (result)
667 { 664 {
713 710
714 if (result != background && result != original_asim) 711 if (result != background && result != original_asim)
715 destroy_asimage (&result); 712 destroy_asimage (&result);
716 713
717 XFreeGC (target->dpy, gc); 714 XFreeGC (target->dpy, gc);
718 TIMING_TEST_PRINT_RESULT (asim);
719 715
720 ret = true; 716 ret = true;
721 } 717 }
722 718
723 if (background) 719 if (background)
1283 } 1279 }
1284 1280
1285 XRenderFreePicture (dpy, mask_pic); 1281 XRenderFreePicture (dpy, mask_pic);
1286 XRenderFreePicture (dpy, overlay_pic); 1282 XRenderFreePicture (dpy, overlay_pic);
1287 XRenderFreePicture (dpy, back_pic); 1283 XRenderFreePicture (dpy, back_pic);
1288# if DO_TIMING_TEST
1289 XSync (dpy, False);
1290# endif
1291# endif 1284# endif
1292 } 1285 }
1293 1286
1294 return ret; 1287 return ret;
1295} 1288}
1320 int window_height = target->szHint.height; 1313 int window_height = target->szHint.height;
1321 int sx, sy; 1314 int sx, sy;
1322 XGCValues gcv; 1315 XGCValues gcv;
1323 GC gc; 1316 GC gc;
1324 1317
1325 TIMING_TEST_START (tp);
1326 target->get_window_origin (sx, sy); 1318 target->get_window_origin (sx, sy);
1327 1319
1328 /* check if we are outside of the visible part of the virtual screen : */ 1320 /* check if we are outside of the visible part of the virtual screen : */
1329 if (sx + window_width <= 0 || sy + window_height <= 0 1321 if (sx + window_width <= 0 || sy + window_height <= 0
1330 || sx >= root_width || sy >= root_height) 1322 || sx >= root_width || sy >= root_height)
1367 { 1359 {
1368 XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height); 1360 XFillRectangle (dpy, tiled_root_pmap, gc, 0, 0, window_width, window_height);
1369 result |= transpPmapTiled; 1361 result |= transpPmapTiled;
1370 XFreeGC (dpy, gc); 1362 XFreeGC (dpy, gc);
1371 } 1363 }
1372 TIMING_TEST_PRINT_RESULT (tp);
1373 1364
1374 if (tiled_root_pmap != None) 1365 if (tiled_root_pmap != None)
1375 { 1366 {
1376 if (!need_client_side_rendering ()) 1367 if (!need_client_side_rendering ())
1377 { 1368 {
1394 pmap_width = window_width; 1385 pmap_width = window_width;
1395 pmap_height = window_height; 1386 pmap_height = window_height;
1396 pmap_depth = root_depth; 1387 pmap_depth = root_depth;
1397 } 1388 }
1398 1389
1399 TIMING_TEST_PRINT_RESULT (tp);
1400
1401 return result; 1390 return result;
1402} 1391}
1403 1392
1404bool 1393bool
1405bgPixmap_t::set_root_pixmap () 1394bgPixmap_t::set_root_pixmap ()
1427{ 1416{
1428 unsigned long background_flags = 0; 1417 unsigned long background_flags = 0;
1429 1418
1430 if (target == NULL) 1419 if (target == NULL)
1431 return false; 1420 return false;
1432
1433 TIMING_TEST_START (tp);
1434 1421
1435 invalidate (); 1422 invalidate ();
1436# ifdef ENABLE_TRANSPARENCY 1423# ifdef ENABLE_TRANSPARENCY
1437 if (flags & isTransparent) 1424 if (flags & isTransparent)
1438 { 1425 {
1527 } 1514 }
1528 } 1515 }
1529 1516
1530 apply (); 1517 apply ();
1531 1518
1532 XSync (target->dpy, False);
1533 valid_since = ev::now (); 1519 valid_since = ev::now ();
1534
1535 TIMING_TEST_PRINT_RESULT (tp);
1536 1520
1537 return true; 1521 return true;
1538} 1522}
1539 1523
1540bool 1524bool

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines