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 #include "components/arc/video_accelerator/video_accelerator_struct_traits.h" | |
| 6 | |
| 7 namespace mojo { | |
| 8 | |
| 9 // static | |
| 10 bool StructTraits<arc::mojom::ArcVideoAcceleratorDmabufPlaneDataView, | |
| 11 arc::ArcVideoAcceleratorDmabufPlane>:: | |
| 12 Read(arc::mojom::ArcVideoAcceleratorDmabufPlaneDataView data, | |
| 13 arc::ArcVideoAcceleratorDmabufPlane* out) { | |
| 14 if (data.offset() < 0 || data.stride() < 0) { | |
| 15 // Invalid offset/stride. | |
|
Pawel Osciak
2016/12/14 08:53:14
Nit: this comment is probably unnecessary.
yoshiki
2016/12/14 14:18:04
Done.
| |
| 16 return false; | |
| 17 } | |
| 18 | |
| 19 out->offset = data.offset(); | |
| 20 out->stride = data.stride(); | |
| 21 return true; | |
| 22 } | |
| 23 | |
| 24 } // namespace mojo | |
| OLD | NEW |