Mandoline + CC: Move ReturnedResource to compositor_frame.mojom and add comments
[chromium-blink-merge.git] / components / view_manager / public / interfaces / surfaces.mojom
blob2b5eae6b95530321591462867bd4350982f7aeda
1 // Copyright 2014 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.
5 module mojo;
7 import "components/view_manager/public/interfaces/compositor_frame.mojom";
9 interface Surface {
10   // Request the id namespace for this connection. Fully qualified surface ids
11   // are the combination of the id_namespace for the connection that created the
12   // surface and the id_local component allocated by the caller.
13   GetIdNamespace() => (uint32 id_namespace);
15   // Sets a ResourceReturner that will receive unused resources.
16   SetResourceReturner(ResourceReturner returner);
18   // Creates a new surface with the given local identifier. Once a surface is
19   // created the caller may submit frames to it or destroy it using the local
20   // identifier. The caller can also produce a fully qualified surface id that
21   // can be embedded in frames produces by different connections.
22   CreateSurface(uint32 id_local);
24   // After the submitted frame is drawn for the first time, the surface will
25   // respond to the SubmitCompositorFrame message. Clients should use this
26   // acknowledgement to ratelimit frame submissions.
27   SubmitCompositorFrame(uint32 id_local, CompositorFrame frame) => ();
28   DestroySurface(uint32 id_local);