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

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed)

Created:
4 years, 7 months ago by Peng
Modified:
4 years, 6 months ago
CC:
chromium-reviews, piman+watch_chromium.org, rjkroege
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus * Implements mus::mojo::GpuService which allows clients requesting a gpu IPC::ChannelHandle from mus, and then use it to construct GpuChannelHost and CommandBufferProxyImpl. * Uses the Chrome IPC CmdBuf in mus::GLES2Context. * Adds --use-chrome-gpu-command-buffer-in-mus flag which is used for switching between mojo CmdBuf and Chrome IPC CmdBuf. * Tested with ./out/mus_Debug/mojo_runner mojo:mus_demo Known issues: * The singleton mus::GpuService doesn't work for component build. * GpuMemoryBuffer is not implemented. The mash crashes because of it. BUG=586390 Committed: https://crrev.com/591151b6e0b55a6e30dc7b789e6ffcd2da02e6cf Cr-Commit-Position: refs/heads/master@{#397921}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Update #

Patch Set 4 : WIP #

Patch Set 5 : WIP #

Patch Set 6 : Start rendering #

Patch Set 7 : Rebase #

Patch Set 8 : WIP #

Patch Set 9 : Update #

Patch Set 10 : Rebase #

Patch Set 11 : Update #

Patch Set 12 : Update #

Total comments: 38

Patch Set 13 : Update #

Total comments: 2

Patch Set 14 : Update #

Patch Set 15 : Update #

Total comments: 2

Patch Set 16 : Update #

Patch Set 17 : Update #

Patch Set 18 : Fix build error #

Total comments: 6

Patch Set 19 : Update #

Total comments: 2

Patch Set 20 : Update #

Patch Set 21 : Rebase #

Total comments: 7

Patch Set 22 : Update #

Patch Set 23 : Update #

Patch Set 24 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+930 lines, -270 lines) Patch
M components/bitmap_uploader/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -4 lines 0 comments Download
M components/bitmap_uploader/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M components/bitmap_uploader/bitmap_uploader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +0 lines, -2 lines 0 comments Download
M components/bitmap_uploader/bitmap_uploader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +3 lines, -13 lines 0 comments Download
M components/mus/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/common/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/common/gpu_type_converters.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +10 lines, -0 lines 0 comments Download
M components/mus/common/gpu_type_converters.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +15 lines, -0 lines 0 comments Download
M components/mus/common/switches.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/common/switches.cc View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M components/mus/gles2/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -2 lines 0 comments Download
M components/mus/gles2/command_buffer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M components/mus/gles2/command_buffer_local.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
D components/mus/gles2/command_buffer_type_conversions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -24 lines 0 comments Download
D components/mus/gles2/command_buffer_type_conversions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -27 lines 0 comments Download
M components/mus/gles2/gpu_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M components/mus/gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +8 lines, -0 lines 0 comments Download
M components/mus/gpu/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
A + components/mus/gpu/gpu_memory_buffer_manager_mus_local.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -14 lines 0 comments Download
A + components/mus/gpu/gpu_memory_buffer_manager_mus_local.cc View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -16 lines 0 comments Download
A components/mus/gpu/gpu_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +60 lines, -0 lines 0 comments Download
A components/mus/gpu/gpu_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +78 lines, -0 lines 0 comments Download
M components/mus/gpu/gpu_service_mus.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +118 lines, -31 lines 0 comments Download
M components/mus/gpu/gpu_service_mus.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 4 chunks +203 lines, -23 lines 0 comments Download
M components/mus/manifest.json View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/mus_app.h View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -0 lines 0 comments Download
M components/mus/mus_app.cc View 1 2 3 4 5 6 7 8 9 6 chunks +29 lines, -3 lines 0 comments Download
M components/mus/public/cpp/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -0 lines 0 comments Download
M components/mus/public/cpp/context_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -2 lines 0 comments Download
M components/mus/public/cpp/gles2_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +19 lines, -8 lines 0 comments Download
M components/mus/public/cpp/lib/command_buffer_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/cpp/lib/context_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +9 lines, -12 lines 0 comments Download
M components/mus/public/cpp/lib/gles2_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +65 lines, -10 lines 0 comments Download
A + components/mus/public/cpp/lib/gpu_memory_buffer_manager_mus.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -9 lines 0 comments Download
A + components/mus/public/cpp/lib/gpu_memory_buffer_manager_mus.cc View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -16 lines 0 comments Download
A components/mus/public/cpp/lib/gpu_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +55 lines, -0 lines 0 comments Download
A components/mus/public/cpp/lib/gpu_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +101 lines, -0 lines 0 comments Download
M components/mus/public/interfaces/gpu_service.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -4 lines 0 comments Download
M components/mus/surfaces/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +3 lines, -0 lines 0 comments Download
M components/mus/surfaces/surfaces_context_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +4 lines, -0 lines 0 comments Download
M components/mus/surfaces/surfaces_context_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +58 lines, -10 lines 0 comments Download
M content/renderer/mus/render_widget_mus_connection.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -7 lines 0 comments Download
M media/gpu/ipc/service/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M ui/views/mus/surface_binding.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +2 lines, -28 lines 0 comments Download

