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

Side by Side Diff: mojo/services/gfx/images/interfaces/image.mojom

Issue 1595773002: Added ImagePipe (Closed) Base URL: https://github.com/domokit/mojo.git@submit-2
Patch Set: Expose InterfacePtr::encountered_error() through ImagePipeProducerEndpoint so the GL on ImagePipe i… Created 4 years, 10 months 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
OLDNEW
(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 module mojo.gfx;
6
7 import "geometry/interfaces/geometry.mojom";
8
9 //This should probably be a system wide list (maybe in exists already?) since
jamesr 2016/02/18 20:40:59 space after "//"
Forrest Reiling 2016/02/25 00:35:15 Done.
10 //this is undoubtably not the only interface that will care about color formats
11 enum PixelLayout {
12 RGBA_8888 = 0,
13 BGRA_8888 = 1,
jamesr 2016/02/18 20:40:59 do we actually support both of these? can we just
Forrest Reiling 2016/02/25 00:35:15 I think these come from differences in GL vs Vulka
14 };
15
16 enum ColorSpace {
17 SRGB = 0,
18 };
19
20 struct ColorFormat {
21 PixelLayout layout;
22 ColorSpace color_space;
23 };
24
25 //ImageBuffer is a thin wrapper around a handle for a platform memory handle
26 //which includes some basic metadata about the image. This may eventually be
27 //provided by some other, more general purpose system This should probably be
28 //where we put flags/properties about the buffer that are not image specific
29 //(Like whether it is CPU or GPU memory, what the layout is like, etc.)
30 struct ImageBuffer {
31 uint64 size;
32 handle data;
33 };
34
35 //Image wraps ImageBuffer and provides image-specific metadata for the buffer
36 struct Image {
37 mojo.Size size; //width and height of image in pixels
38 uint32 stride; //bytes per row
39 uint32 pitch; // pixels per row
40 ColorFormat format; //pixel format
41 ImageBuffer buffer;
42 };
43
44 struct SupportedImageProperties {
45 array<ColorFormat> formats;
46 mojo.Size size;
47 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698