diff options
author | sammc <sammc@chromium.org> | 2016-03-23 11:51:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-23 18:54:52 +0000 |
commit | a1107b7873a0b930ff197da68c3eaacd751839d5 (patch) | |
tree | c9c4b1348228fc1a4f86b73249d4ad031f91c20c /gpu | |
parent | 243c3522db99d0a7d7174fc91ae0f0591eedd062 (diff) | |
download | chromium_src-a1107b7873a0b930ff197da68c3eaacd751839d5.zip chromium_src-a1107b7873a0b930ff197da68c3eaacd751839d5.tar.gz chromium_src-a1107b7873a0b930ff197da68c3eaacd751839d5.tar.bz2 |
Mojo bindings: Fix typemap includes.
Previously, a header defining a StructTraits specialization could not
include its corresponding generated mojom header, due to the mojom
header including the StructTraits header. This required a brittle set of
forward declarations to correctly avoid this; in practice, this mostly
led to StructTraits that were nominally for a particular variant, but
included the generated mojom header from the default variant.
This CL fixes the issue by splitting typemap headers into
public_headers, which define the native type and are included by the
generated mojom header, and headers which define the StructTraits
specialization for the native type and are only included by the
generated mojom source file, allowing the StructTraits header to include
the generated mojom header.
BUG=596202
CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel
Review URL: https://codereview.chromium.org/1821073002
Cr-Commit-Position: refs/heads/master@{#382893}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/command_buffer/common/mojo.typemap | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/gpu/command_buffer/common/mojo.typemap b/gpu/command_buffer/common/mojo.typemap index cbc36c5..d412acd 100644 --- a/gpu/command_buffer/common/mojo.typemap +++ b/gpu/command_buffer/common/mojo.typemap @@ -6,43 +6,55 @@ "c++": { "gpu.mojom.Capabilities": { "typename": "gpu::Capabilities", - "headers": [ - "gpu/command_buffer/common/capabilities.h", + "public_headers": [ + "gpu/command_buffer/common/capabilities.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] }, "gpu.mojom.CommandBufferState": { "typename": "gpu::CommandBuffer::State", - "headers": [ - "gpu/command_buffer/common/command_buffer.h", + "public_headers": [ + "gpu/command_buffer/common/command_buffer.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] }, "gpu.mojom.Mailbox": { "typename": "gpu::Mailbox", - "headers": [ - "gpu/command_buffer/common/mailbox.h", + "public_headers": [ + "gpu/command_buffer/common/mailbox.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] }, "gpu.mojom.MailboxHolder": { "typename": "gpu::MailboxHolder", - "headers": [ - "gpu/command_buffer/common/mailbox_holder.h", + "public_headers": [ + "gpu/command_buffer/common/mailbox_holder.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] }, "gpu.mojom.SyncToken": { "typename": "gpu::SyncToken", - "headers": [ - "gpu/command_buffer/common/sync_token.h", + "public_headers": [ + "gpu/command_buffer/common/sync_token.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] }, "gpu.mojom.ValueState": { "typename": "gpu::ValueState", - "headers": [ - "gpu/command_buffer/common/value_state.h", + "public_headers": [ + "gpu/command_buffer/common/value_state.h" + ], + "traits_headers": [ "gpu/ipc/common/gpu_command_buffer_traits.h" ] } |