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

Issue 418283003: "Buttery Smooth" Tab Capture. (Closed)

Created:
6 years, 5 months ago by miu
Modified:
6 years, 4 months ago
CC:
chromium-reviews, penghuang+watch_chromium.org, yusukes+watch_chromium.org, nona+watch_chromium.org, posciak+watch_chromium.org, jam, mcasas+watch_chromium.org, yukishiino+watch_chromium.org, sievers+watch_chromium.org, jbauman+watch_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, danakj+watch_chromium.org, James Su, wjia+watch_chromium.org, miu+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

"Buttery Smooth" Tab Capture. There are three main changes being made with the overall goal of improving the smoothness of the video coming out of the tab capture pipeline: 1. A new AnimatedContentSampler has been added that identifies which frames were rendered due to animated content (e.g., a video or Flash widget). VideoCaptureOracle is then informed of exactly which subset of frames should be captured from the compositor and provided near-perfect frame timestamps for downstream consumers. 2. Additional plumbing in the FrameSubscriber interface to provide the damage region of each frame. This is used by AnimatedContentSampler. Also, impls now provide true vsync-based presentation timestamps. 3. Raised the VideoCaptureController buffer pool count from 3 to 5. This value is based on the logical capacity of the capture pipeline, and not on hardware performance. Testing revealed that more buffers are needed to account for both multiple pipelined GPU readbacks as well as those frames undergoing video encoding dowstream. Testing: Tested mirroring using the usual self_mirroring.zip test extension as well as the Google Cast extension to a Chromecast device. Tested lock-in/out scenarios with a number of well- and ill- behaving video playbacks. Observed dramatic improvement in end-to-end smoothness scores in the lab. New unit tests to cover new code, and made sure all relevant existing unit tests still pass. BUG=258630 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287447

Patch Set 1 : #

Total comments: 10

Patch Set 2 : Fixed SmoothEventSamplerTest breakage. #

Total comments: 24

Patch Set 3 : Fix SmoothEventSampler tests for realz. #

Patch Set 4 : Now pixel-weighted. Lots of add'l unit tests. (rebased against ToT) #

Total comments: 10

Patch Set 5 : Un-inline some methods, plus REBASE. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1422 lines, -192 lines) Patch
M content/browser/compositor/delegated_frame_host.h View 1 2 3 4 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 chunks +26 lines, -14 lines 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/media/capture/content_video_capture_device_core.cc View 5 chunks +5 lines, -4 lines 0 comments Download
M content/browser/media/capture/desktop_capture_device_aura.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/media/capture/video_capture_oracle.h View 1 2 3 4 4 chunks +164 lines, -29 lines 0 comments Download
M content/browser/media/capture/video_capture_oracle.cc View 1 2 3 4 4 chunks +320 lines, -56 lines 0 comments Download
M content/browser/media/capture/video_capture_oracle_unittest.cc View 1 2 3 4 20 chunks +823 lines, -49 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device.cc View 6 chunks +8 lines, -4 lines 0 comments Download
M content/browser/media/capture/web_contents_video_capture_device_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_buffer_pool.cc View 1 2 3 2 chunks +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.h View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_controller.cc View 1 2 3 2 chunks +2 lines, -5 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_controller_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 2 3 2 chunks +8 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_browsertest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 3 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 3 4 6 chunks +26 lines, -11 lines 0 comments Download
M content/public/browser/render_widget_host_view_frame_subscriber.h View 2 chunks +8 lines, -6 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
miu
nick: PTAL at content/browser/media/capture/* and also content/browser/renderer_host/media/video_capture_controller* ccameron: PTAL at everything else (changes to DelegatedFrameHost ...
6 years, 5 months ago (2014-07-25 07:44:35 UTC) #1
ccameron
lgtm (with one issue, which maybe just gets a comment, cause it's on an obsolete ...
6 years, 5 months ago (2014-07-25 17:21:53 UTC) #2
miu
Thanks! https://codereview.chromium.org/418283003/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm File content/browser/renderer_host/render_widget_host_view_mac.mm (right): https://codereview.chromium.org/418283003/diff/20001/content/browser/renderer_host/render_widget_host_view_mac.mm#newcode1743 content/browser/renderer_host/render_widget_host_view_mac.mm:1743: gfx::Rect(), On 2014/07/25 17:21:52, ccameron1 wrote: > I ...
6 years, 5 months ago (2014-07-25 18:00:14 UTC) #3
ncarter (slow)
Overall I'm pretty excited that you've found a useful signal in the dirty-rect stream. Looking ...
6 years, 5 months ago (2014-07-26 00:57:58 UTC) #4
miu
No code changes yet. Replying to some of your comments for general discussion: > Looking ...
6 years, 4 months ago (2014-07-28 21:54:13 UTC) #5
miu
nick: Iterated. ;-) PTAL. If it looks like I'm not addressing any one comment completely ...
6 years, 4 months ago (2014-07-31 01:25:33 UTC) #6
ncarter (slow)
lgtm, only nits https://codereview.chromium.org/418283003/diff/80001/content/browser/media/capture/video_capture_oracle.cc File content/browser/media/capture/video_capture_oracle.cc (right): https://codereview.chromium.org/418283003/diff/80001/content/browser/media/capture/video_capture_oracle.cc#newcode103 content/browser/media/capture/video_capture_oracle.cc:103: should_sample = smoothing_sampler_.should_sample(); Much better, thanks! ...
6 years, 4 months ago (2014-08-01 23:36:39 UTC) #7
miu
https://codereview.chromium.org/418283003/diff/80001/content/browser/media/capture/video_capture_oracle.cc File content/browser/media/capture/video_capture_oracle.cc (right): https://codereview.chromium.org/418283003/diff/80001/content/browser/media/capture/video_capture_oracle.cc#newcode231 content/browser/media/capture/video_capture_oracle.cc:231: << "Content changed; capture will resume."; On 2014/08/01 23:36:38, ...
6 years, 4 months ago (2014-08-04 18:46:05 UTC) #8
miu
avi: Need OWNERS stamp for changes to content/public/browser/render_widget_host_view_frame_subscriber.h
6 years, 4 months ago (2014-08-04 18:46:49 UTC) #9
Avi (use Gerrit)
content/public/browser/render_widget_host_view_frame_subscriber.h lgtm
6 years, 4 months ago (2014-08-04 18:48:03 UTC) #10
miu
The CQ bit was checked by miu@chromium.org
6 years, 4 months ago (2014-08-04 18:49:17 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/418283003/100001
6 years, 4 months ago (2014-08-04 18:50:42 UTC) #12
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-04 21:53:46 UTC) #13
commit-bot: I haz the power
6 years, 4 months ago (2014-08-05 04:15:13 UTC) #14
Message was sent while issue was closed.
Change committed as 287447

Powered by Google App Engine
This is Rietveld 408576698