Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 COMPONENT_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_ | |
|
Pawel Osciak
2016/12/14 08:53:14
s/COMPONENT_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TR
yoshiki
2016/12/14 14:18:04
Done.
| |
| 6 #define COMPONENT_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_ | |
| 7 | |
| 8 #include "components/arc/common/video_accelerator.mojom.h" | |
| 9 #include "components/arc/video_accelerator/video_accelerator.h" | |
| 10 | |
| 11 namespace mojo { | |
| 12 | |
| 13 template <> | |
| 14 struct StructTraits<arc::mojom::ArcVideoAcceleratorDmabufPlaneDataView, | |
| 15 arc::ArcVideoAcceleratorDmabufPlane> { | |
| 16 static uint32_t offset(const arc::ArcVideoAcceleratorDmabufPlane& r) { | |
| 17 DCHECK(r.offset >= 0); | |
| 18 return r.offset; | |
| 19 } | |
| 20 | |
| 21 static uint32_t stride(const arc::ArcVideoAcceleratorDmabufPlane& r) { | |
| 22 DCHECK(r.stride >= 0); | |
| 23 return r.stride; | |
| 24 } | |
| 25 | |
| 26 static bool Read(arc::mojom::ArcVideoAcceleratorDmabufPlaneDataView data, | |
| 27 arc::ArcVideoAcceleratorDmabufPlane* out); | |
| 28 }; | |
| 29 | |
| 30 } // namespace mojo | |
| 31 | |
| 32 #endif // COMPONENT_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_ | |
| OLD | NEW |