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

Issue 2834553002: Replace CompositorFrameSinkSupport::WillDrawSurface With RepeatingCallback (Closed)

Created:
3 years, 8 months ago by Alex Z.
Modified:
3 years, 8 months ago
Reviewers:
danakj, Fady Samuel, sadrul
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace CompositorFrameSinkSupport::WillDrawSurface With RepeatingCallback As discussed in another CL (https://codereview.chromium.org/2824053003/), WillDrawSurface is noisier than it needs to be. It is called on every draw regardless of damage and reports damage in the submitted frame that the client already knows about while the client is only interested in damage to child surfaces. By replacing WillDrawSurface with a base::RepeatingCallback, SurfaceFactory doesn't need to know about the details and we avoid having to go through the factory on the way back. BUG=707105 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2834553002 Cr-Commit-Position: refs/heads/master@{#466318} Committed: https://chromium.googlesource.com/chromium/src/+/0838e367b020c960036c1e706b40f5bfd3226e32

Patch Set 1 #

Patch Set 2 : Pass Test #

Patch Set 3 : Fix surface_aggregator_perftest #

Total comments: 11

Patch Set 4 : Address Comments #

Patch Set 5 : Address Comments #

Patch Set 6 : Fix render_widget_host_view_aura_unittest #

Total comments: 4

Patch Set 7 : Address Comments On Documentation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+87 lines, -52 lines) Patch
M cc/surfaces/compositor_frame_sink_support.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/surfaces/display.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M cc/surfaces/surface.h View 1 2 3 4 5 6 4 chunks +15 lines, -3 lines 0 comments Download
M cc/surfaces/surface.cc View 1 2 3 6 chunks +21 lines, -7 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 1 2 3 4 3 chunks +5 lines, -6 lines 0 comments Download
M cc/surfaces/surface_aggregator_perftest.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M cc/surfaces/surface_factory.h View 2 chunks +4 lines, -3 lines 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 3 4 chunks +4 lines, -8 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 1 14 chunks +28 lines, -14 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 1 2 3 4 5 6 1 chunk +1 line, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 43 (23 generated)
Alex Z.
danakj@, fsamuel@: SurfaceFactory::SubmitCompositorFrame takes a WillDrawCallback and SurfaceAggregator no longer goes through factory to call ...
3 years, 8 months ago (2017-04-19 23:29:31 UTC) #6
Fady Samuel
Looks like it's generally moving in the right direction but a bunch of cc_unittests still ...
3 years, 8 months ago (2017-04-20 00:33:18 UTC) #9
Fady Samuel
Note to Dana: we currently add a callback on QueueFrame (I hate that name because ...
3 years, 8 months ago (2017-04-20 12:35:46 UTC) #10
Alex Z.
On 2017/04/20 00:33:18, Fady Samuel wrote: > Looks like it's generally moving in the right ...
3 years, 8 months ago (2017-04-20 12:41:39 UTC) #13
Fady Samuel
https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc#newcode291 cc/surfaces/surface.cc:291: void Surface::RunWillDrawCallbacks(const gfx::Rect& damage_rect) { I'm really not sure ...
3 years, 8 months ago (2017-04-20 12:45:48 UTC) #14
danakj
Is there no unit test for WillDrawCallback? https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc#newcode291 cc/surfaces/surface.cc:291: void Surface::RunWillDrawCallbacks(const ...
3 years, 8 months ago (2017-04-20 13:56:45 UTC) #15
Alex Z.
https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface.cc#newcode291 cc/surfaces/surface.cc:291: void Surface::RunWillDrawCallbacks(const gfx::Rect& damage_rect) { On 2017/04/20 12:45:48, Fady ...
3 years, 8 months ago (2017-04-20 13:58:05 UTC) #16
Alex Z.
https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc#newcode762 cc/surfaces/surface_aggregator.cc:762: if (!damage_rect.IsEmpty()) On 2017/04/20 13:56:45, danakj wrote: > Can ...
3 years, 8 months ago (2017-04-20 14:05:04 UTC) #19
danakj
https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc#newcode763 cc/surfaces/surface_aggregator.cc:763: surface->RunWillDrawCallbacks(damage_rect); On 2017/04/20 14:05:03, Alex Z. wrote: > On ...
3 years, 8 months ago (2017-04-20 14:18:43 UTC) #22
Alex Z.
On 2017/04/20 14:18:43, danakj wrote: > https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc > File cc/surfaces/surface_aggregator.cc (right): > > https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc#newcode763 > ...
3 years, 8 months ago (2017-04-20 14:20:16 UTC) #23
Alex Z.
https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2834553002/diff/40001/cc/surfaces/surface_aggregator.cc#newcode763 cc/surfaces/surface_aggregator.cc:763: surface->RunWillDrawCallbacks(damage_rect); On 2017/04/20 14:18:43, danakj wrote: > On 2017/04/20 ...
3 years, 8 months ago (2017-04-20 17:42:26 UTC) #26
danakj
Thanks LG just needs some documentation https://codereview.chromium.org/2834553002/diff/100001/cc/surfaces/surface.h File cc/surfaces/surface.h (right): https://codereview.chromium.org/2834553002/diff/100001/cc/surfaces/surface.h#newcode56 cc/surfaces/surface.h:56: void QueueFrame(CompositorFrame frame, ...
3 years, 8 months ago (2017-04-20 17:56:45 UTC) #27
Alex Z.
https://codereview.chromium.org/2834553002/diff/100001/cc/surfaces/surface.h File cc/surfaces/surface.h (right): https://codereview.chromium.org/2834553002/diff/100001/cc/surfaces/surface.h#newcode56 cc/surfaces/surface.h:56: void QueueFrame(CompositorFrame frame, On 2017/04/20 17:56:45, danakj wrote: > ...
3 years, 8 months ago (2017-04-20 18:10:21 UTC) #29
danakj
Thanks, LGTM
3 years, 8 months ago (2017-04-20 19:16:48 UTC) #31
Alex Z.
sadrul@chromium.org: Please review the name change in render_widget_host_view_aura_unittest.cc
3 years, 8 months ago (2017-04-20 19:25:00 UTC) #33
Fady Samuel
lgtm
3 years, 8 months ago (2017-04-20 22:02:34 UTC) #36
Fady Samuel
Given this is a mechanical change in the unit test, I think it's fine to ...
3 years, 8 months ago (2017-04-20 23:11:40 UTC) #37
sadrul
lgtm
3 years, 8 months ago (2017-04-21 03:19:03 UTC) #38
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/2834553002/120001
3 years, 8 months ago (2017-04-21 12:34:18 UTC) #40
commit-bot: I haz the power
3 years, 8 months ago (2017-04-21 12:39:26 UTC) #43
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/0838e367b020c960036c1e706b40...

Powered by Google App Engine
This is Rietveld 408576698