Chromium Code Reviews| Index: cc/ipc/texture_mailbox_struct_traits.h |
| diff --git a/cc/ipc/texture_mailbox_struct_traits.h b/cc/ipc/texture_mailbox_struct_traits.h |
| index dc4d88f5627b254aafc4c62b6457aef8f75bf094..d6a7c60a9384dce04c4dd84c50d363332f2ec11c 100644 |
| --- a/cc/ipc/texture_mailbox_struct_traits.h |
| +++ b/cc/ipc/texture_mailbox_struct_traits.h |
| @@ -15,6 +15,14 @@ namespace mojo { |
| template <> |
| struct StructTraits<cc::mojom::TextureMailboxDataView, cc::TextureMailbox> { |
| + static bool IsNull(const cc::TextureMailbox& input) { |
| + return !input.IsTexture(); |
|
danakj
2017/02/14 23:49:34
Uh.. so. This is where this nullable thing gets re
|
| + } |
| + |
| + static void SetToNull(cc::TextureMailbox* output) { |
| + *output = cc::TextureMailbox(); |
| + } |
| + |
| static const gpu::MailboxHolder& mailbox_holder( |
| const cc::TextureMailbox& input) { |
| return input.mailbox_holder_; |