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

Issue 2702093002: Consistent CopyFromSurface() API, consolidated to RWHV (Closed)

Created:
3 years, 10 months ago by miu
Modified:
3 years, 9 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, posciak+watch_chromium.org, chfremer+watch_chromium.org, nasko+codewatch_chromium.org, miu+watch_chromium.org, extensions-reviews_chromium.org, jam, jbauman+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, devtools-reviews_chromium.org, kalyank, xjz+watch_chromium.org, creis+watch_chromium.org, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, chromium-apps-reviews_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, mac-reviews_chromium.org, danakj+watch_chromium.org, James Su, pfeldman
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Consistent CopyFromSurface() API, consolidated to RWHV A clean-up to consolidate the multiple "copy from RenderWidget surface" methods across a few classes into the RenderWidgetHostView class. Deletes the legacy RWH::CopyFromBackingStore() API and migrates all callers to use RWHV::CopyFromSurface(). Also, made changes to ensure the semantics of the arguments is consistent among all callers and among all platform impls; and place less burdeon on callers to compute rects correctly. Added a few TODO comments, where size data is being used incorrectly, to be addressed in later changes relevant to crbug 73362. BUG=73362 TEST=Manually tested what did not have obvious unit testing in place (e.g., devtools color picker). CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2702093002 Cr-Commit-Position: refs/heads/master@{#454098} Committed: https://chromium.googlesource.com/chromium/src/+/515321aa08c29e910a720af8b3752ab52826df22

Patch Set 1 #

Patch Set 2 : aura compile fixes #

Patch Set 3 : Revert 'surface optimization' in DFH because it will not work. #

Patch Set 4 : REBASE #

Total comments: 12

Patch Set 5 : Per alexmos, simplification in NavigationEntryScreenshotManager. #

Total comments: 8

Patch Set 6 : Fix WebContentsViewAuraTest #

Patch Set 7 : Fixing comments, per nick@'s comments. #

Patch Set 8 : REBASE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -476 lines) Patch
M chrome/browser/android/compositor/tab_content_manager.cc View 1 2 3 3 chunks +20 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_api.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugins/plugin_power_saver_browsertest.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M chrome/browser/thumbnails/simple_thumbnail_crop.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/thumbnails/thumbnail_tab_helper.cc View 2 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/exclusive_access/flash_fullscreen_interactive_browsertest.cc View 2 chunks +4 lines, -7 lines 0 comments Download
M content/browser/devtools/devtools_frame_trace_recorder.cc View 2 chunks +8 lines, -9 lines 0 comments Download
M content/browser/devtools/protocol/color_picker.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/devtools/protocol/color_picker.cc View 1 chunk +8 lines, -5 lines 0 comments Download
M content/browser/devtools/protocol/page_handler.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/frame_host/navigation_entry_screenshot_manager.h View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigation_entry_screenshot_manager.cc View 1 2 3 4 5 3 chunks +11 lines, -13 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -10 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -16 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.h View 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 3 chunks +7 lines, -11 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 2 3 4 5 6 4 chunks +22 lines, -13 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.mm View 1 3 chunks +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.h View 1 2 3 2 chunks +5 lines, -6 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 chunks +25 lines, -25 lines 0 comments Download
M content/browser/renderer_host/render_widget_helper.h View 1 2 3 4 5 6 1 chunk +0 lines, -30 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 2 chunks +0 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 1 chunk +0 lines, -25 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 2 chunks +5 lines, -11 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -16 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 2 chunks +8 lines, -10 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 3 chunks +14 lines, -13 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 3 chunks +9 lines, -38 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.cc View 1 2 chunks +22 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 17 chunks +43 lines, -58 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 2 chunks +8 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 5 chunks +9 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_view_aura_browsertest.cc View 1 2 3 4 5 1 chunk +1 line, -3 lines 0 comments Download
M content/public/browser/render_widget_host.h View 3 chunks +0 lines, -27 lines 0 comments Download
M content/public/browser/render_widget_host_view.h View 4 chunks +61 lines, -2 lines 0 comments Download
M content/test/test_render_view_host.h View 2 chunks +0 lines, -11 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 7 2 chunks +0 lines, -23 lines 0 comments Download
M extensions/browser/api/guest_view/web_view/web_view_internal_api.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M extensions/browser/api/web_contents_capture_client.h View 1 chunk +2 lines, -2 lines 0 comments Download
M extensions/browser/api/web_contents_capture_client.cc View 2 chunks +5 lines, -21 lines 0 comments Download

Messages

