// Copyright 2014 The Chromium Authors. All rights reserved. // 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" module mojo.surfaces { enum ResourceFormat { RGBA_8888, RGBA_4444, BGRA_8888, LUMINANCE_8, RGB_565, ETC1, }; struct Mailbox { // Should have exactly 64 entries. int8[] name; }; struct MailboxHolder { Mailbox mailbox; uint32 texture_target; uint32 sync_point; }; struct TransferableResource { uint32 id; ResourceFormat format; uint32 filter; mojo.Size size; MailboxHolder mailbox_holder; bool is_repeated; bool is_software; }; struct Frame { TransferableResource[] resources; Pass[] passes; }; interface SurfaceClient { ReturnResources(TransferableResource[] resources); }; [client=SurfaceClient] interface Surface { CreateSurface(SurfaceId id, mojo.Size size); SubmitFrame(SurfaceId id, Frame frame); DestroySurface(SurfaceId id); }; }