Messages

Total messages: 58 (26 generated)
Peng
Hi piman, PTAL. Thanks.
4 years, 7 months ago (2016-05-24 18:19:07 UTC) #5
piman
https://codereview.chromium.org/1976703003/diff/220001/components/mus/gpu/gpu_memory_buffer_manager_mus_local.h File components/mus/gpu/gpu_memory_buffer_manager_mus_local.h (right): https://codereview.chromium.org/1976703003/diff/220001/components/mus/gpu/gpu_memory_buffer_manager_mus_local.h#newcode35 components/mus/gpu/gpu_memory_buffer_manager_mus_local.h:35: const gpu::SyncToken& sync_token) override; nit: DISALLOW_COPY_AND_ASSIGN https://codereview.chromium.org/1976703003/diff/220001/components/mus/gpu/gpu_service_impl.cc File components/mus/gpu/gpu_service_impl.cc ...
4 years, 7 months ago (2016-05-24 22:46:54 UTC) #6
Fady Samuel
Sorry for the drive-by but could we please split this off into a few small ...
4 years, 7 months ago (2016-05-25 17:06:48 UTC) #8
Peng
https://codereview.chromium.org/1976703003/diff/220001/components/bitmap_uploader/bitmap_uploader.cc File components/bitmap_uploader/bitmap_uploader.cc (right): https://codereview.chromium.org/1976703003/diff/220001/components/bitmap_uploader/bitmap_uploader.cc#newcode53 components/bitmap_uploader/bitmap_uploader.cc:53: if (!mus::GpuService::UseChromeGpuCommandBuffer()) { On 2016/05/25 17:06:47, Fady Samuel wrote: ...
4 years, 7 months ago (2016-05-25 19:42:56 UTC) #9
piman
https://codereview.chromium.org/1976703003/diff/220001/components/mus/public/cpp/lib/gpu_service.cc File components/mus/public/cpp/lib/gpu_service.cc (right): https://codereview.chromium.org/1976703003/diff/220001/components/mus/public/cpp/lib/gpu_service.cc#newcode80 components/mus/public/cpp/lib/gpu_service.cc:80: CHECK(gpu_service.WaitForIncomingResponse()); On 2016/05/25 19:42:56, Peng wrote: > On 2016/05/24 ...
4 years, 7 months ago (2016-05-25 22:53:17 UTC) #10
Peng
https://codereview.chromium.org/1976703003/diff/220001/components/mus/public/cpp/lib/gpu_service.cc File components/mus/public/cpp/lib/gpu_service.cc (right): https://codereview.chromium.org/1976703003/diff/220001/components/mus/public/cpp/lib/gpu_service.cc#newcode80 components/mus/public/cpp/lib/gpu_service.cc:80: CHECK(gpu_service.WaitForIncomingResponse()); On 2016/05/25 22:53:17, piman OOO back 2016-5-31 wrote: ...
4 years, 6 months ago (2016-05-31 14:24:04 UTC) #16
piman
one last think I think, then LGTM. https://codereview.chromium.org/1976703003/diff/380001/components/mus/public/cpp/lib/gles2_context.cc File components/mus/public/cpp/lib/gles2_context.cc (right): https://codereview.chromium.org/1976703003/diff/380001/components/mus/public/cpp/lib/gles2_context.cc#newcode49 components/mus/public/cpp/lib/gles2_context.cc:49: GpuService::GetInstance()->EstablishGpuChannel(connector); gpu_channel_host ...
4 years, 6 months ago (2016-05-31 23:14:05 UTC) #18
Peng
https://codereview.chromium.org/1976703003/diff/380001/components/mus/public/cpp/lib/gles2_context.cc File components/mus/public/cpp/lib/gles2_context.cc (right): https://codereview.chromium.org/1976703003/diff/380001/components/mus/public/cpp/lib/gles2_context.cc#newcode49 components/mus/public/cpp/lib/gles2_context.cc:49: GpuService::GetInstance()->EstablishGpuChannel(connector); On 2016/05/31 23:14:05, piman OOO back 2016-6-2 wrote: ...
4 years, 6 months ago (2016-06-01 14:11:28 UTC) #19
Peng
+sky@ OWNER of components/mus & ui/views +sandersd@ OWNER of media/gpu Hi Scott & Dan, PTAL. ...
4 years, 6 months ago (2016-06-01 14:17:19 UTC) #21
Peng
+sky@ OWNER of components/mus & ui/views +sandersd@ OWNER of media/gpu Hi Scott & Dan, PTAL. ...
4 years, 6 months ago (2016-06-01 14:39:46 UTC) #23
sky
https://codereview.chromium.org/1976703003/diff/440001/components/bitmap_uploader/bitmap_uploader.cc File components/bitmap_uploader/bitmap_uploader.cc (left): https://codereview.chromium.org/1976703003/diff/440001/components/bitmap_uploader/bitmap_uploader.cc#oldcode41 components/bitmap_uploader/bitmap_uploader.cc:41: void BitmapUploader::Init(shell::Connector* connector) { Isn't this in services, which ...
4 years, 6 months ago (2016-06-01 15:45:29 UTC) #24
Peng
https://codereview.chromium.org/1976703003/diff/440001/components/bitmap_uploader/bitmap_uploader.cc File components/bitmap_uploader/bitmap_uploader.cc (left): https://codereview.chromium.org/1976703003/diff/440001/components/bitmap_uploader/bitmap_uploader.cc#oldcode41 components/bitmap_uploader/bitmap_uploader.cc:41: void BitmapUploader::Init(shell::Connector* connector) { On 2016/06/01 15:45:29, sky wrote: ...
4 years, 6 months ago (2016-06-01 16:23:21 UTC) #25
sky
Ok, LGTM
4 years, 6 months ago (2016-06-01 17:07:23 UTC) #26
Peng
+dcheng for components/mus/public/interfaces/gpu_service.mojom Hi Danial, PTAL. Thanks.
4 years, 6 months ago (2016-06-01 17:53:47 UTC) #28
sandersd (OOO until July 31)
media/ LGTM
4 years, 6 months ago (2016-06-01 18:36:27 UTC) #29
sadrul
https://codereview.chromium.org/1976703003/diff/460001/components/mus/public/cpp/lib/context_provider.cc File components/mus/public/cpp/lib/context_provider.cc (right): https://codereview.chromium.org/1976703003/diff/460001/components/mus/public/cpp/lib/context_provider.cc#newcode19 components/mus/public/cpp/lib/context_provider.cc:19: GLES2Context::CreateOffscreenContext(std::vector<int32_t>(), connector_); Note that if |connector_| is coming from ...
4 years, 6 months ago (2016-06-01 19:16:57 UTC) #31
Peng
https://codereview.chromium.org/1976703003/diff/460001/components/mus/public/cpp/lib/context_provider.cc File components/mus/public/cpp/lib/context_provider.cc (right): https://codereview.chromium.org/1976703003/diff/460001/components/mus/public/cpp/lib/context_provider.cc#newcode19 components/mus/public/cpp/lib/context_provider.cc:19: GLES2Context::CreateOffscreenContext(std::vector<int32_t>(), connector_); On 2016/06/01 19:16:57, sadrul wrote: > Note ...
4 years, 6 months ago (2016-06-01 20:00:42 UTC) #32
Peng
Try +wfh for *.mojom security review. Hi Will, PTAL. Thanks.
4 years, 6 months ago (2016-06-03 14:09:11 UTC) #34
Peng
+tsepez for *.mojom security review too. Hi Tom, seems you are working more close to ...
4 years, 6 months ago (2016-06-03 14:29:08 UTC) #36
Tom Sepez
https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/interfaces/gpu_service.mojom File components/mus/public/interfaces/gpu_service.mojom (right): https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/interfaces/gpu_service.mojom#newcode18 components/mus/public/interfaces/gpu_service.mojom:18: => (int32 client_id, ChannelHandle channel_handle, GpuInfo? gpu_info); How does ...
4 years, 6 months ago (2016-06-03 17:11:11 UTC) #37
dcheng
https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/cpp/lib/gpu_service.cc File components/mus/public/cpp/lib/gpu_service.cc (right): https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/cpp/lib/gpu_service.cc#newcode73 components/mus/public/cpp/lib/gpu_service.cc:73: if (!gpu_service.WaitForIncomingResponse()) { Why is EstablishGpuChannel not just a ...
4 years, 6 months ago (2016-06-03 17:34:48 UTC) #38
dcheng
A few drive-bys.
4 years, 6 months ago (2016-06-03 17:34:59 UTC) #39
Peng
https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/cpp/lib/gpu_service.cc File components/mus/public/cpp/lib/gpu_service.cc (right): https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/cpp/lib/gpu_service.cc#newcode73 components/mus/public/cpp/lib/gpu_service.cc:73: if (!gpu_service.WaitForIncomingResponse()) { On 2016/06/03 17:34:48, dcheng wrote: > ...
4 years, 6 months ago (2016-06-03 18:34:07 UTC) #40
piman
https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/interfaces/gpu_service.mojom File components/mus/public/interfaces/gpu_service.mojom (right): https://codereview.chromium.org/1976703003/diff/500001/components/mus/public/interfaces/gpu_service.mojom#newcode18 components/mus/public/interfaces/gpu_service.mojom:18: => (int32 client_id, ChannelHandle channel_handle, GpuInfo? gpu_info); On 2016/06/03 ...
4 years, 6 months ago (2016-06-03 19:20:47 UTC) #41
Tom Sepez
> See > https://docs.google.com/document/d/1XwBYFuTcINI84ShNvqifkPREs3sw5NdaKzKqDDxyeHk/edit#heading=h.xriz9y5x1y7d > for more details. Thanks for the explanation. LGTM.
4 years, 6 months ago (2016-06-03 21:33:46 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1976703003/540001
4 years, 6 months ago (2016-06-03 21:38:42 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/233354)
4 years, 6 months ago (2016-06-04 01:33:58 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1976703003/540001
4 years, 6 months ago (2016-06-04 03:05:33 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/233489)
4 years, 6 months ago (2016-06-04 04:47:47 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1976703003/560001
4 years, 6 months ago (2016-06-04 12:04:13 UTC) #54
commit-bot: I haz the power
Committed patchset #24 (id:560001)
4 years, 6 months ago (2016-06-04 13:45:46 UTC) #56
commit-bot: I haz the power
4 years, 6 months ago (2016-06-04 13:47:03 UTC) #58
Message was sent while issue was closed.
Patchset 24 (id:??) landed as
https://crrev.com/591151b6e0b55a6e30dc7b789e6ffcd2da02e6cf
Cr-Commit-Position: refs/heads/master@{#397921}

Powered by Google App Engine
This is Rietveld 408576698