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_ | |
| 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> { | |
|
Yusuke Sato
2016/11/29 21:34:28
(here and elsewhere)
The leading :: seems redundan
yoshiki
2016/11/30 17:25:44
Done.
| |
| 16 static uint32_t offset(const ::arc::ArcVideoAcceleratorDmabufPlane& r) { | |
| 17 return r.offset; | |
| 18 } | |
| 19 static uint32_t stride(const ::arc::ArcVideoAcceleratorDmabufPlane& r) { | |
| 20 return r.stride; | |
| 21 } | |
| 22 | |
| 23 static bool Read(arc::mojom::ArcVideoAcceleratorDmabufPlaneDataView data, | |
| 24 ::arc::ArcVideoAcceleratorDmabufPlane* out) { | |
| 25 out->offset = data.offset(); | |
| 26 out->stride = data.stride(); | |
|
Luis Héctor Chávez
2016/11/29 18:25:36
here you can check if either the stride or offset
yoshiki
2016/11/30 17:25:44
Done.
| |
| 27 return true; | |
| 28 } | |
| 29 }; | |
| 30 } | |
|
Luis Héctor Chávez
2016/11/29 18:25:36
nit: empty line before to preserve symmetry.
Yusuke Sato
2016/11/29 21:34:28
same. // namespace mojo
yoshiki
2016/11/30 17:25:44
Done.
| |
| 31 | |
| 32 #endif // COMPONENT_ARC_COMMON_VIDEO_ACCELERATOR_STRUCT_TRAITS_H_ | |
| OLD | NEW |