OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 // This file contains structures used to represent SkBitmaps in Mojo. | |
6 | |
7 // TODO(amistry): Consider moving somewhere else. | |
Ken Rockot(use gerrit already)
2015/03/24 20:35:12
What about somewhere like //skia/public{/interface
Anand Mistry (off Chromium)
2015/03/25 03:14:32
Done.
| |
8 module services.image_decoder; | |
9 | |
10 // Mirror of SkColorType. | |
11 enum ColorType { | |
12 UNKNOWN, | |
13 ALPHA_8, | |
14 RGB_565, | |
15 ARGB_4444, | |
16 RGBA_8888, | |
17 BGRA_8888, | |
18 INDEX_8, | |
19 GRAY_8, | |
20 }; | |
21 | |
22 // Mirror of SkAlphaType. | |
23 enum AlphaType { | |
24 UNKNOWN, | |
25 OPAQUE, | |
26 PREMUL, | |
27 UNPREMUL, | |
28 }; | |
29 | |
30 // Mirror of SkColorProfileType. | |
31 enum ColorProfileType { | |
32 LINEAR, | |
33 SRGB, | |
34 }; | |
35 | |
36 struct Image { | |
37 ColorType color_type; | |
38 AlphaType alpha_type; | |
39 ColorProfileType profile_type; | |
40 | |
41 uint32 width; | |
42 uint32 height; | |
43 | |
44 array<uint8> pixel_data; | |
45 }; | |
OLD | NEW |