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

Issue 2789753002: Convert offscreen canvas to use FrameSinkManagerHost. (Closed)

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

Description

Convert offscreen canvas to use FrameSinkManagerHost. This CL switches the content/browser/ part of offscreen canvas to use FrameSinkManagerHost instead of directly accessing SurfaceMananger. OffscreenCanvasProvider(Impl) exists for the renderer to request other interfaces from the browser. The renderer uses it create both a OffscreenCanvasSurface and MojoCompositorFrameSink. This is a simplification of OffscreenCanvasCompositorFrameSinkProvider and OffscreenCanvasSurfaceFactory interfaces. RenderProcessHostImpl creates a single OffscreenCanvasProviderImpl on demand and uses it for all offscreen canvas requests from the renderer. The renderer will first request a OffscreenCanvasSurface and specify the FrameSinkId. This always happens from the main renderer thread. A OffscreenCanvasSurfaceImpl will be created for the browser side of this connection. The renderer will then likely request MojoCompositorFrameSink for the FrameSinkId, from either the main thread or a worker thread. This request is forwarded to MojoFrameSinkManager. This sets up two connections. There is a MojoCompositorFrameSink from MojoFrameSinkManager to the renderer. This is used to submit CompositorFrames. There is MojoCompositorFrameSinkPrivate from OffscreenCanvasSurfaceImpl to MojoFrameSinkManager. This gives the browser control over the CompositorFrameSink created in MojoFrameSinkManager. The render can close the OffscreenCanvasSurface and MojoCompositorFrameSink connections in any order. The assumption is they will both be closed at approximately the same time. The remaining direct access to SurfaceManager by offscreen canvas code is blocked on other features being completed. BUG=664547, 686861 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2789753002 Cr-Commit-Position: refs/heads/master@{#464381} Committed: https://chromium.googlesource.com/chromium/src/+/30b894d4f8a1c58183749fb7e0982f53dba0ba40

Patch Set 1 #

Patch Set 2 : Cleaned up a little, not submittable. #

Patch Set 3 : Reduce number of interfaces. #

Patch Set 4 : Lower similarity. #

Total comments: 2

Patch Set 5 : Rebase. #

Patch Set 6 : Rebase. #

Patch Set 7 : Simplify. #

Patch Set 8 : Add comments. #

Patch Set 9 : Switch observer back. #

Total comments: 5

Patch Set 10 : Fixes. #

Total comments: 4

Patch Set 11 : DLOG(ERROR) #

Patch Set 12 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -421 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -6 lines 0 comments Download
D content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -61 lines 0 comments Download
D content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -88 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_manager.h View 1 chunk +0 lines, -6 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_manager.cc View 1 6 7 8 1 chunk +2 lines, -26 lines 0 comments Download
D content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.h View 1 2 3 4 1 chunk +0 lines, -53 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.cc View 1 2 1 chunk +0 lines, -57 lines 0 comments Download
A + content/browser/renderer_host/offscreen_canvas_provider_impl.h View 1 2 3 4 5 6 7 1 chunk +19 lines, -12 lines 0 comments Download
A + content/browser/renderer_host/offscreen_canvas_provider_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +27 lines, -10 lines 0 comments Download
D content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h View 1 2 3 4 1 chunk +0 lines, -35 lines 0 comments Download
D content/browser/renderer_host/offscreen_canvas_surface_factory_impl.cc View 1 2 3 4 1 chunk +0 lines, -30 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.h View 1 2 3 4 5 6 7 8 9 3 chunks +17 lines, -1 line 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +4 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +6 lines, -10 lines 0 comments Download
M content/public/app/mojo/content_browser_manifest.json View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom View 1 2 3 4 5 2 chunks +10 lines, -8 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 45 (28 generated)
xlai (Olivia)
Nice refactoring work! I have no problems with content/browser/renderer_host/* and blink changes except one small ...
3 years, 8 months ago (2017-04-03 15:42:59 UTC) #4
kylechar
https://codereview.chromium.org/2789753002/diff/80001/content/browser/renderer_host/offscreen_canvas_surface_impl.cc File content/browser/renderer_host/offscreen_canvas_surface_impl.cc (right): https://codereview.chromium.org/2789753002/diff/80001/content/browser/renderer_host/offscreen_canvas_surface_impl.cc#newcode32 content/browser/renderer_host/offscreen_canvas_surface_impl.cc:32: content::GetDisplayCompositor()->UnregisterFrameSinkHierarchy( On 2017/04/03 15:42:59, xlai (Olivia) wrote: > Previously ...
3 years, 8 months ago (2017-04-03 16:00:20 UTC) #5
xlai (Olivia)
On 2017/04/03 16:00:20, kylechar wrote: > https://codereview.chromium.org/2789753002/diff/80001/content/browser/renderer_host/offscreen_canvas_surface_impl.cc > File content/browser/renderer_host/offscreen_canvas_surface_impl.cc (right): > > https://codereview.chromium.org/2789753002/diff/80001/content/browser/renderer_host/offscreen_canvas_surface_impl.cc#newcode32 > ...
3 years, 8 months ago (2017-04-05 15:05:12 UTC) #6
kylechar
On 2017/04/05 15:05:12, xlai (Olivia) wrote: > Why are the order in which these two ...
3 years, 8 months ago (2017-04-05 18:16:44 UTC) #7
kylechar
All of the prerequisite CLs are committed and this is ready for review. Let me ...
3 years, 8 months ago (2017-04-12 12:42:47 UTC) #23
Justin Novosad
lgtm fo third_party/WebKit
3 years, 8 months ago (2017-04-12 14:44:41 UTC) #24
Fady Samuel
Looks good to me once Olivia is happy with it.
3 years, 8 months ago (2017-04-12 14:52:44 UTC) #26
xlai (Olivia)
I see your point now. lgtm for offscreen_canvas* changes. Btw you need reviews from security ...
3 years, 8 months ago (2017-04-12 15:45:27 UTC) #27
kylechar
+piman for other things in content/* +tsepez for mojom/security review
3 years, 8 months ago (2017-04-12 15:54:23 UTC) #29
Tom Sepez
lgtm
3 years, 8 months ago (2017-04-12 16:12:06 UTC) #30
piman
https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode37 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:37: DCHECK(surface_impl); What makes this DCHECK valid? frame_sink_id comes from ...
3 years, 8 months ago (2017-04-12 18:08:43 UTC) #31
kylechar
https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode37 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:37: DCHECK(surface_impl); On 2017/04/12 18:08:43, piman wrote: > What makes ...
3 years, 8 months ago (2017-04-12 18:48:35 UTC) #32
piman
https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2789753002/diff/180001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode37 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:37: DCHECK(surface_impl); On 2017/04/12 18:48:35, kylechar wrote: > On 2017/04/12 ...
3 years, 8 months ago (2017-04-12 19:07:43 UTC) #33
kylechar
https://codereview.chromium.org/2789753002/diff/200001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc File content/browser/renderer_host/offscreen_canvas_provider_impl.cc (right): https://codereview.chromium.org/2789753002/diff/200001/content/browser/renderer_host/offscreen_canvas_provider_impl.cc#newcode38 content/browser/renderer_host/offscreen_canvas_provider_impl.cc:38: NOTREACHED(); On 2017/04/12 19:07:43, piman wrote: > nit: not ...
3 years, 8 months ago (2017-04-12 21:06:29 UTC) #34
piman
LGTM, thanks!
3 years, 8 months ago (2017-04-12 21:08:42 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/2789753002/240001
3 years, 8 months ago (2017-04-13 12:05:21 UTC) #42
commit-bot: I haz the power
3 years, 8 months ago (2017-04-13 12:10:26 UTC) #45
Message was sent while issue was closed.
Committed patchset #12 (id:240001) as
https://chromium.googlesource.com/chromium/src/+/30b894d4f8a1c58183749fb7e098...

Powered by Google App Engine
This is Rietveld 408576698