Total messages: 38 (23 generated)
miu
Fairly trivial content public API cleanup here. PTAL. alexmos: content/browser/frame_host/* changwan: chrome/browser/android/compositor/tab_content_manager.cc dgozman: content/browser/devtools/* nick: ...
3 years, 9 months ago (2017-02-28 02:21:36 UTC) #14
sky
c/b LGTM (I didn't look at extensions or the android file, which you have other ...
3 years, 9 months ago (2017-02-28 04:13:51 UTC) #19
Devlin
lgtm % question https://codereview.chromium.org/2702093002/diff/60001/extensions/browser/api/web_contents_capture_client.cc File extensions/browser/api/web_contents_capture_client.cc (right): https://codereview.chromium.org/2702093002/diff/60001/extensions/browser/api/web_contents_capture_client.cc#newcode57 extensions/browser/api/web_contents_capture_client.cc:57: view->CopyFromSurface(gfx::Rect(), // Copy entire surface area. ...
3 years, 9 months ago (2017-02-28 14:03:02 UTC) #20
dgozman
https://codereview.chromium.org/2702093002/diff/60001/content/browser/devtools/protocol/color_picker.cc File content/browser/devtools/protocol/color_picker.cc (right): https://codereview.chromium.org/2702093002/diff/60001/content/browser/devtools/protocol/color_picker.cc#newcode86 content/browser/devtools/protocol/color_picker.cc:86: // TODO(miu): This is the wrong size. It's the ...
3 years, 9 months ago (2017-02-28 19:13:52 UTC) #21
alexmos
https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc File content/browser/frame_host/navigation_entry_screenshot_manager.cc (right): https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc#newcode118 content/browser/frame_host/navigation_entry_screenshot_manager.cc:118: if (auto* view = host->GetWidget()->GetView()) { Do you need ...
3 years, 9 months ago (2017-02-28 19:44:09 UTC) #22
miu
https://codereview.chromium.org/2702093002/diff/60001/content/browser/devtools/protocol/color_picker.cc File content/browser/devtools/protocol/color_picker.cc (right): https://codereview.chromium.org/2702093002/diff/60001/content/browser/devtools/protocol/color_picker.cc#newcode86 content/browser/devtools/protocol/color_picker.cc:86: // TODO(miu): This is the wrong size. It's the ...
3 years, 9 months ago (2017-03-01 01:17:02 UTC) #23
alexmos
https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc File content/browser/frame_host/navigation_entry_screenshot_manager.cc (right): https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc#newcode118 content/browser/frame_host/navigation_entry_screenshot_manager.cc:118: if (auto* view = host->GetWidget()->GetView()) { On 2017/03/01 01:17:02, ...
3 years, 9 months ago (2017-03-01 01:30:05 UTC) #24
Changwan Ryu
On 2017/03/01 01:30:05, alexmos wrote: > https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc > File content/browser/frame_host/navigation_entry_screenshot_manager.cc (right): > > https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc#newcode118 > ...
3 years, 9 months ago (2017-03-01 07:01:10 UTC) #25
ncarter (slow)
lgtm, wonderful https://codereview.chromium.org/2702093002/diff/80001/content/browser/media/capture/web_contents_video_capture_device_unittest.cc File content/browser/media/capture/web_contents_video_capture_device_unittest.cc (right): https://codereview.chromium.org/2702093002/diff/80001/content/browser/media/capture/web_contents_video_capture_device_unittest.cc#newcode466 content/browser/media/capture/web_contents_video_capture_device_unittest.cc:466: // CopyFromSurfaceToVideoFrame functionality into TestRenderViewHostView TestRenderViewHostView -> ...
3 years, 9 months ago (2017-03-01 18:34:26 UTC) #26
dgozman
lgtm
3 years, 9 months ago (2017-03-01 19:05:18 UTC) #27
miu
alexmos: PTAL. https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc File content/browser/frame_host/navigation_entry_screenshot_manager.cc (right): https://codereview.chromium.org/2702093002/diff/60001/content/browser/frame_host/navigation_entry_screenshot_manager.cc#newcode118 content/browser/frame_host/navigation_entry_screenshot_manager.cc:118: if (auto* view = host->GetWidget()->GetView()) { On ...
3 years, 9 months ago (2017-03-01 21:57:18 UTC) #28
alexmos
Thanks, LGTM
3 years, 9 months ago (2017-03-01 22:02:03 UTC) #31
miu
https://codereview.chromium.org/2702093002/diff/80001/content/browser/media/capture/web_contents_video_capture_device_unittest.cc File content/browser/media/capture/web_contents_video_capture_device_unittest.cc (right): https://codereview.chromium.org/2702093002/diff/80001/content/browser/media/capture/web_contents_video_capture_device_unittest.cc#newcode466 content/browser/media/capture/web_contents_video_capture_device_unittest.cc:466: // CopyFromSurfaceToVideoFrame functionality into TestRenderViewHostView On 2017/03/01 18:34:26, ncarter ...
3 years, 9 months ago (2017-03-01 22:18:24 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2702093002/140001
3 years, 9 months ago (2017-03-01 22:39:59 UTC) #35
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 23:46:44 UTC) #38
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/515321aa08c29e910a720af8b375...

Powered by Google App Engine
This is Rietveld 408576698