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

Side by Side Diff: mojo/services/gfx/images/interfaces/image_pipe.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 import "gfx/images/interfaces/image.mojom";
9
10 //The status of the last time this image was presented
11 enum PresentationStatus {
12 PRESENTED = 0,
13 //Image properties are not supported by the consumer (this is not neccessarily
14 // an error, as these properties could have changed after the image was added)
15 NOT_PRESENTED_INVALID_PROPERTIES,
16 //Producer flushed the image pool
17 NOT_PRESENTED_FLUSHED,
18 };
19
20 //ImagePipe is a collection of semantics for streaming shared images between two
21 //Mojo entities, one of which provides the image contents (the 'producer') and
22 //one of which does something with the image contents (the 'consumer').
23 //It operates conceptually on a pool of image descriptors that the pipe knows
24 //about, allows image producers to add/remove images to/from this pool, and
25 //provides mechanisms for the producer and the consumer to negotiate about who
26 //owns each image in the pool at a given point in time
27 interface ImagePipe {
28
29 //Add an image persistently to the pipe's image pool
30 //Adding an image that is already added, or using an ID that is already in use
31 //are both errors and will cause the connection to terminate
32 AddImage(Image image, uint32 id);
33
34 //Remove an image from the pipe's pool
35 //Use of an invalid ID will cause the connection to be terminated
36 RemoveImage(uint32 id);
37
38 //Mark the image as available for consumption by the consumer
39 //The reply will be sent when the consumer is done using this image and
40 //is ready to release ownership back to the producer.
41 //The reply will not be sent until another Image is presented to replace it
42 //presentuing an id that is added will cause the connection to terminate
43 PresentImage(uint32 id) => (uint32 id, PresentationStatus status);
44
45 //Ask the consumer to release all images in the pipe's pool
46 //this will send the presentation reply with FLUSHED on all images in the pool
47 //not being used by the consumer if the consumer is presenting this image,
48 //that image may still be presented and its Present reply will reflect that
49 FlushImages();
50
51 //Get supported propertied for images added to this pipe
52 //The reply to this method will only be sent when the values change compared
53 //to the last time they were sent (immediately for the first time they are
54 //called), so to listen for continuous updates call this method immediately
55 //after recieving the reply
56 GetSupportedImageProperties() => (SupportedImageProperties supported_propertie s);
57 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698