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

Issue 986823002: De-dupe copy requests for tab capture in DelegatedFrameHost. (Closed)

Created:
5 years, 9 months ago by miu
Modified:
5 years, 9 months ago
Reviewers:
danakj, hubbe, ccameron
CC:
chromium-reviews, jam, 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, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

De-dupe copy requests for tab capture in DelegatedFrameHost. Tab capture requests copies/readbacks in response to every delegated frame swap from the renderer. These are executed in a later step, when the browser is composited. Unfortunately, the browser may not be composited for every render frame. This means multiple copies/readbacks may become enqueued, each of which is expensive, and will turn out to be completely redundant as the results will be identical. This change detects this scenario, and de-dupes by "aborting" the older frame subscriber callback. BUG=464475 Committed: https://crrev.com/ddee0845cc298cbba6f9d8d6ff7fb9e06073f0e8 Cr-Commit-Position: refs/heads/master@{#319998}

Patch Set 1 : #

Patch Set 2 : Fix RenderWidgetHostViewAuraCopyRequestTest.DestroyedAfterCopyRequest #

Patch Set 3 : Remove redundant portion of new test. #

Total comments: 4

Patch Set 4 : Simplify by doing a little queuing in DelegatedFrameHost. #

Total comments: 11

Patch Set 5 : Addressed danakj's and hubbe's comments. #

Total comments: 2

Patch Set 6 : Minor rewording of comment in delegated_frame_host.cc to avoid confusion. #

Patch Set 7 : 3 is enough! :) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -23 lines) Patch
M content/browser/compositor/delegated_frame_host.h View 1 2 3 3 chunks +19 lines, -0 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 4 chunks +38 lines, -6 lines 0 comments Download
M content/browser/media/capture/video_capture_oracle.cc View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 5 chunks +152 lines, -16 lines 0 comments Download

Messages

Total messages: 18 (5 generated)
miu
ccameron: Need OWNERS "rubber stamp" for render_widget_host_view_aura_unittest.cc. Feel free to take a look at the ...
5 years, 9 months ago (2015-03-09 20:39:20 UTC) #4
danakj
https://codereview.chromium.org/986823002/diff/80001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/986823002/diff/80001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode2115 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:2115: // Simulate a composite by running the loop and ...
5 years, 9 months ago (2015-03-09 22:20:15 UTC) #5
miu
danakj: After chatting with my teammate here, things were simplified a lot by doing a ...
5 years, 9 months ago (2015-03-10 02:50:43 UTC) #6
hubbe
lgtm https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc#newcode275 content/browser/compositor/delegated_frame_host.cc:275: if (!frame_subscriber_callbacks_.empty() && The empty() call should not ...
5 years, 9 months ago (2015-03-10 17:06:53 UTC) #7
danakj
https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc#newcode300 content/browser/compositor/delegated_frame_host.cc:300: NOTREACHED(); Don't do "NOTREACHED(); return;" please. Either DCHECK() and ...
5 years, 9 months ago (2015-03-10 17:17:18 UTC) #8
miu
https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/986823002/diff/100001/content/browser/compositor/delegated_frame_host.cc#newcode275 content/browser/compositor/delegated_frame_host.cc:275: if (!frame_subscriber_callbacks_.empty() && On 2015/03/10 17:06:53, hubbe wrote: > ...
5 years, 9 months ago (2015-03-10 20:54:08 UTC) #9
danakj
LGTM https://codereview.chromium.org/986823002/diff/100001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/986823002/diff/100001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode2270 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:2270: EXPECT_EQ(2, callback_count_); On 2015/03/10 20:54:07, miu wrote: > ...
5 years, 9 months ago (2015-03-10 20:59:21 UTC) #10
ccameron
OWNER lgtm for content/renderer_host
5 years, 9 months ago (2015-03-10 21:00:51 UTC) #11
miu
Thanks all for the review! :) https://codereview.chromium.org/986823002/diff/120001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc File content/browser/renderer_host/render_widget_host_view_aura_unittest.cc (right): https://codereview.chromium.org/986823002/diff/120001/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc#newcode2175 content/browser/renderer_host/render_widget_host_view_aura_unittest.cc:2175: for (int i ...
5 years, 9 months ago (2015-03-10 21:05:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/986823002/160001
5 years, 9 months ago (2015-03-10 21:06:16 UTC) #15
commit-bot: I haz the power
Committed patchset #7 (id:160001)
5 years, 9 months ago (2015-03-10 23:30:56 UTC) #16
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/ddee0845cc298cbba6f9d8d6ff7fb9e06073f0e8 Cr-Commit-Position: refs/heads/master@{#319998}
5 years, 9 months ago (2015-03-10 23:31:50 UTC) #17
miu
5 years, 9 months ago (2015-03-23 19:25:17 UTC) #18
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:160001) has been created in
https://codereview.chromium.org/1010803013/ by miu@chromium.org.

The reason for reverting is: Weird frame flickering effect in capture on some
systems.  https://crbug.com/469345.

Powered by Google App Engine
This is Rietveld 408576698