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

Issue 2388753003: Introduce cc::LocalFrameId and use in SurfaceFactory (Closed)

Created:
4 years, 2 months ago by Fady Samuel
Modified:
4 years, 2 months ago
CC:
Aaron Boodman, abarth-chromium, ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), haraken, jam, jbauman+watch_chromium.org, jbroman, Justin Novosad, kalyank, nasko+codewatch_chromium.org, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, qsr+mojo_chromium.org, rjkroege, rwlbuis, Stephen Chennney, sievers+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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}

Patch Set 1 #

Patch Set 2 : All SurfaceFactory methods use LocalFrameId #

Patch Set 3 : SurfaceIdAllocator::GenerateId returns LocalFrameId #

Patch Set 4 : Rebased #

Patch Set 5 : cc_unittests compiles #

Patch Set 6 : Fix unit test #

Patch Set 7 : Fix content_unittests #

Patch Set 8 : Fix cc perftests #

Patch Set 9 : Fixed webkit_unittests #

Patch Set 10 : Fix blimp #

Patch Set 11 : Fix android build #

Patch Set 12 : Fix RenderWidgetHostViewAuraTest #

Patch Set 13 : Fix RenderWidgetHostViewGuest #

Patch Set 14 : Fix exo_unittests #

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

Messages

Total messages: 56 (44 generated)
Fady Samuel
Apologies for the large CL. It's actually fairly mechanical. LocalFrameId and SurfaceFactory is where the ...
4 years, 2 months ago (2016-10-05 20:52:12 UTC) #34
Fady Samuel
+reveman@ for exo
4 years, 2 months ago (2016-10-05 20:52:34 UTC) #36
Fady Samuel
-bolian +boliu
4 years, 2 months ago (2016-10-05 20:53:04 UTC) #38
Tom Sepez
ipc lgtm
4 years, 2 months ago (2016-10-05 21:08:21 UTC) #41
enne (OOO)
lgtm https://codereview.chromium.org/2388753003/diff/260001/cc/surfaces/surface_factory.h File cc/surfaces/surface_factory.h (right): https://codereview.chromium.org/2388753003/diff/260001/cc/surfaces/surface_factory.h#newcode50 cc/surfaces/surface_factory.h:50: void Create(const LocalFrameId& local_frame_id); Yeah, this is nice. ...
4 years, 2 months ago (2016-10-06 00:28:11 UTC) #44
jam
lgtm
4 years, 2 months ago (2016-10-06 00:53:45 UTC) #45
Fady Samuel
I'm going to TBR everyone else (dtrainor@, reveman@, sky@, boliu@) as these files are changed ...
4 years, 2 months ago (2016-10-06 00:57:02 UTC) #47
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/2388753003/260001
4 years, 2 months ago (2016-10-06 00:58:49 UTC) #50
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 2 months ago (2016-10-06 01:08:56 UTC) #52
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/01f3620439dc6473c838e8e4700e4be84d1b4423 Cr-Commit-Position: refs/heads/master@{#423371}
4 years, 2 months ago (2016-10-06 01:10:32 UTC) #54
boliu
belated lgtm
4 years, 2 months ago (2016-10-06 02:15:51 UTC) #55
reveman
4 years, 2 months ago (2016-10-06 08:04:00 UTC) #56
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698