OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module mojo.gfx; | 5 module mojo.gfx; |
6 | 6 |
7 import "geometry/interfaces/geometry.mojom"; | 7 import "geometry/interfaces/geometry.mojom"; |
8 | 8 |
9 // This should probably be a system wide list (maybe in exists already?) since | 9 // This should probably be a system wide list (maybe in exists already?) since |
10 // this is undoubtably not the only interface that will care about color formats | 10 // this is undoubtably not the only interface that will care about color formats |
(...skipping 15 matching lines...) Expand all Loading... |
26 // provided by some other, more general purpose system This should probably be | 26 // provided by some other, more general purpose system This should probably be |
27 // where we put flags/properties about the buffer that are not image specific | 27 // where we put flags/properties about the buffer that are not image specific |
28 // (Like whether it is CPU or GPU memory, what the layout is like, etc.) | 28 // (Like whether it is CPU or GPU memory, what the layout is like, etc.) |
29 struct ImageBuffer { | 29 struct ImageBuffer { |
30 uint64 size; | 30 uint64 size; |
31 handle data; | 31 handle data; |
32 }; | 32 }; |
33 | 33 |
34 // Image wraps ImageBuffer and provides image-specific metadata for the buffer | 34 // Image wraps ImageBuffer and provides image-specific metadata for the buffer |
35 struct Image { | 35 struct Image { |
36 mojo.Size size; //width and height of image in pixels | 36 mojo.Size size; // width and height of image in pixels |
37 uint32 stride; //bytes per row | 37 uint32 stride; // bytes per row |
38 uint32 pitch; // pixels per row | 38 uint32 pitch; // pixels per row |
39 ColorFormat format; //pixel format | 39 ColorFormat format; // pixel format |
40 ImageBuffer buffer; | 40 ImageBuffer buffer; |
41 }; | 41 }; |
42 | 42 |
43 struct SupportedImageProperties { | 43 struct SupportedImageProperties { |
44 array<ColorFormat> formats; | 44 array<ColorFormat> formats; |
45 mojo.Size size; | 45 mojo.Size size; |
46 }; | 46 }; |
OLD | NEW |