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

Issue 2938833002: Add SurfaceWillDraw notification (Closed)

Created:
3 years, 6 months ago by gklassen
Modified:
3 years, 6 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, cc-bugs_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Add SurfaceWillDraw notification Adds a SurfaceWillDraw notification to allow observers to monitor as surfaces are added to the next display frame. Viz will implement a hit-test component that will aggregate hit-test information published along with compositor frames. The aggregated data will be made available for hit testing in a shared memory object. In order to ensure that the hit-test information matches the current information for the frame it needs to know which surfaces have been added to the current DisplayFrame. A method has been added to Surface observer so that observers will be notified as surfaces are added to the Display frame. The notification is invoked during Surface Aggregation at the same place and following the same convention as the existing RunWillDrawCallback - the key difference being that this implementation allows one observer to monitor all surfaces without creating observers for each surface instance. BUG=732398 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2938833002 Cr-Commit-Position: refs/heads/master@{#479865} Committed: https://chromium.googlesource.com/chromium/src/+/a15e976b52b92c65ad791be142dbd5f11364ae07

Patch Set 1 #

Total comments: 3

Patch Set 2 : correct MojoFrameSinkManager::OnSurfaceWillDraw impl #

Total comments: 6

Patch Set 3 : correct typo in test implementation #

Patch Set 4 : improve comments based on reviewer feedback #

Total comments: 3

Patch Set 5 : improve comments based on reviewer feedback #

Patch Set 6 : rebase #

Patch Set 7 : add unit test to verify that OnSurfaceWillDraw is called only for surfaces added to the CompositorF… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -3 lines) Patch
M cc/surfaces/display_scheduler.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/display_scheduler.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 1 chunk +3 lines, -1 line 0 comments Download
M cc/surfaces/surface_aggregator_unittest.cc View 1 2 3 4 5 6 5 chunks +23 lines, -2 lines 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M cc/surfaces/surface_observer.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M cc/test/fake_surface_observer.h View 1 2 3 4 5 6 2 chunks +4 lines, -0 lines 0 comments Download
M cc/test/fake_surface_observer.cc View 1 2 3 4 5 6 3 chunks +10 lines, -0 lines 0 comments Download
M components/viz/service/frame_sinks/mojo_frame_sink_manager.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M components/viz/service/frame_sinks/mojo_frame_sink_manager.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 43 (24 generated)
rjkroege
Please write a longer CL description. https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc File components/viz/frame_sinks/mojo_frame_sink_manager.cc (right): https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc#newcode150 components/viz/frame_sinks/mojo_frame_sink_manager.cc:150: void OnSurfaceWillDraw(const cc::SurfaceId& ...
3 years, 6 months ago (2017-06-14 13:59:12 UTC) #4
rjkroege
On 2017/06/14 13:59:12, rjkroege wrote: > Please write a longer CL description. https://chromium-review.googlesource.com/506430 is a ...
3 years, 6 months ago (2017-06-14 14:00:29 UTC) #5
Fady Samuel
Generally looks good except the comment Rob made. https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc File components/viz/frame_sinks/mojo_frame_sink_manager.cc (right): https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc#newcode150 components/viz/frame_sinks/mojo_frame_sink_manager.cc:150: void ...
3 years, 6 months ago (2017-06-14 15:15:26 UTC) #8
gklassen
MojoFrameSinkManager::OnSurfaceWillDraw impl corrected. https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc File components/viz/frame_sinks/mojo_frame_sink_manager.cc (right): https://codereview.chromium.org/2938833002/diff/1/components/viz/frame_sinks/mojo_frame_sink_manager.cc#newcode150 components/viz/frame_sinks/mojo_frame_sink_manager.cc:150: void OnSurfaceWillDraw(const cc::SurfaceId& surface_id) {} On ...
3 years, 6 months ago (2017-06-14 15:16:35 UTC) #9
Fady Samuel
lgtm
3 years, 6 months ago (2017-06-14 15:24:48 UTC) #11
rjkroege
On 2017/06/14 15:24:48, Fady Samuel wrote: > lgtm lgtm
3 years, 6 months ago (2017-06-14 15:26:38 UTC) #12
rjkroege
On 2017/06/14 15:26:38, rjkroege wrote: > On 2017/06/14 15:24:48, Fady Samuel wrote: > > lgtm ...
3 years, 6 months ago (2017-06-14 15:27:24 UTC) #13
danakj
(Unlike gerrit, rietveld does not send a message when you add a reviewer, you need ...
3 years, 6 months ago (2017-06-14 18:10:57 UTC) #17
danakj
> Adds a SurfaceWillDraw notification to monitor which surfaces were > selected for the current ...
3 years, 6 months ago (2017-06-14 18:13:12 UTC) #18
gklassen
Thank you for the comments - the description is now updated.
3 years, 6 months ago (2017-06-14 18:43:01 UTC) #21
danakj
Seems good overall. It might make sense to look at splitting up SurfaceObserver at some ...
3 years, 6 months ago (2017-06-14 18:53:12 UTC) #22
gklassen
Thank you for the comments Dana ( and the help understanding how the review tool ...
3 years, 6 months ago (2017-06-14 19:29:11 UTC) #23
danakj
https://codereview.chromium.org/2938833002/diff/60001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2938833002/diff/60001/cc/surfaces/surface_aggregator.cc#newcode767 cc/surfaces/surface_aggregator.cc:767: manager_->SurfaceWillDraw(surface->surface_id()); Just realized there's no test that this is ...
3 years, 6 months ago (2017-06-15 19:51:21 UTC) #30
gklassen
https://codereview.chromium.org/2938833002/diff/60001/cc/surfaces/surface_aggregator.cc File cc/surfaces/surface_aggregator.cc (right): https://codereview.chromium.org/2938833002/diff/60001/cc/surfaces/surface_aggregator.cc#newcode767 cc/surfaces/surface_aggregator.cc:767: manager_->SurfaceWillDraw(surface->surface_id()); On 2017/06/15 19:51:20, danakj wrote: > Just realized ...
3 years, 6 months ago (2017-06-15 20:00:21 UTC) #31
gklassen
With help from Fady I have added unit tests to verify that OnSurfaceWillDraw is called ...
3 years, 6 months ago (2017-06-15 21:07:58 UTC) #34
fsamuel
lgtm
3 years, 6 months ago (2017-06-15 21:11:34 UTC) #35
danakj
Thanks! LGTM
3 years, 6 months ago (2017-06-15 21:12:33 UTC) #36
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/2938833002/120001
3 years, 6 months ago (2017-06-15 21:14:03 UTC) #39
commit-bot: I haz the power
3 years, 6 months ago (2017-06-15 22:23:18 UTC) #43
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/a15e976b52b92c65ad791be142db...

Powered by Google App Engine
This is Rietveld 408576698