Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(478)

Side by Side Diff: components/arc/video_accelerator/video_accelerator_struct_traits.cc

Issue 2513973002: Use mojo typemap to simplify the code using DmabufPlane (Closed)
Patch Set: Addressed comments Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/arc/video_accelerator/video_accelerator_struct_traits.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 return false;
16 }
17
18 out->offset = data.offset();
19 out->stride = data.stride();
20 return true;
21 }
22
23 } // namespace mojo
OLDNEW
« no previous file with comments | « components/arc/video_accelerator/video_accelerator_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698