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

Issue 8392011: GTK: Step 1 of tab strip refresh. (Closed)

Created:
9 years, 2 months ago by Elliot Glaysher
Modified:
9 years, 1 month ago
Reviewers:
dpapad, Evan Stade
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

GTK: Step 1 of tab strip refresh. willchan pointed out that while idling, the chrome browser process can take up to 25% CPU time on one of our Z600s, which is ridiculous. There's a lot of causes here, but the first one I'm focusing on is how slow our tabstrip rendering code is. Previously, each frame we stuffed bitmaps across the X11 connection instead of using cairo primitives for serverside accelerated drawing. This patch changes the code in tab_renderer_gtk.h from skia rendering (with manually composited bitmaps) to cairo rendering (which should be a set of commands to the x server that should composite bitmaps already living serverside). From here we can: - Look for other ways to minimize the amount of work in an expose event. - Only redraw the dirty rectangles or otherwise minimize the expose area. - Finally fix that theme rendering bug where dragging a tab along the tabstrip doesn't update to reflect the new background. BUG=100803 TEST=Manual testing looking for graphical regressions. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107514

Patch Set 1 #

Patch Set 2 : Rebase to ToT #

Patch Set 3 : More cleanup #

Total comments: 14

Patch Set 4 : Redo as functions. #

Total comments: 3

Patch Set 5 : Rebase to ToT #

Patch Set 6 : Remove parens #

Patch Set 7 : Rebase to ToT again. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+570 lines, -433 lines) Patch
M chrome/browser/ui/gtk/cairo_cached_surface.h View 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/ui/gtk/cairo_cached_surface.cc View 3 chunks +23 lines, -4 lines 0 comments Download
M chrome/browser/ui/gtk/tabs/dragged_view_gtk.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc View 5 chunks +9 lines, -6 lines 1 comment Download
M chrome/browser/ui/gtk/tabs/tab_gtk.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h View 1 2 3 15 chunks +44 lines, -86 lines 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc View 1 2 3 4 5 6 22 chunks +283 lines, -263 lines 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_strip_gtk.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc View 2 chunks +9 lines, -3 lines 0 comments Download
M ui/gfx/canvas_skia_linux.cc View 1 2 3 5 chunks +10 lines, -68 lines 0 comments Download
M ui/gfx/pango_util.h View 1 2 3 2 chunks +47 lines, -0 lines 0 comments Download
M ui/gfx/pango_util.cc View 1 2 3 4 5 4 chunks +132 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Elliot Glaysher
9 years, 2 months ago (2011-10-25 23:01:59 UTC) #1
Evan Stade
http://codereview.chromium.org/8392011/diff/1013/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc File chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc (right): http://codereview.chromium.org/8392011/diff/1013/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc#newcode462 chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc:462: theme_id = IDR_THEME_TAB_BACKGROUND; ternary operator http://codereview.chromium.org/8392011/diff/1013/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc#newcode1110 chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc:1110: tab_active_r_width_ = ...
9 years, 2 months ago (2011-10-25 23:33:30 UTC) #2
Elliot Glaysher
http://codereview.chromium.org/8392011/diff/1013/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc File chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc (right): http://codereview.chromium.org/8392011/diff/1013/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc#newcode462 chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc:462: theme_id = IDR_THEME_TAB_BACKGROUND; On 2011/10/25 23:33:30, Evan Stade wrote: ...
9 years, 1 month ago (2011-10-26 21:06:57 UTC) #3
Evan Stade
lgtm http://codereview.chromium.org/8392011/diff/1013/ui/gfx/pango_util.cc File ui/gfx/pango_util.cc (right): http://codereview.chromium.org/8392011/diff/1013/ui/gfx/pango_util.cc#newcode270 ui/gfx/pango_util.cc:270: if (fade_width > (bounds_.width() / 2)) { On ...
9 years, 1 month ago (2011-10-26 21:46:05 UTC) #4
Elliot Glaysher
http://codereview.chromium.org/8392011/diff/6001/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h File chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h (right): http://codereview.chromium.org/8392011/diff/6001/chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h#newcode350 chrome/browser/ui/gtk/tabs/tab_renderer_gtk.h:350: static int tab_active_l_width_; On 2011/10/26 21:46:05, Evan Stade wrote: ...
9 years, 1 month ago (2011-10-26 23:23:52 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/8392011/9013
9 years, 1 month ago (2011-10-26 23:24:12 UTC) #6
commit-bot: I haz the power
Can't apply patch for file chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc. While running patch -p1 --forward --force; patching file chrome/browser/ui/gtk/tabs/tab_renderer_gtk.cc ...
9 years, 1 month ago (2011-10-27 00:43:31 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/8392011/13001
9 years, 1 month ago (2011-10-27 00:57:31 UTC) #8
commit-bot: I haz the power
Change committed as 107514
9 years, 1 month ago (2011-10-27 02:10:04 UTC) #9
dpapad
9 years, 1 month ago (2011-10-28 16:56:52 UTC) #10
http://codereview.chromium.org/8392011/diff/13001/chrome/browser/ui/gtk/tabs/...
File chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc (right):

http://codereview.chromium.org/8392011/diff/13001/chrome/browser/ui/gtk/tabs/...
chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc:439: int widget_width) {
Drive by comment. |widget_width| argument can now be removed, since |widget|
itself is passed as an arg.

Powered by Google App Engine
This is Rietveld 408576698