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

Issue 2807653003: Move Work From CompositorFrameSinkSupport() To Init() (Closed)

Created:
3 years, 8 months ago by Alex Z.
Modified:
3 years, 8 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, miu+watch_chromium.org, nasko+codewatch_chromium.org, piman+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Move Work From CompositorFrameSinkSupport() To Init() SurfaceManager::RegisterSurfaceFactoryClient calls SurfaceFactoryClient::SetBeginFrameSource() which is a virtual method. Calling virtual methods on an object during its construction in the constructor is against the style guide. Call to RegisterFrameSinkId and RegisterSurfaceFactoryClient is moved into Init(). Init() is called right after constructing CompositorFrameSinkSupport everywhere. BUG=707105 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2807653003 Cr-Commit-Position: refs/heads/master@{#463853} Committed: https://chromium.googlesource.com/chromium/src/+/962f6109508a91c8110ac855d018d334b274913e

Patch Set 1 #

Patch Set 2 : Call Init In CompositorFrameSinkSupportTest #

Patch Set 3 : Fix Android #

Patch Set 4 : Call CompositorFrameSinkSupport::Init() in SynchronosCompositorFrameSink #

Patch Set 5 : More Init #

Total comments: 2

Patch Set 6 : Contruct SurfaceFactory In Init() #

Patch Set 7 : Set needs_sync_points #

Total comments: 2

Patch Set 8 : Initialize surface_manager_ To nullptr #

Patch Set 9 : Add CompositorFrameSinkSupport::Create #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -110 lines) Patch
M android_webview/browser/hardware_renderer.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M android_webview/browser/surfaces_instance.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M ash/laser/laser_pointer_view.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M ash/laser/laser_pointer_view.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -12 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 2 3 4 5 6 7 8 3 chunks +18 lines, -9 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 4 5 6 7 8 8 chunks +40 lines, -19 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -16 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M components/exo/compositor_frame_sink.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M components/exo/compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -10 lines 0 comments Download
M components/viz/frame_sinks/gpu_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M components/viz/frame_sinks/gpu_root_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 4 chunks +13 lines, -12 lines 0 comments Download
M content/renderer/android/synchronous_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M ui/android/delegated_frame_host_android.cc View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -4 lines 0 comments Download

Messages

Total messages: 92 (52 generated)
Alex Z.
PTAL.
3 years, 8 months ago (2017-04-07 23:09:31 UTC) #5
Fady Samuel
LGTM but I bet you have some android files you need to update.
3 years, 8 months ago (2017-04-07 23:16:23 UTC) #7
Alex Z.
xlai@chromium.org: Please review changes in offscreen_canvas* sky@chromium.org: Please review changes in ash/ boliu@chromium.org: Please review ...
3 years, 8 months ago (2017-04-08 15:28:04 UTC) #17
Saman Sami
I don't fully understand what's the problem here. It seemed to worked fine so far, ...
3 years, 8 months ago (2017-04-08 16:47:40 UTC) #20
Fady Samuel
On 2017/04/08 16:47:40, Saman Sami wrote: > I don't fully understand what's the problem here. ...
3 years, 8 months ago (2017-04-08 17:39:15 UTC) #21
sadrul
On 2017/04/08 17:39:15, Fady Samuel wrote: > On 2017/04/08 16:47:40, Saman Sami wrote: > > ...
3 years, 8 months ago (2017-04-08 18:21:00 UTC) #22
Fady Samuel
On 2017/04/08 18:21:00, sadrul wrote: > On 2017/04/08 17:39:15, Fady Samuel wrote: > > On ...
3 years, 8 months ago (2017-04-08 18:33:44 UTC) #23
Saman Sami
Thank you for the explanation. I don't know what the style guide says about an ...
3 years, 8 months ago (2017-04-08 18:51:46 UTC) #24
Saman Sami
I know the style guide says don't call virtual methods in the constructor, but is ...
3 years, 8 months ago (2017-04-08 18:53:50 UTC) #25
Fady Samuel
On 2017/04/08 18:53:50, Saman Sami wrote: > I know the style guide says don't call ...
3 years, 8 months ago (2017-04-08 18:59:05 UTC) #26
reveman
components/exo lgtm
3 years, 8 months ago (2017-04-08 19:13:48 UTC) #27
Saman Sami
On 2017/04/08 18:59:05, Fady Samuel wrote: > On 2017/04/08 18:53:50, Saman Sami wrote: > > ...
3 years, 8 months ago (2017-04-08 19:56:00 UTC) #28
Alex Z.
On 2017/04/08 18:59:05, Fady Samuel wrote: > On 2017/04/08 18:53:50, Saman Sami wrote: > > ...
3 years, 8 months ago (2017-04-09 12:46:54 UTC) #32
Alex Z.
On 2017/04/08 19:56:00, Saman Sami wrote: > On 2017/04/08 18:59:05, Fady Samuel wrote: > > ...
3 years, 8 months ago (2017-04-10 13:18:44 UTC) #39
Saman Sami
> According to danakj@ from my other CL > (https://codereview.chromium.org/2795683003/): > We want to verify ...
3 years, 8 months ago (2017-04-10 14:18:46 UTC) #40
sky
ash LGTM
3 years, 8 months ago (2017-04-10 16:15:26 UTC) #41
boliu
https://codereview.chromium.org/2807653003/diff/80001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2807653003/diff/80001/cc/surfaces/compositor_frame_sink_support.h#newcode40 cc/surfaces/compositor_frame_sink_support.h:40: void Init(); it's usually better to have a public ...
3 years, 8 months ago (2017-04-10 17:02:23 UTC) #42
Alex Z.
https://codereview.chromium.org/2807653003/diff/80001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2807653003/diff/80001/cc/surfaces/compositor_frame_sink_support.h#newcode40 cc/surfaces/compositor_frame_sink_support.h:40: void Init(); On 2017/04/10 17:02:23, boliu wrote: > it's ...
3 years, 8 months ago (2017-04-10 17:34:29 UTC) #43
danakj
On 2017/04/10 14:18:46, Saman Sami wrote: > > According to danakj@ from my other CL ...
3 years, 8 months ago (2017-04-11 13:50:16 UTC) #44
Alex Z.
On 2017/04/11 13:50:16, danakj (out sick) wrote: > On 2017/04/10 14:18:46, Saman Sami wrote: > ...
3 years, 8 months ago (2017-04-11 14:22:05 UTC) #45
Alex Z.
> I'm fine with either the factory method or DCHECKs. Since we've decided to make ...
3 years, 8 months ago (2017-04-11 16:53:43 UTC) #46
Alex Z.
On 2017/04/11 16:53:43, Alex Z. wrote: > > I'm fine with either the factory method ...
3 years, 8 months ago (2017-04-11 18:35:09 UTC) #49
Alex Z.
piman@: Please review changes in *frame_host
3 years, 8 months ago (2017-04-11 18:36:01 UTC) #52
xlai (Olivia)
https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc#newcode53 cc/surfaces/compositor_frame_sink_support.cc:53: bool needs_sync_points) { Hmmm, do I miss anything here? ...
3 years, 8 months ago (2017-04-11 19:31:03 UTC) #61
Fady Samuel
https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc#newcode53 cc/surfaces/compositor_frame_sink_support.cc:53: bool needs_sync_points) { On 2017/04/11 19:31:03, xlai (Olivia) wrote: ...
3 years, 8 months ago (2017-04-11 19:35:07 UTC) #62
Alex Z.
https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2807653003/diff/120001/cc/surfaces/compositor_frame_sink_support.cc#newcode53 cc/surfaces/compositor_frame_sink_support.cc:53: bool needs_sync_points) { On 2017/04/11 19:35:07, Fady Samuel wrote: ...
3 years, 8 months ago (2017-04-11 19:38:43 UTC) #64
Saman Sami
> I don't think final is in general a correct solution here. Anyone may remove ...
3 years, 8 months ago (2017-04-11 20:30:16 UTC) #66
Alex Z.
On 2017/04/11 20:30:16, Saman Sami wrote: > > I don't think final is in general ...
3 years, 8 months ago (2017-04-11 20:38:49 UTC) #67
boliu
my parts lgtm https://codereview.chromium.org/2807653003/diff/160001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (left): https://codereview.chromium.org/2807653003/diff/160001/cc/surfaces/compositor_frame_sink_support.cc#oldcode28 cc/surfaces/compositor_frame_sink_support.cc:28: surface_manager_(surface_manager), this still needs to be ...
3 years, 8 months ago (2017-04-11 20:49:14 UTC) #72
xlai (Olivia)
lgtm for offscreen_canvas* On Tue, Apr 11, 2017 at 3:38 PM, <staraz@chromium.org> wrote: > > ...
3 years, 8 months ago (2017-04-11 20:52:20 UTC) #73
xlai (Olivia)
lgtm
3 years, 8 months ago (2017-04-11 20:54:05 UTC) #74
Alex Z.
https://codereview.chromium.org/2807653003/diff/160001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (left): https://codereview.chromium.org/2807653003/diff/160001/cc/surfaces/compositor_frame_sink_support.cc#oldcode28 cc/surfaces/compositor_frame_sink_support.cc:28: surface_manager_(surface_manager), On 2017/04/11 20:49:13, boliu wrote: > this still ...
3 years, 8 months ago (2017-04-11 20:57:17 UTC) #76
piman
LGTM. A common pattern is to have a static unique_ptr<A> Create(param, param, ...); that does ...
3 years, 8 months ago (2017-04-11 21:37:46 UTC) #78
Fady Samuel
On 2017/04/11 21:37:46, piman wrote: > LGTM. > > A common pattern is to have ...
3 years, 8 months ago (2017-04-11 21:49:05 UTC) #79
piman
On 2017/04/11 21:49:05, Fady Samuel wrote: > On 2017/04/11 21:37:46, piman wrote: > > LGTM. ...
3 years, 8 months ago (2017-04-11 21:51:42 UTC) #80
Alex Z.
On 2017/04/11 21:51:42, piman wrote: > On 2017/04/11 21:49:05, Fady Samuel wrote: > > On ...
3 years, 8 months ago (2017-04-11 22:37:49 UTC) #83
Alex Z.
On 2017/04/11 22:37:49, Alex Z. wrote: > On 2017/04/11 21:51:42, piman wrote: > > On ...
3 years, 8 months ago (2017-04-11 22:38:31 UTC) #84
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/2807653003/200001
3 years, 8 months ago (2017-04-11 22:39:27 UTC) #87
commit-bot: I haz the power
Committed patchset #9 (id:200001) as https://chromium.googlesource.com/chromium/src/+/962f6109508a91c8110ac855d018d334b274913e
3 years, 8 months ago (2017-04-12 00:22:31 UTC) #91
danakj
3 years, 8 months ago (2017-04-12 13:47:24 UTC) #92
Message was sent while issue was closed.
tyvm for solving this. LGTM

(and fwiw Init() the name is specifically suggested in the google style guide so
I think it was the right choice here)

Powered by Google App Engine
This is Rietveld 408576698