Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / mojo / services / public / interfaces / surfaces / surfaces.mojom
index 6bb38b7..0aead1e 100644 (file)
@@ -2,24 +2,25 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-import "../geometry/geometry.mojom"
-import "quads.mojom"
-import "surface_id.mojom"
+import "mojo/services/public/interfaces/geometry/geometry.mojom"
+import "mojo/services/gles2/command_buffer.mojom"
+import "mojo/services/public/interfaces/surfaces/quads.mojom"
+import "mojo/services/public/interfaces/surfaces/surface_id.mojom"
 
-module mojo.surfaces {
+module mojo {
 
 enum ResourceFormat {
   RGBA_8888,
   RGBA_4444,
   BGRA_8888,
+  ALPHA_8,
   LUMINANCE_8,
   RGB_565,
   ETC1,
 };
 
 struct Mailbox {
-  // Should have exactly 64 entries.
-  int8[] name;
+  int8[64] name;
 };
 
 struct MailboxHolder {
@@ -32,26 +33,38 @@ struct TransferableResource {
   uint32 id;
   ResourceFormat format;
   uint32 filter;
-  mojo.Size size;
+  Size size;
   MailboxHolder mailbox_holder;
   bool is_repeated;
   bool is_software;
 };
 
+struct ReturnedResource {
+  uint32 id;
+  uint32 sync_point;
+  int32 count;
+  bool lost;
+};
+
 struct Frame {
   TransferableResource[] resources;
   Pass[] passes;
 };
 
 interface SurfaceClient {
-  ReturnResources(TransferableResource[] resources);
+  SetIdNamespace(uint32 id);
+  ReturnResources(ReturnedResource[] resources);
 };
 
-[client=SurfaceClient]
+[Client=SurfaceClient]
 interface Surface {
-  CreateSurface(SurfaceId id, mojo.Size size);
+  CreateSurface(SurfaceId id, Size size);
   SubmitFrame(SurfaceId id, Frame frame);
   DestroySurface(SurfaceId id);
+
+  CreateGLES2BoundSurface(CommandBuffer gles2_client,
+                          SurfaceId id,
+                          Size size);
 };
 
 }