| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_IPC_COPY_OUTPUT_RESULT_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_COPY_OUTPUT_RESULT_STRUCT_TRAITS_H_ |
| 7 |
| 8 #include "cc/ipc/copy_output_result.mojom-shared.h" |
| 9 #include "cc/ipc/texture_mailbox_struct_traits.h" |
| 10 #include "cc/output/copy_output_result.h" |
| 11 #include "skia/public/interfaces/bitmap_skbitmap_struct_traits.h" |
| 12 #include "ui/gfx/geometry/mojo/geometry_struct_traits.h" |
| 13 |
| 14 namespace mojo { |
| 15 |
| 16 template <> |
| 17 struct StructTraits<cc::mojom::CopyOutputResultDataView, cc::CopyOutputResult> { |
| 18 static const gfx::Size& size(const cc::CopyOutputResult& result) { |
| 19 return result.size_; |
| 20 } |
| 21 |
| 22 static const SkBitmap& bitmap(const cc::CopyOutputResult& result); |
| 23 |
| 24 static const cc::TextureMailbox& texture_mailbox( |
| 25 const cc::CopyOutputResult& result) { |
| 26 return result.texture_mailbox_; |
| 27 } |
| 28 |
| 29 static bool Read(cc::mojom::CopyOutputResultDataView data, |
| 30 cc::CopyOutputResult* out); |
| 31 }; |
| 32 |
| 33 } // namespace mojo |
| 34 |
| 35 #endif // CC_IPC_COPY_OUTPUT_RESULT_STRUCT_TRAITS_H_ |
| OLD | NEW |