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

Side by Side Diff: mojo/services/gfx/composition/interfaces/resources.mojom

Issue 1552963002: Initial checkin of the new Mozart compositor. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-11
Patch Set: Created 4 years, 11 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.composition;
7
8 import "mojo/services/geometry/interfaces/geometry.mojom";
9 import "mojo/services/gfx/composition/interfaces/scene_token.mojom";
10
11 // Resources are references to foreign objects which are being imported into
12 // the scene graph, such as images and other scenes. Each resource must be
13 // given a locally unique identifier when it is bound to the scene.
14 union Resource {
15 SceneResource scene;
16 MailboxTextureResource mailbox_texture;
17 };
18
19 // Scene resource declaration.
20 //
21 // Binds a resource id to a scene given its scene token.
22 //
23 // If the scene referenced by the token becomes unavailable, the
24 // |Scene.OnResourceUnavailable| event will be sent.
25 struct SceneResource {
26 // The scene token of the referenced scene.
27 SceneToken scene_token;
28 };
29
30 // Mailbox texture resource declaration.
31 //
32 // Binds a resource id to a texture transferred via a GL mailbox.
33 // Assumes the format is RGBA_8888 and the target is GL_TEXTURE_2D.
34 //
35 // If the texture referenced by the token becomes unavailable, the
36 // |Scene.OnResourceUnavailable| event will be sent.
37 //
38 // TODO(jeffbrown): Replace this with Image and ImagePipe.
39 struct MailboxTextureResource {
40 // The name of the mailbox, as produced by glGenMailboxCHROMIUM().
41 array<uint8, 64> mailbox_name;
42
43 // The sync point which indicates completion of texture rendering, as
44 // produced by glInsertSyncPointCHROMIUM().
45 uint32 sync_point;
46
47 // The size of the texture in pixels.
48 mojo.Size size;
49
50 // The callback interface to be notified when it is safe to release or
51 // recycle the underlying texture storage once the resource has been
52 // removed from the scene.
53 MailboxTextureCallback callback;
54 };
55
56 // Release callback for MailboxTextureResources.
57 interface MailboxTextureCallback {
58 // Called some time after a mailbox texture is removed from the scene
59 // to indicate that it is now safe to release or recycle the underlying
60 // texture storage.
61 OnMailboxTextureReleased();
62 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698