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

Issue 396483003: Separate ResizeHelper from RenderWidgetHelper (Closed)

Created:
6 years, 5 months ago by ccameron
Modified:
6 years, 5 months ago
Reviewers:
jschuh, jam, piman
CC:
chromium-reviews, creis+watch_chromium.org, nasko+codewatch_chromium.org, darin-cc_chromium.org, piman+watch_chromium.org, erikwright+watch_chromium.org, enne (OOO), danakj
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Separate ResizeHelper from RenderWidgetHelper Create a separate RenderWidgetResizeHelper to handle intercepting and early-processing of IPCs that need to be run during an active resize. This functionality was previously handled in RenderWidgetHelper. The only functional changes made to RenderWidgetResizeHelper during its excision is that it is a single global structure, as compared with the per-RenderProcessImpl RenderWidgetHelper. It will execute any IPCs from any renderer or the GPU processes that are forwarded to it. This is preferable, as that makes it so that live resize in one window does not destroy performance in other windows. Because RenderWidgetResizeHelper can handle GPU process IPCs, we can tear out the bizarre behavior where we'd translate GPU IPCs to synthetic renderer IPCs get them to channel through RenderWidgetHelper (this is all of the deleted ViewHostMsg_CompositorSurfaceBuffersSwapped code). Mark this entire structure as Mac-only, and put it in Mac-only files, since it doesn't get used on other platforms. Future changes will make RenderWidgetResizeHelper have a TaskRunner, which we will pass to the compositor, so that we can pump new frames while inside -[RenderWidgetHostViewMac setFrameSize:]. BUG=392031 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283726

Patch Set 1 #

Patch Set 2 : Fix Linux build again #

Total comments: 15

Patch Set 3 : Incorporate review feedback #

Patch Set 4 : Fix event handle #

Patch Set 5 : Make dtor order more robust #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -474 lines) Patch
M base/threading/thread_restrictions.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/gpu/gpu_process_host.h View 1 2 2 chunks +1 line, -5 lines 0 comments Download
M content/browser/gpu/gpu_process_host.cc View 1 2 4 chunks +39 lines, -55 lines 0 comments Download
M content/browser/gpu/gpu_process_host_ui_shim.cc View 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 2 chunks +7 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 3 chunks +0 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 3 chunks +0 lines, -34 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.h View 6 chunks +7 lines, -72 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.cc View 5 chunks +1 line, -142 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper_mac.mm View 2 chunks +3 lines, -35 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 4 chunks +4 lines, -7 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 8 chunks +9 lines, -49 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 3 chunks +0 lines, -28 lines 0 comments Download
A content/browser/renderer_host/render_widget_resize_helper.h View 1 2 1 chunk +102 lines, -0 lines 0 comments Download
A content/browser/renderer_host/render_widget_resize_helper.cc View 1 2 3 4 1 chunk +166 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 1 chunk +0 lines, -17 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/render_process_host.h View 1 chunk +0 lines, -7 lines 0 comments Download
M content/public/test/mock_render_process_host.h View 1 chunk +0 lines, -3 lines 0 comments Download
M content/public/test/mock_render_process_host.cc View 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
ccameron
This doesn't start touching the the cc:: structures, but it sets up the structure that ...
6 years, 5 months ago (2014-07-15 18:06:01 UTC) #1
piman
Even in isolation, this is good cleanup. Couple of things, mostly nits. I think we'll ...
6 years, 5 months ago (2014-07-15 19:56:00 UTC) #2
ccameron
Thanks -- updated. I've included this in the other platform builds, but I've kept the ...
6 years, 5 months ago (2014-07-15 20:36:25 UTC) #3
piman
LGTM after 1 fix https://codereview.chromium.org/396483003/diff/60001/content/browser/renderer_host/render_widget_resize_helper_mac.cc File content/browser/renderer_host/render_widget_resize_helper_mac.cc (right): https://codereview.chromium.org/396483003/diff/60001/content/browser/renderer_host/render_widget_resize_helper_mac.cc#newcode140 content/browser/renderer_host/render_widget_resize_helper_mac.cc:140: : event_(false /* auto-reset */, ...
6 years, 5 months ago (2014-07-15 22:49:36 UTC) #4
ccameron
Thanks. Adding jam@ to review the thread_restrictions change (limiting the scope of the waitable class) ...
6 years, 5 months ago (2014-07-16 00:38:15 UTC) #5
jam
On 2014/07/16 00:38:15, ccameron1 wrote: > Thanks. Adding jam@ to review the thread_restrictions change (limiting ...
6 years, 5 months ago (2014-07-16 05:51:34 UTC) #6
jschuh
ipc security lgtm (notes: no apparent change in attack surface)
6 years, 5 months ago (2014-07-16 17:51:24 UTC) #7
ccameron
Thanks all!
6 years, 5 months ago (2014-07-16 17:56:14 UTC) #8
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 5 months ago (2014-07-16 17:56:21 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/396483003/100001
6 years, 5 months ago (2014-07-16 17:59:03 UTC) #10
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: mac_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-16 21:51:15 UTC) #11
ccameron
The CQ bit was checked by ccameron@chromium.org
6 years, 5 months ago (2014-07-17 03:22:26 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ccameron@chromium.org/396483003/120001
6 years, 5 months ago (2014-07-17 03:24:55 UTC) #13
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 5 months ago (2014-07-17 04:48:28 UTC) #14
commit-bot: I haz the power
6 years, 5 months ago (2014-07-17 09:30:46 UTC) #15
Message was sent while issue was closed.
Change committed as 283726

Powered by Google App Engine
This is Rietveld 408576698