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

Issue 2019833002: Implement StructTraits for various cc and gpu types (Closed)

Created:
4 years, 6 months ago by Fady Samuel
Modified:
4 years, 6 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, cc-bugs_chromium.org, chromium-reviews, darin (slow to review), piman+watch_chromium.org, qsr+mojo_chromium.org, rjkroege, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement StructTraits for various cc and gpu types This CL implements StructTraits for the following types: 1. gpu::Mailbox 2. gpu::MailboxHolder 3. gpu::SyncToken 4. cc::ReturnedResource This CL also implements unit tests in both gpu/ipc/common and cc/ipc that test these traits. BUG=611802 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/3de222455772a473df1585b47e3395a0c174fc38 Cr-Commit-Position: refs/heads/master@{#397067}

Patch Set 1 #

Patch Set 2 : Fixed deps #

Patch Set 3 : Removed comment #

Patch Set 4 : Rebased #

Patch Set 5 : Add MailboxHolder #

Patch Set 6 : Added SurfaceId unit test #

Patch Set 7 : Added ReturnedResource unit test #

Patch Set 8 : Updated #

Patch Set 9 : Added gpu unittests #

Patch Set 10 : Diff against master for testing #

Patch Set 11 : Add mojo dependency in gyp #

Patch Set 12 : Fix StructTraits gpu unittests a MessageLoop #

Patch Set 13 : Fix DEPS file #

Total comments: 3

Patch Set 14 : Rebased against previous patch #

Total comments: 4

Patch Set 15 : Removed unnecessary DEPS #

Patch Set 16 : Addressed nit #

Total comments: 1

Patch Set 17 : Rebased #

Patch Set 18 : mailbox_name by ref to make windows happy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+541 lines, -110 lines) Patch
M cc/ipc/BUILD.gn View 1 2 3 4 5 6 8 10 11 12 13 1 chunk +5 lines, -0 lines 0 comments Download
A cc/ipc/returned_resource.mojom View 1 chunk +15 lines, -0 lines 0 comments Download
A cc/ipc/returned_resource.typemap View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A cc/ipc/returned_resource_struct_traits.h View 1 chunk +44 lines, -0 lines 0 comments Download
M cc/ipc/struct_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +36 lines, -0 lines 0 comments Download
M cc/ipc/surface_id.typemap View 1 chunk +1 line, -1 line 0 comments Download
M cc/ipc/traits_test_service.mojom View 1 2 3 4 5 6 8 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cc/ipc/typemaps.gni View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M components/bitmap_uploader/bitmap_uploader.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M components/bitmap_uploader/bitmap_uploader.cc View 1 2 3 1 chunk +6 lines, -6 lines 0 comments Download
M components/mus/gpu/display_compositor/compositor_frame_sink_impl.cc View 1 chunk +1 line, -2 lines 0 comments Download
M components/mus/public/cpp/lib/output_surface.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/cpp/lib/window_surface.cc View 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/cpp/output_surface.h View 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/cpp/surfaces/surfaces_type_converters.h View 1 2 3 1 chunk +0 lines, -13 lines 0 comments Download
M components/mus/public/cpp/surfaces/surfaces_type_converters.cc View 1 2 3 2 chunks +0 lines, -26 lines 0 comments Download
M components/mus/public/cpp/surfaces/tests/surface_unittest.cc View 1 2 3 2 chunks +0 lines, -29 lines 0 comments Download
M components/mus/public/cpp/window_surface.h View 1 chunk +1 line, -2 lines 0 comments Download
M components/mus/public/cpp/window_surface_client.h View 1 chunk +1 line, -1 line 0 comments Download
M components/mus/public/interfaces/compositor_frame.mojom View 3 chunks +2 lines, -9 lines 0 comments Download
M components/mus/public/interfaces/gpu/display_compositor.mojom View 2 chunks +2 lines, -1 line 0 comments Download
M components/mus/ws/server_window_surface.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/unittest_main.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M gpu/gpu.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/ipc/common/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -0 lines 0 comments Download
M gpu/ipc/common/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M gpu/ipc/common/mailbox.mojom View 1 chunk +4 lines, -2 lines 0 comments Download
M gpu/ipc/common/mailbox.typemap View 1 chunk +7 lines, -2 lines 0 comments Download
M gpu/ipc/common/mailbox_holder.mojom View 1 2 3 4 1 chunk +9 lines, -2 lines 0 comments Download
M gpu/ipc/common/mailbox_holder.typemap View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
A gpu/ipc/common/mailbox_holder_struct_traits.h View 1 2 3 4 1 chunk +40 lines, -0 lines 0 comments Download
A gpu/ipc/common/mailbox_struct_traits.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +42 lines, -0 lines 0 comments Download
A gpu/ipc/common/mailbox_struct_traits.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +66 lines, -0 lines 0 comments Download
A gpu/ipc/common/struct_traits_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +120 lines, -0 lines 0 comments Download
M gpu/ipc/common/sync_token.mojom View 1 chunk +20 lines, -2 lines 0 comments Download
M gpu/ipc/common/sync_token.typemap View 1 chunk +3 lines, -3 lines 0 comments Download
A gpu/ipc/common/sync_token_struct_traits.h View 1 chunk +51 lines, -0 lines 0 comments Download
A gpu/ipc/common/traits_test_service.mojom View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 63 (32 generated)
Fady Samuel
+tsepez@ for ipc. +piman@ for gpu and cc. +ben@ for mus.
4 years, 6 months ago (2016-05-27 22:40:03 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/40001
4 years, 6 months ago (2016-05-27 22:43:35 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/12889) ios-simulator on ...
4 years, 6 months ago (2016-05-27 22:45:58 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/60001
4 years, 6 months ago (2016-05-29 19:48:21 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/80001
4 years, 6 months ago (2016-05-29 20:38:10 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/195216)
4 years, 6 months ago (2016-05-29 21:27:52 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/180001
4 years, 6 months ago (2016-05-31 00:36:53 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/191932)
4 years, 6 months ago (2016-05-31 00:43:27 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/200001
4 years, 6 months ago (2016-05-31 01:03:20 UTC) #21
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/191937)
4 years, 6 months ago (2016-05-31 01:10:54 UTC) #23
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/220001
4 years, 6 months ago (2016-05-31 01:41:48 UTC) #25
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/191948)
4 years, 6 months ago (2016-05-31 01:49:28 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/240001
4 years, 6 months ago (2016-05-31 03:05:44 UTC) #29
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-05-31 04:18:45 UTC) #31
Fady Samuel
PTAL
4 years, 6 months ago (2016-05-31 15:35:15 UTC) #35
Fady Samuel
PTAL
4 years, 6 months ago (2016-05-31 15:35:15 UTC) #36
piman
LGTM, I think. The duplication with IPC traits is unfortunate... I don't know if there's ...
4 years, 6 months ago (2016-05-31 16:08:50 UTC) #37
Ben Goodger (Google)
lgtm
4 years, 6 months ago (2016-05-31 16:32:04 UTC) #38
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2019833002/diff/240001/gpu/ipc/common/mailbox.mojom File gpu/ipc/common/mailbox.mojom (right): https://codereview.chromium.org/2019833002/diff/240001/gpu/ipc/common/mailbox.mojom#newcode9 gpu/ipc/common/mailbox.mojom:9: array<int8, 64> name; On 2016/05/31 at 16:08:49, piman OOO ...
4 years, 6 months ago (2016-05-31 17:19:48 UTC) #40
Fady Samuel
PTAL Tom! Thanks!
4 years, 6 months ago (2016-05-31 17:23:58 UTC) #41
Tom Sepez
lgtm https://codereview.chromium.org/2019833002/diff/260001/gpu/ipc/common/struct_traits_unittest.cc File gpu/ipc/common/struct_traits_unittest.cc (right): https://codereview.chromium.org/2019833002/diff/260001/gpu/ipc/common/struct_traits_unittest.cc#newcode49 gpu/ipc/common/struct_traits_unittest.cc:49: 0, 9, 8, 7, 6, 5, 4, 3, ...
4 years, 6 months ago (2016-05-31 17:30:24 UTC) #42
Fady Samuel
Will CQ once the previous patch lands https://codereview.chromium.org/2019833002/diff/260001/gpu/ipc/common/struct_traits_unittest.cc File gpu/ipc/common/struct_traits_unittest.cc (right): https://codereview.chromium.org/2019833002/diff/260001/gpu/ipc/common/struct_traits_unittest.cc#newcode49 gpu/ipc/common/struct_traits_unittest.cc:49: 0, 9, ...
4 years, 6 months ago (2016-05-31 17:59:59 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/300001
4 years, 6 months ago (2016-05-31 21:56:20 UTC) #46
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/145674) chromeos_daisy_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 6 months ago (2016-05-31 22:14:55 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/320001
4 years, 6 months ago (2016-05-31 23:17:04 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/198812)
4 years, 6 months ago (2016-06-01 00:21:38 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2019833002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2019833002/340001
4 years, 6 months ago (2016-06-01 04:19:44 UTC) #56
commit-bot: I haz the power
Committed patchset #18 (id:340001)
4 years, 6 months ago (2016-06-01 05:37:16 UTC) #58
commit-bot: I haz the power
Patchset 18 (id:??) landed as https://crrev.com/3de222455772a473df1585b47e3395a0c174fc38 Cr-Commit-Position: refs/heads/master@{#397067}
4 years, 6 months ago (2016-06-01 05:39:02 UTC) #60
yzshen1
https://codereview.chromium.org/2019833002/diff/300001/gpu/ipc/common/mailbox_struct_traits.cc File gpu/ipc/common/mailbox_struct_traits.cc (right): https://codereview.chromium.org/2019833002/diff/300001/gpu/ipc/common/mailbox_struct_traits.cc#newcode16 gpu/ipc/common/mailbox_struct_traits.cc:16: b->data = nullptr; This deson't actually affect gpu::Mailbox's contents, ...
4 years, 6 months ago (2016-06-01 15:41:30 UTC) #62
Fady Samuel
4 years, 6 months ago (2016-06-01 19:42:52 UTC) #63
Message was sent while issue was closed.
On 2016/06/01 15:41:30, yzshen1 wrote:
>
https://codereview.chromium.org/2019833002/diff/300001/gpu/ipc/common/mailbox...
> File gpu/ipc/common/mailbox_struct_traits.cc (right):
> 
>
https://codereview.chromium.org/2019833002/diff/300001/gpu/ipc/common/mailbox...
> gpu/ipc/common/mailbox_struct_traits.cc:16: b->data = nullptr;
> This deson't actually affect gpu::Mailbox's contents, right?
> 
> If you never use a nullable MailboxName, you could consider removing IsNull
and
> SetToNull altogether.

LANDED: https://codereview.chromium.org/2027223002/

Powered by Google App Engine
This is Rietveld 408576698