Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Issue 2985006: GTK: reduce cpu usage of upgrade notification animation. (Closed)

Created:
10 years, 5 months ago by Evan Stade
Modified:
9 years, 6 months ago
Reviewers:
tony
CC:
chromium-reviews, ben+cc_chromium.org
Base URL:
http://src.chromium.org/git/chromium.git
Visibility:
Public.

Description

GTK: reduce cpu usage of upgrade notification animation. First, don't queue excessive draws when the animation isn't changing. This should reduce cpu usage by about 75%. Second, don't animate the little dot when the browser window isn't active. For WMs that support _NET_ACTIVE_WINDOW, this should keep CPU usage steady no matter how many browser windows are open. The net effect of this patch is to reduce CPU usage from 100% in certain cases (when many windows are open) to a negligible amount (on metacity on my workstation). BUG=48909 TEST=open many windows and inspect CPU usage according to top Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=52271

Patch Set 1 #

Patch Set 2 : fixme #

Patch Set 3 : merge to ToT #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -18 lines) Patch
M chrome/browser/gtk/browser_toolbar_gtk.h View 1 2 6 chunks +16 lines, -3 lines 0 comments Download
M chrome/browser/gtk/browser_toolbar_gtk.cc View 1 2 7 chunks +37 lines, -13 lines 0 comments Download
M chrome/browser/gtk/browser_window_gtk.cc View 2 chunks +2 lines, -2 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Evan Stade
10 years, 5 months ago (2010-07-13 21:45:24 UTC) #1
tony
LGTM http://codereview.chromium.org/2985006/diff/5001/6003 File chrome/browser/gtk/browser_window_gtk.cc (right): http://codereview.chromium.org/2985006/diff/5001/6003#newcode336 chrome/browser/gtk/browser_window_gtk.cc:336: ActiveWindowWatcherX::AddObserver(this); What is the reason for this move? ...
10 years, 5 months ago (2010-07-13 22:09:46 UTC) #2
Evan Stade
10 years, 5 months ago (2010-07-13 22:29:40 UTC) #3
http://codereview.chromium.org/2985006/diff/5001/6003
File chrome/browser/gtk/browser_window_gtk.cc (right):

http://codereview.chromium.org/2985006/diff/5001/6003#newcode336
chrome/browser/gtk/browser_window_gtk.cc:336:
ActiveWindowWatcherX::AddObserver(this);
On 2010/07/13 22:09:47, tony wrote:
> What is the reason for this move?  Should there be a comment explaining why
this
> needs to happen first?

the reason is so that the observer gets called first and is_active() will be
updated by the time BrowserToolbarGtk is called back. I will add a comment.

Powered by Google App Engine
This is Rietveld 408576698