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

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: minor changes to make it build with GCC on fnl 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 [DartPackage="mojo_services"]
6 module mojo.gfx;
7
8 import "geometry/interfaces/geometry.mojom";
9
10 //This should probably be a system wide list (maybe in exists already?) since
11 //this is undoubtably not the only interface that will care about color formats
12 enum PixelLayout {
13 RGBA_8888 = 0,
14 BGRA_8888 = 1,
15 };
16
17 enum ColorSpace {
18 SRGB = 0,
19 };
20
21 struct ColorFormat {
22 PixelLayout layout;
23 ColorSpace color_space;
24 };
25
26 //ImageBuffer is a thin wrapper around a handle for a platform memory handle
27 //which includes some basic metadata about the image. This may eventually be
28 //provided by some other, more general purpose system This should probably be
29 //where we put flags/properties about the buffer that are not image specific
30 //(Like whether it is CPU or GPU memory, what the layout is like, etc.)
31 struct ImageBuffer {
32 uint64 size;
33 handle data;
34 };
35
36 //Image wraps ImageBuffer and provides image-specific metadata for the buffer
37 struct Image {
38 mojo.Size size; //width and height of image in pixels
39 uint32 stride; //bytes per row
40 uint32 pitch; // pixels per row
41 ColorFormat format; //pixel format
42 ImageBuffer buffer;
43 };
44
45 struct SupportedImageProperties {
46 array<ColorFormat> formats;
47 mojo.Size size;
48 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698