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

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: rebased. the ImagePipe interface doesnt pass interfaces anyway so it didnt really change anything Created 4 years, 9 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 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 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
10 // this is undoubtably not the only interface that will care about color formats
11 enum PixelLayout {
12 BGRA_8888 = 0,
13 };
14
15 enum ColorSpace {
16 SRGB = 0,
17 };
18
19 struct ColorFormat {
20 PixelLayout layout;
21 ColorSpace color_space;
22 };
23
24 // ImageBuffer is a thin wrapper around a handle for a platform memory handle
25 // which includes some basic metadata about the image. This may eventually 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
28 // (Like whether it is CPU or GPU memory, what the layout is like, etc.)
29 struct ImageBuffer {
30 uint64 size;
31 handle data;
32 };
33
34 // Image wraps ImageBuffer and provides image-specific metadata for the buffer
35 struct Image {
36 mojo.Size size; //width and height of image in pixels
37 uint32 stride; //bytes per row
38 uint32 pitch; // pixels per row
39 ColorFormat format; //pixel format
40 ImageBuffer buffer;
41 };
42
43 struct SupportedImageProperties {
jeffbrown 2016/03/03 23:09:58 move to image_pipe.mojom
jeffbrown 2016/03/03 23:10:40 On second thought, don't.
Forrest Reiling 2016/03/04 21:04:28 Acknowledged.
Forrest Reiling 2016/03/04 21:04:28 Acknowledged.
44 array<ColorFormat> formats;
45 mojo.Size size;
46 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698