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

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)

Created:
3 years, 10 months ago by Alex Z.
Modified:
3 years, 10 months ago
CC:
cc-bugs_chromium.org, chromium-reviews, darin-cc_chromium.org, jam
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink With FrameGenerator and GpuDisplayCompositorFrameSink having a DisplayPrivate interface, CompositorFrameSinkSupport doesn't need to know about cc::Display. cc::Display::SetLocalSurfaceId() checks and early returns if neither local surface id nor device scale factor has changed. Therefore, FrameGenerator's calling SetLocalSurfaceId() before every SubmitCompositorFrame() doesn't result in extra work. This CL also fixes bug 689869. The bug was caused by https://codereview.chromium.org/2612083002/. In the previous CL, cc::Display::Initialize() was called inside CompositorFrameSinkSupport(), where CompositorFrameSinkSupport was passed as DisplayClient. CompositorFrameSinkSupport::DisplayOutputSurfaceLost() wasn't doing anything so the CompositorFrameSinkClient didn't get notified when we lost CompositorFrameSink. For bug 676070, 689916 (flaky tests): The two bugs are caused by CompositorFrameSinkSupport doesn't stop observing BeginFrameSource when it should. By notifying client on output surface lost correctly, DirectCompositorFrameSink detaches from client and destroys CompositorFrameSinkSupport (and hence stop observing BeginFrameSource) at the right time. BUG=688042, 689869, 676070, 689916 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2683583005 Cr-Commit-Position: refs/heads/master@{#449777} Committed: https://chromium.googlesource.com/chromium/src/+/04c49bf4845979aeff2c740a168de0a936b015af

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 2

Patch Set 3 : addressed comments #

Total comments: 20

Patch Set 4 : Addressed comments #

Patch Set 5 : addressed comments #

Total comments: 4

Patch Set 6 : addressed comments #

Total comments: 12

Patch Set 7 : Added TODO to DisplayOutputSurfaceLost #

Patch Set 8 : Add DCHECK(display_) in DirectCompositorFrameSink #

Patch Set 9 : addressed comments #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -106 lines) Patch
M cc/ipc/display_compositor.mojom View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 2 3 4 5 6 7 8 9 6 chunks +7 lines, -25 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 4 5 6 7 8 9 6 chunks +7 lines, -24 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +7 lines, -6 lines 0 comments Download
M components/display_compositor/gpu_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 9 4 chunks +2 lines, -11 lines 0 comments Download
M components/display_compositor/gpu_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -19 lines 0 comments Download
M components/display_compositor/gpu_display_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 9 3 chunks +19 lines, -1 line 0 comments Download
M components/display_compositor/gpu_display_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 1 chunk +35 lines, -13 lines 0 comments Download
M components/display_compositor/gpu_offscreen_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -4 lines 0 comments Download
M components/exo/compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -1 line 0 comments Download
M components/exo/surface.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -2 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 79 (51 generated)
Alex Z.
xidachen@chromium.org: Please review changes in offscreen canvas danakj@chromium.org: Please review changes in cc/surfaces and components/display_compositor
3 years, 10 months ago (2017-02-08 17:30:01 UTC) #10
Fady Samuel
I think you need to update exo too? https://cs.chromium.org/chromium/src/components/exo/compositor_frame_sink.cc?l=21 Otherwise, this generally LGTM https://codereview.chromium.org/2683583005/diff/40001/components/display_compositor/gpu_display_compositor_frame_sink.cc File ...
3 years, 10 months ago (2017-02-08 17:54:43 UTC) #16
Alex Z.
https://codereview.chromium.org/2683583005/diff/40001/components/display_compositor/gpu_display_compositor_frame_sink.cc File components/display_compositor/gpu_display_compositor_frame_sink.cc (right): https://codereview.chromium.org/2683583005/diff/40001/components/display_compositor/gpu_display_compositor_frame_sink.cc#newcode70 components/display_compositor/gpu_display_compositor_frame_sink.cc:70: void GpuDisplayCompositorFrameSink::DisplayOutputSurfaceLost() {} On 2017/02/08 17:54:42, Fady Samuel wrote: ...
3 years, 10 months ago (2017-02-08 18:16:58 UTC) #18
Alex Z.
reveman@chromium.org: Please review changes in components/exo
3 years, 10 months ago (2017-02-08 18:17:16 UTC) #20
Fady Samuel
Could you please also add in this description what bug this fixes? Thanks!
3 years, 10 months ago (2017-02-08 18:53:08 UTC) #22
Alex Z.
On 2017/02/08 18:53:08, Fady Samuel wrote: > Could you please also add in this description ...
3 years, 10 months ago (2017-02-08 19:02:57 UTC) #24
danakj
https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc#newcode27 cc/surfaces/compositor_frame_sink_support.cc:27: bool has_display) it seems a bit unmeaningful to call ...
3 years, 10 months ago (2017-02-08 19:23:38 UTC) #30
xidachen
-xidachen@, +xlai@ xlai@: please review offscreen canvas changes.
3 years, 10 months ago (2017-02-08 19:25:47 UTC) #33
xlai (Olivia)
https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc#newcode119 cc/surfaces/compositor_frame_sink_support.cc:119: // If this is a display root surface and ...
3 years, 10 months ago (2017-02-08 20:11:34 UTC) #34
Alex Z.
https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc File cc/surfaces/compositor_frame_sink_support.cc (right): https://codereview.chromium.org/2683583005/diff/60001/cc/surfaces/compositor_frame_sink_support.cc#newcode27 cc/surfaces/compositor_frame_sink_support.cc:27: bool has_display) On 2017/02/08 19:23:38, danakj (slow) wrote: > ...
3 years, 10 months ago (2017-02-08 21:26:47 UTC) #38
Fady Samuel
https://codereview.chromium.org/2683583005/diff/100001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2683583005/diff/100001/cc/surfaces/compositor_frame_sink_support.h#newcode120 cc/surfaces/compositor_frame_sink_support.h:120: // |has_display_| is true if the CompositorFrameSinkSupport submits This ...
3 years, 10 months ago (2017-02-08 21:37:46 UTC) #40
Alex Z.
https://codereview.chromium.org/2683583005/diff/100001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2683583005/diff/100001/cc/surfaces/compositor_frame_sink_support.h#newcode120 cc/surfaces/compositor_frame_sink_support.h:120: // |has_display_| is true if the CompositorFrameSinkSupport submits On ...
3 years, 10 months ago (2017-02-08 21:41:43 UTC) #42
danakj
https://codereview.chromium.org/2683583005/diff/60001/components/display_compositor/gpu_display_compositor_frame_sink.cc File components/display_compositor/gpu_display_compositor_frame_sink.cc (right): https://codereview.chromium.org/2683583005/diff/60001/components/display_compositor/gpu_display_compositor_frame_sink.cc#newcode70 components/display_compositor/gpu_display_compositor_frame_sink.cc:70: void GpuDisplayCompositorFrameSink::DisplayOutputSurfaceLost() {} On 2017/02/08 21:26:47, StarAZ1 wrote: > ...
3 years, 10 months ago (2017-02-08 21:42:44 UTC) #44
Alex Z.
msw@chromium.org: Please review changes in frame_generator.cc tsepez@: Please review display_compositor.mojom
3 years, 10 months ago (2017-02-08 21:42:48 UTC) #46
xlai (Olivia)
lgtm with nits https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/direct_compositor_frame_sink.cc File cc/surfaces/direct_compositor_frame_sink.cc (right): https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/direct_compositor_frame_sink.cc#newcode80 cc/surfaces/direct_compositor_frame_sink.cc:80: // Display's context. Add DCHECK(display_);
3 years, 10 months ago (2017-02-08 21:48:36 UTC) #48
Alex Z.
https://codereview.chromium.org/2683583005/diff/60001/components/display_compositor/gpu_display_compositor_frame_sink.cc File components/display_compositor/gpu_display_compositor_frame_sink.cc (right): https://codereview.chromium.org/2683583005/diff/60001/components/display_compositor/gpu_display_compositor_frame_sink.cc#newcode70 components/display_compositor/gpu_display_compositor_frame_sink.cc:70: void GpuDisplayCompositorFrameSink::DisplayOutputSurfaceLost() {} On 2017/02/08 21:42:43, danakj (slow) wrote: ...
3 years, 10 months ago (2017-02-08 21:50:09 UTC) #49
danakj
https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/compositor_frame_sink_support.h#newcode123 cc/surfaces/compositor_frame_sink_support.h:123: // texture/bitmap. (e.g. OffscreenCanvasCompositorFrameSink and These class names may ...
3 years, 10 months ago (2017-02-08 21:54:41 UTC) #50
Alex Z.
https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/direct_compositor_frame_sink.cc File cc/surfaces/direct_compositor_frame_sink.cc (right): https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/direct_compositor_frame_sink.cc#newcode80 cc/surfaces/direct_compositor_frame_sink.cc:80: // Display's context. On 2017/02/08 21:48:35, xlai (Olivia) wrote: ...
3 years, 10 months ago (2017-02-08 21:58:10 UTC) #53
Alex Z.
https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/compositor_frame_sink_support.h File cc/surfaces/compositor_frame_sink_support.h (right): https://codereview.chromium.org/2683583005/diff/120001/cc/surfaces/compositor_frame_sink_support.h#newcode123 cc/surfaces/compositor_frame_sink_support.h:123: // texture/bitmap. (e.g. OffscreenCanvasCompositorFrameSink and On 2017/02/08 21:54:40, danakj ...
3 years, 10 months ago (2017-02-08 22:07:52 UTC) #55
msw
frame_generator.cc rubber stamp lgtm
3 years, 10 months ago (2017-02-08 22:13:00 UTC) #56
danakj
https://codereview.chromium.org/2683583005/diff/120001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2683583005/diff/120001/services/ui/ws/frame_generator.cc#newcode92 services/ui/ws/frame_generator.cc:92: display_private_->SetLocalSurfaceId(local_surface_id_, On 2017/02/08 22:07:52, StarAZ1 wrote: > On 2017/02/08 ...
3 years, 10 months ago (2017-02-08 23:31:17 UTC) #60
Tom Sepez
mojom lgtm
3 years, 10 months ago (2017-02-09 17:18:19 UTC) #61
Alex Z.
https://codereview.chromium.org/2683583005/diff/120001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2683583005/diff/120001/services/ui/ws/frame_generator.cc#newcode92 services/ui/ws/frame_generator.cc:92: display_private_->SetLocalSurfaceId(local_surface_id_, On 2017/02/08 23:31:16, danakj wrote: > On 2017/02/08 ...
3 years, 10 months ago (2017-02-10 19:44:36 UTC) #67
Fady Samuel
LGTM
3 years, 10 months ago (2017-02-10 19:49:19 UTC) #68
reveman
lgtm
3 years, 10 months ago (2017-02-10 19:56:26 UTC) #69
danakj
Thanks for the explanation, LGTM
3 years, 10 months ago (2017-02-10 23:04:59 UTC) #73
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/2683583005/230001
3 years, 10 months ago (2017-02-10 23:05:58 UTC) #76
commit-bot: I haz the power
3 years, 10 months ago (2017-02-10 23:11:18 UTC) #79
Message was sent while issue was closed.
Committed patchset #10 (id:230001) as
https://chromium.googlesource.com/chromium/src/+/04c49bf4845979aeff2c740a168d...

Powered by Google App Engine
This is Rietveld 408576698