|
Introduce cc::LocalFrameId and use in SurfaceFactory
This CL introduces cc::LocalFrameId which is the (local_id, nonce)
part of the SurfaceId. This is the part that can be allocated by
the renderer asynchronously on resize or initial creation. The
FrameSinkId component of a SurfaceId remains constant across resizes
as it identifies a FrameSink/FrameSource as opposed to individual
surfaces.
Since SurfaceFactory is tied to a single FrameSink now, passing in
SurfaceIds including FrameSinkIds is redundant and invites API
abuse by passing in SurfaceIds that don't belong to the given
FrameSink. This will result in a DCHECK, but in production, once
SurfaceIds are allocated in the renderer, then one client could
clobber a surface of another client (albeit this is unlikely due to the
nonce), or it could confuse surface ID routing and fool the parent
to embed a surface ID belonging to a different client (since
FrameSinkIds are guessable).
This change eliminates this concern by making it impossible to pass a
different FrameSinkId into SurfaceFactory; the API simply does not allow
for it.
BUG= 647852
TBR=dtrainor@chromium.org, reveman@chromium.org, sky@chromium.org, boliu@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed: https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423
Cr-Commit-Position: refs/heads/master@{#423371}
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1028 lines, -743 lines) |
Patch |
|
M |
android_webview/browser/hardware_renderer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
android_webview/browser/hardware_renderer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
3 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
android_webview/browser/surfaces_instance.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
android_webview/browser/surfaces_instance.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
blimp/client/core/compositor/blimp_compositor.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
blimp/client/core/compositor/blimp_compositor.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
5 chunks |
+13 lines, -11 lines |
0 comments
|
Download
|
|
M |
cc/ipc/BUILD.gn
|
View
|
|
2 chunks |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits.h
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits.cc
|
View
|
|
3 chunks |
+41 lines, -14 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
A |
cc/ipc/local_frame_id.mojom
|
View
|
|
1 chunk |
+16 lines, -0 lines |
0 comments
|
Download
|
|
A |
cc/ipc/local_frame_id.typemap
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
|
A |
cc/ipc/local_frame_id_struct_traits.h
|
View
|
|
1 chunk |
+32 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/struct_traits_unittest.cc
|
View
|
|
4 chunks |
+8 lines, -9 lines |
0 comments
|
Download
|
|
M |
cc/ipc/surface_id.mojom
|
View
|
|
1 chunk |
+9 lines, -18 lines |
0 comments
|
Download
|
|
M |
cc/ipc/surface_id_struct_traits.h
|
View
|
|
2 chunks |
+10 lines, -4 lines |
0 comments
|
Download
|
|
M |
cc/ipc/typemaps.gni
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/layers/surface_layer_impl_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
cc/layers/surface_layer_unittest.cc
|
View
|
|
7 chunks |
+13 lines, -9 lines |
0 comments
|
Download
|
|
M |
cc/quads/draw_quad_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/BUILD.gn
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/direct_compositor_frame_sink.h
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/direct_compositor_frame_sink.cc
|
View
|
1
2
|
4 chunks |
+10 lines, -12 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/display_scheduler_unittest.cc
|
View
|
|
11 chunks |
+25 lines, -25 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/display_unittest.cc
|
View
|
1
2
3
4
|
19 chunks |
+21 lines, -20 lines |
0 comments
|
Download
|
|
A |
cc/surfaces/local_frame_id.h
|
View
|
1
|
1 chunk |
+61 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_aggregator.cc
|
View
|
1
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_aggregator_perftest.cc
|
View
|
1
2
3
4
5
6
7
|
4 chunks |
+16 lines, -15 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_aggregator_unittest.cc
|
View
|
1
2
3
4
5
|
74 chunks |
+264 lines, -191 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_factory.h
|
View
|
1
|
2 chunks |
+9 lines, -9 lines |
1 comment
|
Download
|
|
M |
cc/surfaces/surface_factory.cc
|
View
|
1
|
2 chunks |
+18 lines, -23 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_factory_client.h
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_factory_unittest.cc
|
View
|
1
2
3
4
|
16 chunks |
+57 lines, -48 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_hittest_unittest.cc
|
View
|
1
2
3
4
|
20 chunks |
+62 lines, -48 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_id.h
|
View
|
|
2 chunks |
+16 lines, -19 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_id_allocator.h
|
View
|
1
2
|
1 chunk |
+2 lines, -4 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_id_allocator.cc
|
View
|
1
2
|
1 chunk |
+3 lines, -4 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surface_unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+8 lines, -13 lines |
0 comments
|
Download
|
|
M |
cc/surfaces/surfaces_pixeltest.cc
|
View
|
1
2
3
4
|
11 chunks |
+32 lines, -27 lines |
0 comments
|
Download
|
|
M |
cc/test/test_compositor_frame_sink.h
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
cc/test/test_compositor_frame_sink.cc
|
View
|
1
2
|
6 chunks |
+15 lines, -14 lines |
0 comments
|
Download
|
|
M |
components/exo/surface.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
4 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
|
M |
components/exo/surface.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
9 chunks |
+23 lines, -20 lines |
0 comments
|
Download
|
|
M |
components/exo/surface_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_widget_host_view_child_frame.h
|
View
|
1
2
|
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
|
10 chunks |
+26 lines, -23 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_widget_host_view_guest.cc
|
View
|
1
2
|
4 chunks |
+13 lines, -12 lines |
0 comments
|
Download
|
|
M |
content/browser/frame_host/render_widget_host_view_guest_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
4 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/delegated_frame_host.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+10 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/delegated_frame_host.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
17 chunks |
+41 lines, -35 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc
|
View
|
1
|
3 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/offscreen_canvas_surface_impl.cc
|
View
|
1
2
|
2 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/renderer/android/synchronous_compositor_frame_sink.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/renderer/android/synchronous_compositor_frame_sink.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
4 chunks |
+15 lines, -14 lines |
0 comments
|
Download
|
|
M |
content/test/test_render_view_host.h
|
View
|
1
2
|
2 chunks |
+0 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/test/test_render_view_host.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -4 lines |
0 comments
|
Download
|
|
M |
services/ui/surfaces/compositor_frame_sink.h
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
services/ui/surfaces/compositor_frame_sink.cc
|
View
|
1
2
|
2 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
services/ui/ws/frame_generator.cc
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
services/ui/ws/server_window_surface.h
|
View
|
1
2
3
|
3 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
services/ui/ws/server_window_surface.cc
|
View
|
1
2
3
|
3 chunks |
+11 lines, -8 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridgeTest.cpp
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
View
|
1
2
3
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
ui/android/delegated_frame_host_android.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
ui/android/delegated_frame_host_android.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
5 chunks |
+15 lines, -13 lines |
0 comments
|
Download
|
|
M |
ui/compositor/compositor.h
|
View
|
1
2
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
|
M |
ui/compositor/compositor.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
Total messages: 56 (44 generated)
|