~azzar1/unity/fix-839717

« back to all changes in this revision

Viewing changes to launcher/LauncherIcon.cpp

  • Committer: Tarmac
  • Author(s): Daniel van Vugt
  • Date: 2012-07-04 02:37:23 UTC
  • mfrom: (2399.1.70 regionalDamage)
  • Revision ID: tarmac-20120704023723-0tim60e5a2lyub6v
Stop Unity from redrawing the shell on every frame (ie. when it doesn't need
to). It had a severe impact on graphics performance. (LP: #988079)

This especially improves OpenGL application performance and multi-monitor
desktop performance. Because unity was previously slowing down compiz
rendering by 20-40% for each monitor added to the system. This slowdown no
longer occurs as only damaged areas of the unity shell are repainted. Now
unity will not have any impact on compiz rendering performance for most
video frames.

Coincidentally, this fixes a number of other bugs (linked).. Fixes: https://bugs.launchpad.net/bugs/734908, https://bugs.launchpad.net/bugs/874619, https://bugs.launchpad.net/bugs/886605, https://bugs.launchpad.net/bugs/967112, https://bugs.launchpad.net/bugs/988079, https://bugs.launchpad.net/bugs/992516, https://bugs.launchpad.net/bugs/1016430. Approved by Tim Penhey, Sam Spilsbury, jenkins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
    LoadTooltip();
514
514
  _tooltip->ShowTooltipWithTipAt(tip_x, tip_y);
515
515
  _tooltip->ShowWindow(!tooltip_text().empty());
 
516
  tooltip_visible.emit(_tooltip);
516
517
}
517
518
 
518
519
void
534
535
 
535
536
  if (_tooltip)
536
537
    _tooltip->ShowWindow(false);
 
538
  tooltip_visible.emit(nux::ObjectPtr<nux::View>(nullptr));
537
539
}
538
540
 
539
541
bool LauncherIcon::OpenQuicklist(bool select_first_item, int monitor)
653
655
{
654
656
  if (_tooltip)
655
657
    _tooltip->ShowWindow(false);
 
658
  tooltip_visible.emit(nux::ObjectPtr<nux::View>(nullptr));
656
659
}
657
660
 
658
661
bool