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

Issue 2166423002: ui::ContextFactory should not create SurfaceIdAllocators (Closed)

Created:
4 years, 5 months ago by Fady Samuel
Modified:
4 years, 5 months ago
Reviewers:
reveman, sky, boliu, piman, danakj, jbauman
CC:
cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, nasko+codewatch_chromium.org, piman+watch_chromium.org, sadrul, sievers+watch_chromium.org, tfarina, Ian Vollick
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ui::ContextFactory should not create SurfaceIdAllocators In the near future, SurfaceIdAllocator will live in clients and so ui::ContextFactory should not create a SurfaceIdAllocator directly. Instead, ui::ContextFactory allocates a new surface client ID, which can be used to create a SurfaceIdAllocator in clients. This CL also moves calls to RegisterSurfaceClientId and InvalidateSurfaceClientId close to RegisterSurfaceClientFactory and UnregisterSurfaceClientFactory respectively. In a subsequent CL, these two will be merged together into SurfaceFactory. BUG=627283, 629940 TBR=reveman@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/0fd36aebebd0d908cd9f7fcc51d45b68d1c73e9f Cr-Commit-Position: refs/heads/master@{#407273}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fixed Android + Addressed Antoine's comment #

Total comments: 4

Patch Set 3 : Move surface client ID registration out #

Patch Set 4 : Fixed for android #

Total comments: 2

Patch Set 5 : Addressed Antoine's nit #

Patch Set 6 : Fix some unit tests #

Patch Set 7 : Fix exo #

Patch Set 8 : No-op #

Patch Set 9 : Fixed TestDelegatingOutputSurface #

Total comments: 2

Patch Set 10 : Addressed Dana's comment #

Patch Set 11 : Move RegisterSurfaceClientId to BindToClient #

Patch Set 12 : Fix RenderWidgetHostViewAndroid #

Patch Set 13 : Fixed SynchronousCompositorOutputSurface #

Total comments: 2

Patch Set 14 : Addressed Dana's nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -100 lines) Patch
M android_webview/browser/hardware_renderer.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download
M android_webview/browser/surfaces_instance.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/surfaces_instance.cc View 1 2 3 2 chunks +6 lines, -7 lines 0 comments Download
M ash/sysui/stub_context_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M ash/sysui/stub_context_factory.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M cc/surfaces/surface_id_allocator.h View 1 2 1 chunk +0 lines, -13 lines 0 comments Download
M cc/surfaces/surface_id_allocator.cc View 1 2 1 chunk +1 line, -9 lines 0 comments Download
M cc/test/test_delegating_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +3 lines, -2 lines 0 comments Download
M components/exo/surface.cc View 1 2 3 4 5 6 2 chunks +10 lines, -3 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -7 lines 0 comments Download
M content/browser/compositor/surface_utils.h View 1 chunk +2 lines, -5 lines 0 comments Download
M content/browser/compositor/surface_utils.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 4 chunks +8 lines, -9 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.cc View 1 2 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/renderer_host/offscreen_canvas_surface_impl.cc View 1 2 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -2 lines 0 comments Download
M content/renderer/android/synchronous_compositor_output_surface.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +5 lines, -2 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 1 chunk +14 lines, -3 lines 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M services/ui/ws/server_window_surface.cc View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M ui/compositor/compositor.h View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 4 chunks +11 lines, -1 line 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 chunk +2 lines, -7 lines 0 comments Download
M ui/views/mus/surface_context_factory.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/views/mus/surface_context_factory.cc View 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 76 (45 generated)
Fady Samuel
+piman@ for content +sky@ for ui and ash.
4 years, 5 months ago (2016-07-21 16:53:29 UTC) #3
piman
I was thrown off by the CL description at first... You say "ui::Compositor should not ...
4 years, 5 months ago (2016-07-21 17:07:11 UTC) #8
Fady Samuel
Yea, that shouldn't said ContextFactory not Compositor. Fixed + Addressed your comment! PTAL Antoine! https://codereview.chromium.org/2166423002/diff/1/content/browser/compositor/gpu_process_transport_factory.cc ...
4 years, 5 months ago (2016-07-21 17:15:01 UTC) #10
piman
https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc#newcode693 content/browser/compositor/gpu_process_transport_factory.cc:693: GetSurfaceManager()->RegisterSurfaceClientId(client_id); So, the previous code also relied on SurfaceIdAllocator::RegisterSurfaceClientId ...
4 years, 5 months ago (2016-07-21 17:19:47 UTC) #15
Fady Samuel
https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc#newcode693 content/browser/compositor/gpu_process_transport_factory.cc:693: GetSurfaceManager()->RegisterSurfaceClientId(client_id); On 2016/07/21 17:19:47, piman wrote: > So, the ...
4 years, 5 months ago (2016-07-21 17:22:23 UTC) #16
piman
https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc#newcode693 content/browser/compositor/gpu_process_transport_factory.cc:693: GetSurfaceManager()->RegisterSurfaceClientId(client_id); On 2016/07/21 17:22:23, Fady Samuel wrote: > On ...
4 years, 5 months ago (2016-07-21 17:28:40 UTC) #17
piman
https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc#newcode693 content/browser/compositor/gpu_process_transport_factory.cc:693: GetSurfaceManager()->RegisterSurfaceClientId(client_id); On 2016/07/21 17:22:23, Fady Samuel wrote: > On ...
4 years, 5 months ago (2016-07-21 17:28:40 UTC) #18
sky
LGTM
4 years, 5 months ago (2016-07-21 19:34:05 UTC) #19
Fady Samuel
PTAL Antoine https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc File content/browser/compositor/gpu_process_transport_factory.cc (right): https://codereview.chromium.org/2166423002/diff/20001/content/browser/compositor/gpu_process_transport_factory.cc#newcode693 content/browser/compositor/gpu_process_transport_factory.cc:693: GetSurfaceManager()->RegisterSurfaceClientId(client_id); On 2016/07/21 17:28:40, piman wrote: > ...
4 years, 5 months ago (2016-07-21 20:43:33 UTC) #22
piman
lgtm https://codereview.chromium.org/2166423002/diff/60001/cc/test/test_delegating_output_surface.cc File cc/test/test_delegating_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/60001/cc/test/test_delegating_output_surface.cc#newcode63 cc/test/test_delegating_output_surface.cc:63: if (surface_manager_) nit: {}
4 years, 5 months ago (2016-07-21 21:02:22 UTC) #25
Fady Samuel
+boliu@ for android_webview
4 years, 5 months ago (2016-07-21 21:11:30 UTC) #27
Fady Samuel
+reveman@ for exo https://codereview.chromium.org/2166423002/diff/60001/cc/test/test_delegating_output_surface.cc File cc/test/test_delegating_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/60001/cc/test/test_delegating_output_surface.cc#newcode63 cc/test/test_delegating_output_surface.cc:63: if (surface_manager_) On 2016/07/21 21:02:22, piman ...
4 years, 5 months ago (2016-07-21 21:21:03 UTC) #29
boliu
lgtm
4 years, 5 months ago (2016-07-21 21:24:13 UTC) #32
Fady Samuel
reveman@: I'm TBR'ing you for a small change in components/exo/surface.cc since this CL has gotten ...
4 years, 5 months ago (2016-07-21 21:58:17 UTC) #33
Fady Samuel
On 2016/07/21 21:58:17, Fady Samuel wrote: > reveman@: I'm TBR'ing you for a small change ...
4 years, 5 months ago (2016-07-21 22:09:10 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/2166423002/140001
4 years, 5 months ago (2016-07-21 22:19:44 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/197063)
4 years, 5 months ago (2016-07-21 22:59:45 UTC) #40
Fady Samuel
Some tests fail BindToClient which clears the surface_manager in TestDelegatingOutputSurface, then we try to access ...
4 years, 5 months ago (2016-07-22 03:00:07 UTC) #41
danakj
https://codereview.chromium.org/2166423002/diff/160001/cc/test/test_delegating_output_surface.cc File cc/test/test_delegating_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/160001/cc/test/test_delegating_output_surface.cc#newcode64 cc/test/test_delegating_output_surface.cc:64: surface_manager_->InvalidateSurfaceClientId( Why is this here and not in DetachOutputSurface ...
4 years, 5 months ago (2016-07-22 03:02:19 UTC) #45
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/2166423002/160001
4 years, 5 months ago (2016-07-22 03:02:27 UTC) #46
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/2166423002/160001
4 years, 5 months ago (2016-07-22 03:28:29 UTC) #49
Fady Samuel
Fixed TestDelegatingOutputSurface + RenderWidgetHostViewAndroid. PTAL Dana and David! https://codereview.chromium.org/2166423002/diff/160001/cc/test/test_delegating_output_surface.cc File cc/test/test_delegating_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/160001/cc/test/test_delegating_output_surface.cc#newcode64 cc/test/test_delegating_output_surface.cc:64: surface_manager_->InvalidateSurfaceClientId( ...
4 years, 5 months ago (2016-07-22 12:23:38 UTC) #57
Fady Samuel
Doh! I made the same mistake in the SynchronousCompositorOutputSurface! I was calling InvalidateSurfaceClientId in the ...
4 years, 5 months ago (2016-07-22 13:25:34 UTC) #58
reveman
lgtm % jbauman's review of components/exo
4 years, 5 months ago (2016-07-22 14:08:47 UTC) #62
Fady Samuel
OK, all tests pass! FINALLY! John and Dana, I'd appreciate your stamp of approval! Thanks!
4 years, 5 months ago (2016-07-22 15:03:20 UTC) #65
jbauman
lgtm
4 years, 5 months ago (2016-07-22 18:25:05 UTC) #67
danakj
Thanks that looks better LGTM https://codereview.chromium.org/2166423002/diff/240001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/240001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode111 content/renderer/android/synchronous_compositor_output_surface.cc:111: SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() {} nit: = ...
4 years, 5 months ago (2016-07-22 19:01:59 UTC) #68
Fady Samuel
Thanks Dana! CQ'ing! Thanks for your reviews, everyone! https://codereview.chromium.org/2166423002/diff/240001/content/renderer/android/synchronous_compositor_output_surface.cc File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2166423002/diff/240001/content/renderer/android/synchronous_compositor_output_surface.cc#newcode111 content/renderer/android/synchronous_compositor_output_surface.cc:111: SynchronousCompositorOutputSurface::~SynchronousCompositorOutputSurface() ...
4 years, 5 months ago (2016-07-22 19:08:40 UTC) #69
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/2166423002/260001
4 years, 5 months ago (2016-07-22 19:09:58 UTC) #72
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 5 months ago (2016-07-22 21:50:37 UTC) #74
commit-bot: I haz the power
4 years, 5 months ago (2016-07-22 21:52:29 UTC) #76
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/0fd36aebebd0d908cd9f7fcc51d45b68d1c73e9f
Cr-Commit-Position: refs/heads/master@{#407273}

Powered by Google App Engine
This is Rietveld 408576698