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

Issue 506013: Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed)

Created:
11 years ago by darin (slow to review)
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, ben+cc_chromium.org, John Grabowski, jam, pam+watch_chromium.org, Paweł Hajdan Jr., darin (slow to review)
Visibility:
Public.

Description

Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC. The combined IPC means that scrolling only requires one transport DIB instead of two. Previously, we'd use one in the ScrollRect IPC to pass up the pixels for the exposed region, and then we'd use a second one in the PaintRect IPC to pass up the pixels for the updated scroll bar rendering. Now all paints are done using a single transport DIB. Optimize RenderWidgetHostViewWin::OnPaint to only paint the damaged regions. This means calling GetUpdateRgn and GetRegionData to enumerate the list of damage rects. Then only those rects are copied from the backing store. The same optimization is not done for Linux or Mac yet. R=brettw BUG=29591 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=34951

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 4

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+376 lines, -506 lines) Patch
M chrome/browser/renderer_host/backing_store.h View 1 2 3 1 chunk +3 lines, -6 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_mac.mm View 1 2 3 2 chunks +1 line, -7 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_win.cc View 1 2 3 2 chunks +1 line, -9 lines 0 comments Download
M chrome/browser/renderer_host/backing_store_x.cc View 1 2 3 2 chunks +1 line, -6 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/browser_render_process_host.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/mock_render_process_host.h View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/mock_render_process_host.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_process_host.h View 1 2 3 1 chunk +5 lines, -5 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_helper.h View 1 2 3 6 chunks +24 lines, -24 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_helper.cc View 1 2 3 6 chunks +20 lines, -20 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.h View 1 2 3 3 chunks +3 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host.cc View 1 2 3 10 chunks +27 lines, -68 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_unittest.cc View 1 2 3 8 chunks +51 lines, -50 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_gtk.cc View 1 2 3 1 chunk +13 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 2 chunks +19 lines, -14 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.h View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/renderer_host/render_widget_host_view_win.cc View 1 2 3 5 chunks +56 lines, -37 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/renderer_host/test/test_render_view_host.h View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 7 chunks +35 lines, -76 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 3 chunks +7 lines, -16 lines 0 comments Download
M chrome/renderer/render_widget.h View 1 2 3 3 chunks +9 lines, -17 lines 0 comments Download
M chrome/renderer/render_widget.cc View 1 2 3 11 chunks +71 lines, -110 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
darin (slow to review)
11 years ago (2009-12-15 19:50:25 UTC) #1
brettw
11 years ago (2009-12-17 04:41:13 UTC) #2
LGTM.

PS GetRegionData is a terrible API!

http://codereview.chromium.org/506013/diff/3026/3040
File chrome/browser/renderer_host/backing_store.h (right):

http://codereview.chromium.org/506013/diff/3026/3040#newcode101
chrome/browser/renderer_host/backing_store.h:101: // Scrolls the given rect in
the backing store, replacing the given region
This comment is out of date.

http://codereview.chromium.org/506013/diff/3026/3045
File chrome/browser/renderer_host/render_widget_host.cc (right):

http://codereview.chromium.org/506013/diff/3026/3045#newcode689
chrome/browser/renderer_host/render_widget_host.cc:689:
view_->DidScrollBackingStoreRect(params.scroll_rect, params.dx, params.dy);
Too long

http://codereview.chromium.org/506013/diff/3026/3041
File chrome/browser/renderer_host/render_widget_host_view_mac.mm (right):

http://codereview.chromium.org/506013/diff/3026/3041#newcode287
chrome/browser/renderer_host/render_widget_host_view_mac.mm:287: // As much as
we'd like to use -setNeedsDisplayInRect: here, we can't. We're
Your extra indentation made this too long.

http://codereview.chromium.org/506013/diff/3026/3050
File chrome/common/render_messages.h (right):

http://codereview.chromium.org/506013/diff/3026/3050#newcode206
chrome/common/render_messages.h:206: // The scroll offset.  Only one of these
can be non-zero.
It might be nice to also mention that they can both be zero to indicate no
scroll.

Powered by Google App Engine
This is Rietveld 408576698