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

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)

Created:
4 years, 2 months ago by Fady Samuel
Modified:
4 years, 2 months ago
CC:
anandc+watch-blimp_chromium.org, android-webview-reviews_chromium.org, bgoldman+watch-blimp_chromium.org, cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, dtrainor+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, jbauman+watch_chromium.org, jessicag+watch-blimp_chromium.org, kalyank, khushalsagar+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, lethalantidote+watch-blimp_chromium.org, maniscalco+watch-blimp_chromium.org, marcinjb+watch-blimp_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nyquist+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, piman+watch_chromium.org, rjkroege, scf+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, sievers+watch_chromium.org, sriramsr+watch-blimp_chromium.org, steimel+watch-blimp_chromium.org, Ian Vollick
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId This CL takes us two steps along the long windy road to an out of process display compositor. 1. In the near future, SurfaceIds will be allocated in clients in order to avoid sync IPCs for offscreen canvas. Thus, we need to reduce our reliance on SurfaceIdAllocator. SurfaceIdAllocator is often used simply to find out the frame_sink_id(). This CL gives owners of SurfaceIdAllocator a FrameSinkId directly and removes that accessor from the ID allocator. This significantly reduces usage of SurfaceIdAllocator. 2. SurfaceFactory's role was not well defined previously. It practice, it corresponds to a single CompositorFrameSink but in tests, surface IDs with different FrameSinkIds were submitting CompositorFrames to the same SurfaceFactory. This CL establishes the invariant that a SurfaceFactory belongs to a single CompositorFrameSink. In the near future, we won't need to pass a SurfaceFactory a full SurfaceId anymore, we can simply give it the "LocalFrameId" part and assume a constant FrameSinkId. This will reduce the the data needed to send to FrameSinkObservers from SurfaceFactories and from frame sources to SurfaceFactories. BUG=647852 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b Cr-Commit-Position: refs/heads/master@{#422688}

Patch Set 1 #

Patch Set 2 : Remove SurfaceIdAllocator::frame_sink_id #

Patch Set 3 : Establish invariant and fix unittests #

Patch Set 4 : Fix exo and TestRenderViewHost #

Patch Set 5 : Fix TestRenderViewHost + Mac #

Total comments: 8

Patch Set 6 : Make FrameSinkId const #

Patch Set 7 : Rebased #

Patch Set 8 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+411 lines, -349 lines) Patch
M android_webview/browser/hardware_renderer.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M android_webview/browser/hardware_renderer.cc View 1 4 chunks +10 lines, -10 lines 0 comments Download
M android_webview/browser/surfaces_instance.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M android_webview/browser/surfaces_instance.cc View 1 4 chunks +9 lines, -10 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M blimp/client/core/compositor/blimp_compositor.cc View 1 4 chunks +7 lines, -7 lines 0 comments Download
M blimp/client/support/compositor/blimp_embedder_compositor.h View 1 3 chunks +3 lines, -2 lines 0 comments Download
M blimp/client/support/compositor/blimp_embedder_compositor.cc View 1 3 chunks +6 lines, -7 lines 0 comments Download
M cc/output/compositor_frame_sink.h View 1 1 chunk +2 lines, -3 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.h View 1 3 chunks +5 lines, -3 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink.cc View 1 2 3 4 5 6 7 7 chunks +13 lines, -13 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink_unittest.cc View 1 3 chunks +3 lines, -5 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M cc/surfaces/surface_aggregator_perftest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/surface_aggregator_unittest.cc View 1 2 37 chunks +51 lines, -40 lines 0 comments Download
M cc/surfaces/surface_factory.h View 2 chunks +6 lines, -1 line 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 7 chunks +12 lines, -4 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M cc/surfaces/surface_hittest_unittest.cc View 1 2 19 chunks +80 lines, -51 lines 0 comments Download
M cc/surfaces/surface_id_allocator.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M cc/surfaces/surface_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/surfaces/surfaces_pixeltest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/test_compositor_frame_sink.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 3 4 5 6 7 4 chunks +10 lines, -14 lines 0 comments Download
M components/exo/surface.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/exo/surface.cc View 1 2 3 2 chunks +8 lines, -8 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 chunks +5 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 8 chunks +19 lines, -19 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 chunks +6 lines, -5 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.mm View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 3 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 7 chunks +10 lines, -11 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 1 7 chunks +15 lines, -16 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 2 chunks +4 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/android/synchronous_compositor_frame_sink.cc View 1 5 chunks +9 lines, -12 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 3 chunks +10 lines, -13 lines 0 comments Download
M services/ui/surfaces/compositor_frame_sink.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/surfaces/compositor_frame_sink.cc View 1 2 3 4 5 6 2 chunks +10 lines, -13 lines 0 comments Download
M services/ui/ws/server_window_surface.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M services/ui/ws/server_window_surface.cc View 1 2 3 4 5 6 2 chunks +12 lines, -13 lines 0 comments Download
M ui/android/delegated_frame_host_android.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ui/android/delegated_frame_host_android.cc View 1 6 chunks +13 lines, -16 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 2 chunks +3 lines, -5 lines 0 comments Download
M ui/compositor/compositor.cc View 1 4 chunks +16 lines, -18 lines 0 comments Download
M ui/compositor/compositor_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (30 generated)
Fady Samuel
4 years, 2 months ago (2016-10-01 20:52:11 UTC) #5
Fady Samuel
+boliu: android things +sky: ui and services/ui things +enne: cc things +dtrainor: blimp things +jam: ...
4 years, 2 months ago (2016-10-01 20:53:09 UTC) #7
Fady Samuel
+reveman@ for exo
4 years, 2 months ago (2016-10-01 23:38:55 UTC) #22
reveman
components/exo lgtm
4 years, 2 months ago (2016-10-02 12:58:27 UTC) #23
boliu
lgtm
4 years, 2 months ago (2016-10-03 05:47:04 UTC) #24
jam
On 2016/10/01 20:53:09, Fady Samuel wrote: > +boliu: android things > +sky: ui and services/ui ...
4 years, 2 months ago (2016-10-03 17:40:36 UTC) #25
enne (OOO)
lgtm
4 years, 2 months ago (2016-10-03 18:06:38 UTC) #26
enne (OOO)
I'm not a content/ owner, but I took a look at the whole patch and ...
4 years, 2 months ago (2016-10-03 18:14:24 UTC) #27
jam
On 2016/10/03 18:14:24, enne wrote: > I'm not a content/ owner, but I took a ...
4 years, 2 months ago (2016-10-03 18:19:41 UTC) #28
sky
LGTM https://codereview.chromium.org/2383373002/diff/80001/services/ui/surfaces/display_compositor.h File services/ui/surfaces/display_compositor.h (right): https://codereview.chromium.org/2383373002/diff/80001/services/ui/surfaces/display_compositor.h#newcode71 services/ui/surfaces/display_compositor.h:71: cc::FrameSinkId frame_sink_id_; If possible make this const. https://codereview.chromium.org/2383373002/diff/80001/services/ui/ws/server_window_surface.h ...
4 years, 2 months ago (2016-10-03 19:18:26 UTC) #29
Fady Samuel
Addressed comments. https://codereview.chromium.org/2383373002/diff/80001/services/ui/surfaces/display_compositor.h File services/ui/surfaces/display_compositor.h (right): https://codereview.chromium.org/2383373002/diff/80001/services/ui/surfaces/display_compositor.h#newcode71 services/ui/surfaces/display_compositor.h:71: cc::FrameSinkId frame_sink_id_; On 2016/10/03 19:18:25, sky wrote: ...
4 years, 2 months ago (2016-10-03 19:45:29 UTC) #30
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/2383373002/120001
4 years, 2 months ago (2016-10-03 22:12:08 UTC) #37
commit-bot: I haz the power
Failed to apply patch for cc/test/test_compositor_frame_sink.cc: While running git apply --index -3 -p1; error: patch ...
4 years, 2 months ago (2016-10-03 23:35:22 UTC) #39
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/2383373002/140001
4 years, 2 months ago (2016-10-04 02:00:23 UTC) #42
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-04 03:22:46 UTC) #44
commit-bot: I haz the power
4 years, 2 months ago (2016-10-04 03:28:28 UTC) #46
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/b6acafa1d1e2107f66deeed51865fb233b03641b
Cr-Commit-Position: refs/heads/master@{#422688}

Powered by Google App Engine
This is Rietveld 408576698