|
Revamp OffscreenCanvas commit flow
This patch aims to simplify the existing work flow of OffscreenCanvas commit()
and help OffscreenCanvas transition to the new Display Compositor architecture.
This facilitates the next step of adding resizing functionality of
OffscreenCanvas.
Major changes:
1. OffscreenCanvas now use SurfaceIdAllocator in the renderer/worker, instead
of being in the browser. This is consistent with the new display compositor
architecture.
2. SurfaceLayer for HTMLCanvasElement is only created when Surface is created
in the browser; before that, a dummy SolidColorLayer is put as a placeholder.
3. CanvasSurfaceLayerBridge becomes the client of OffscreenCanvasSurfaceImpl,
so that it can receive IPC messages from browser.
4. FrameSinkId is now generated in renderer/main by CanvasSurfaceLayerBridge,
which remains unchanged throughout the lifecycle of canvas; LocalFrameId is
generated in renderer/worker by OffscreenCanvasFrameDispatcher. At this time it
is only generated once, but will be generated repeatedly when resizing
functionality is added in the future patches.
What is being simplified:
1. Sync IPC GetSurfaceId is removed, reducing overhead in HTMLCanvasElement.
transferControlToOffscreen() API call.
2. When OffscreenCanvas is transferred from main thread to worker thread, there
are now only 2 integers that need to be copied, which constitute the
FrameSinkId. Before this, there were 5 integers that need to be copied. As a
result, there are a lot less attributes that need to be kept by OffscreenCanvas
and CanvasSurfaceLayerBridge.
TBR=avi@chromium.org
BUG= 664547, 619138, 662498
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel
Committed: https://crrev.com/05aa05390801f402c336ce2156014d7ef055e9ef
Cr-Commit-Position: refs/heads/master@{#439356}
Total comments: 1
Total comments: 13
Total comments: 2
Total comments: 4
Total comments: 4
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+298 lines, -301 lines) |
Patch |
|
M |
content/browser/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_compositor_frame_sink_provider_impl.cc
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
A |
content/browser/renderer_host/offscreen_canvas_surface_factory_impl.h
|
View
|
1
2
3
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
|
A |
content/browser/renderer_host/offscreen_canvas_surface_factory_impl.cc
|
View
|
1
2
3
|
1 chunk |
+28 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+18 lines, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_impl.cc
|
View
|
1
2
3
|
2 chunks |
+28 lines, -28 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_manager.h
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_manager.cc
|
View
|
1
2
3
|
1 chunk |
+12 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_manager_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+25 lines, -35 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
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/public/app/mojo/content_browser_manifest.json
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h
|
View
|
|
2 chunks |
+1 line, -7 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp
|
View
|
|
5 chunks |
+5 lines, -21 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp
|
View
|
|
1 chunk |
+3 lines, -6 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp
|
View
|
|
1 chunk |
+0 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/html/HTMLCanvasElement.h
|
View
|
|
3 chunks |
+13 lines, -8 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+8 lines, -15 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.h
|
View
|
1
2
|
2 chunks |
+2 lines, -15 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
View
|
|
2 chunks |
+3 lines, -20 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+31 lines, -9 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+51 lines, -15 lines |
0 comments
|
Download
|
|
D |
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
|
View
|
|
1 chunk |
+0 lines, -81 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h
|
View
|
1
2
3
|
3 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+2 lines, -8 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/blink_typemaps.gni
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/platform/modules/offscreencanvas/offscreen_canvas_surface.mojom
|
View
|
1
2
3
4
|
1 chunk |
+17 lines, -7 lines |
0 comments
|
Download
|
Total messages: 49 (31 generated)
|