OLD | NEW |
| (Empty) |
1 /* | |
2 * Copyright 2016 Google Inc. | |
3 * | |
4 * Use of this source code is governed by a BSD-style license that can be | |
5 * found in the LICENSE file. | |
6 */ | |
7 | |
8 #ifndef SkYUVSizeInfo_DEFINED | |
9 #define SkYUVSizeInfo_DEFINED | |
10 | |
11 struct SkYUVSizeInfo { | |
12 enum { | |
13 kY = 0, | |
14 kU = 1, | |
15 kV = 2, | |
16 }; | |
17 SkISize fSizes[3]; | |
18 | |
19 /** | |
20 * While the widths of the Y, U, and V planes are not restricted, the | |
21 * implementation often requires that the width of the memory allocated | |
22 * for each plane be a multiple of 8. | |
23 * | |
24 * This struct allows us to inform the client how many "widthBytes" | |
25 * that we need. Note that we use the new idea of "widthBytes" | |
26 * because this idea is distinct from "rowBytes" (used elsewhere in | |
27 * Skia). "rowBytes" allow the last row of the allocation to not | |
28 * include any extra padding, while, in this case, every single row of | |
29 * the allocation must be at least "widthBytes". | |
30 */ | |
31 size_t fWidthBytes[3]; | |
32 }; | |
33 | |
34 #endif // SkYUVSizeInfo_DEFINED | |
OLD | NEW |