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

Issue 2824053003: Split SurfaceFactoryClient Into Four Interfaces (Closed)

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

Description

Split SurfaceFactoryClient Into Four Interfaces SurfaceFactoryClient has four methods and each one of them is being used by a different class: ReferencedSurfacesChanged is used by SurfaceFactory; ReturnResources is used by SurfaceResourceHolder; WillDrawSurface is called by SurfaceFactory but SurfaceFactory is simply forwarding the call from SurfaceAggregator; SetBeginFrameSource is used by FrameSinkManager. Giving the four classes their own client types allows the implementation class to be more flexible. The implementation class would no longer have to implement all four methods when only some of them are needed. SurfaceAggregator::PreWalkTree() no longer goes through SurfaceFactory when calling WillDrawSurface. BUG=707105 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2824053003 Cr-Commit-Position: refs/heads/master@{#466473} Committed: https://chromium.googlesource.com/chromium/src/+/dcf699d9ec671447372b367a375a622271396db5

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 2

Patch Set 3 : Address Nit #

Total comments: 7

Patch Set 4 : Address Comments #

Patch Set 5 : Rebase #

Total comments: 8

Patch Set 6 : Address Comments #

Total comments: 4

Patch Set 7 : Address Nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+288 lines, -155 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M cc/surfaces/BUILD.gn View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 2 3 4 4 chunks +11 lines, -3 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 4 4 chunks +11 lines, -11 lines 0 comments Download
M cc/surfaces/framesink_manager.h View 1 2 3 4 5 6 3 chunks +7 lines, -7 lines 0 comments Download
M cc/surfaces/framesink_manager.cc View 1 2 3 4 5 6 3 chunks +4 lines, -3 lines 0 comments Download
A cc/surfaces/framesink_manager_client.h View 1 2 3 4 1 chunk +22 lines, -0 lines 0 comments Download
M cc/surfaces/surface_aggregator_perftest.cc View 1 2 3 4 5 5 chunks +14 lines, -7 lines 0 comments Download
M cc/surfaces/surface_factory.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M cc/surfaces/surface_factory_client.h View 1 2 3 1 chunk +2 lines, -11 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 1 2 3 4 5 20 chunks +61 lines, -63 lines 0 comments Download
M cc/surfaces/surface_manager.h View 2 chunks +7 lines, -6 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 3 4 5 6 1 chunk +5 lines, -5 lines 0 comments Download
M cc/surfaces/surface_manager_unittest.cc View 1 2 3 4 7 chunks +27 lines, -26 lines 0 comments Download
M cc/surfaces/surface_resource_holder.h View 3 chunks +3 lines, -3 lines 0 comments Download
M cc/surfaces/surface_resource_holder.cc View 1 chunk +4 lines, -5 lines 0 comments Download
A cc/surfaces/surface_resource_holder_client.h View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
A cc/test/fake_surface_resource_holder_client.h View 1 2 3 4 5 1 chunk +31 lines, -0 lines 0 comments Download
A cc/test/fake_surface_resource_holder_client.cc View 1 2 3 4 5 1 chunk +19 lines, -0 lines 0 comments Download
A cc/test/stub_surface_factory_client.h View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (28 generated)
Alex Z.
danakj@: This CL splits SurfaceFactoryClient into 4 interfaces as we discussed this morning. PTAL.
3 years, 8 months ago (2017-04-18 20:08:08 UTC) #8
Fady Samuel
I really like this! Thanks! LGTM + nit. https://codereview.chromium.org/2824053003/diff/20001/cc/surfaces/surface_aggregator_client.h File cc/surfaces/surface_aggregator_client.h (right): https://codereview.chromium.org/2824053003/diff/20001/cc/surfaces/surface_aggregator_client.h#newcode17 cc/surfaces/surface_aggregator_client.h:17: virtual ...
3 years, 8 months ago (2017-04-18 20:13:51 UTC) #10
Alex Z.
https://codereview.chromium.org/2824053003/diff/20001/cc/surfaces/surface_aggregator_client.h File cc/surfaces/surface_aggregator_client.h (right): https://codereview.chromium.org/2824053003/diff/20001/cc/surfaces/surface_aggregator_client.h#newcode17 cc/surfaces/surface_aggregator_client.h:17: virtual void WillDrawSurface(const LocalSurfaceId& local_surface_id, On 2017/04/18 20:13:51, Fady ...
3 years, 8 months ago (2017-04-18 20:24:56 UTC) #13
danakj
https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/frame_sink_manager_client.h File cc/surfaces/frame_sink_manager_client.h (right): https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/frame_sink_manager_client.h#newcode14 cc/surfaces/frame_sink_manager_client.h:14: virtual ~FrameSinkManagerClient() {} =default https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/framesink_manager.h File cc/surfaces/framesink_manager.h (right): https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/framesink_manager.h#newcode46 ...
3 years, 8 months ago (2017-04-19 14:52:57 UTC) #16
Alex Z.
https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/surface_aggregator.cc#newcode761 cc/surfaces/surface_aggregator.cc:761: surface->factory()->surface_aggregator_client()->WillDrawSurface( On 2017/04/19 14:52:56, danakj wrote: > Ah ok ...
3 years, 8 months ago (2017-04-19 15:03:44 UTC) #17
Alex Z.
https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/frame_sink_manager_client.h File cc/surfaces/frame_sink_manager_client.h (right): https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/frame_sink_manager_client.h#newcode14 cc/surfaces/frame_sink_manager_client.h:14: virtual ~FrameSinkManagerClient() {} On 2017/04/19 14:52:56, danakj wrote: > ...
3 years, 8 months ago (2017-04-19 15:15:40 UTC) #20
danakj
Sorry for the slow reply, I had to think about this for a while. https://codereview.chromium.org/2824053003/diff/40001/cc/surfaces/surface_aggregator.cc ...
3 years, 8 months ago (2017-04-19 18:07:55 UTC) #23
Alex Z.
On 2017/04/19 18:07:55, danakj wrote: > Sorry for the slow reply, I had to think ...
3 years, 8 months ago (2017-04-19 19:56:20 UTC) #24
Alex Z.
fsamuel@, danakj@: I rebased the CL after the WillDrawCallback landed. Please take another look :).
3 years, 8 months ago (2017-04-21 14:54:22 UTC) #27
danakj
LGTM w/ a few comments https://codereview.chromium.org/2824053003/diff/80001/cc/surfaces/framesink_manager.h File cc/surfaces/framesink_manager.h (right): https://codereview.chromium.org/2824053003/diff/80001/cc/surfaces/framesink_manager.h#newcode46 cc/surfaces/framesink_manager.h:46: // Associates a FrameSinkManagerClient ...
3 years, 8 months ago (2017-04-21 15:06:48 UTC) #28
Alex Z.
https://codereview.chromium.org/2824053003/diff/80001/cc/surfaces/framesink_manager.h File cc/surfaces/framesink_manager.h (right): https://codereview.chromium.org/2824053003/diff/80001/cc/surfaces/framesink_manager.h#newcode46 cc/surfaces/framesink_manager.h:46: // Associates a FrameSinkManagerClient with the frame_sink_id it uses. ...
3 years, 8 months ago (2017-04-21 18:14:37 UTC) #32
danakj
Thanks! LGTM
3 years, 8 months ago (2017-04-21 18:16:50 UTC) #34
Fady Samuel
A couple of nits but LGTM otherwise. https://codereview.chromium.org/2824053003/diff/100001/cc/surfaces/framesink_manager.h File cc/surfaces/framesink_manager.h (left): https://codereview.chromium.org/2824053003/diff/100001/cc/surfaces/framesink_manager.h#oldcode49 cc/surfaces/framesink_manager.h:49: void RegisterSurfaceFactoryClient(const ...
3 years, 8 months ago (2017-04-21 19:04:18 UTC) #35
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/2824053003/120001
3 years, 8 months ago (2017-04-21 21:11:11 UTC) #40
Alex Z.
https://codereview.chromium.org/2824053003/diff/100001/cc/surfaces/framesink_manager.h File cc/surfaces/framesink_manager.h (left): https://codereview.chromium.org/2824053003/diff/100001/cc/surfaces/framesink_manager.h#oldcode49 cc/surfaces/framesink_manager.h:49: void RegisterSurfaceFactoryClient(const FrameSinkId& frame_sink_id, On 2017/04/21 19:04:18, Fady Samuel ...
3 years, 8 months ago (2017-04-21 21:11:32 UTC) #41
commit-bot: I haz the power
3 years, 8 months ago (2017-04-21 22:39:12 UTC) #44
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/dcf699d9ec671447372b367a375a...

Powered by Google App Engine
This is Rietveld 408576698