| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 module cc.mojom; | 5 module cc.mojom; |
| 6 | 6 |
| 7 import "cc/ipc/begin_frame_args.mojom"; | 7 import "cc/ipc/begin_frame_args.mojom"; |
| 8 import "cc/ipc/compositor_frame.mojom"; | 8 import "cc/ipc/compositor_frame.mojom"; |
| 9 import "cc/ipc/frame_sink_id.mojom"; | 9 import "cc/ipc/frame_sink_id.mojom"; |
| 10 import "cc/ipc/local_frame_id.mojom"; | 10 import "cc/ipc/local_frame_id.mojom"; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 // to screen the next time frames from all CompositorFrameSinks are aggregated | 26 // to screen the next time frames from all CompositorFrameSinks are aggregated |
| 27 // to produce a display CompositorFrame. If a client wishes to allocate a new | 27 // to produce a display CompositorFrame. If a client wishes to allocate a new |
| 28 // surface (e.g. during resize), then it can simply allocate a new | 28 // surface (e.g. during resize), then it can simply allocate a new |
| 29 // |local_frame_id|. | 29 // |local_frame_id|. |
| 30 // For successful swaps, the implementation must call | 30 // For successful swaps, the implementation must call |
| 31 // DidReceiveCompositorFrameAck() asynchronously when the frame has been | 31 // DidReceiveCompositorFrameAck() asynchronously when the frame has been |
| 32 // processed in order to unthrottle the next frame. | 32 // processed in order to unthrottle the next frame. |
| 33 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id, | 33 SubmitCompositorFrame(cc.mojom.LocalFrameId local_frame_id, |
| 34 cc.mojom.CompositorFrame frame); | 34 cc.mojom.CompositorFrame frame); |
| 35 | 35 |
| 36 // Adds surface references. | |
| 37 AddSurfaceReferences(array<SurfaceReference> references); | |
| 38 | |
| 39 // Removes surface references. | |
| 40 RemoveSurfaceReferences(array<SurfaceReference> references); | |
| 41 | |
| 42 // Notify that the surface is no longer in use (and is okay to be evicted) so | 36 // Notify that the surface is no longer in use (and is okay to be evicted) so |
| 43 // that its resources gets returned in time. | 37 // that its resources gets returned in time. |
| 44 EvictFrame(); | 38 EvictFrame(); |
| 45 | 39 |
| 46 // TODO(staraz): Delete Require() and Satisfy() once surface references | 40 // TODO(staraz): Delete Require() and Satisfy() once surface references |
| 47 // (CL 2541683004) are ready. | 41 // (CL 2541683004) are ready. |
| 48 // Add the provided |sequence| as a destruction dependency of the | 42 // Add the provided |sequence| as a destruction dependency of the |
| 49 // surface associated with the provided |local_frame_id|. | 43 // surface associated with the provided |local_frame_id|. |
| 50 Require(cc.mojom.LocalFrameId local_frame_id, | 44 Require(cc.mojom.LocalFrameId local_frame_id, |
| 51 cc.mojom.SurfaceSequence sequence); | 45 cc.mojom.SurfaceSequence sequence); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 77 }; | 71 }; |
| 78 | 72 |
| 79 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set | 73 // MojoCompositorFrameSinkPrivate is used by the display compositor host to set |
| 80 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is | 74 // up BeginFrameSource hierarchies. This API lives in SurfaceManager but is |
| 81 // called from here in order to ensure that hierarchy registration does not race | 75 // called from here in order to ensure that hierarchy registration does not race |
| 82 // CompositorFrameSink creation. | 76 // CompositorFrameSink creation. |
| 83 interface MojoCompositorFrameSinkPrivate { | 77 interface MojoCompositorFrameSinkPrivate { |
| 84 AddChildFrameSink(FrameSinkId child_frame_sink_id); | 78 AddChildFrameSink(FrameSinkId child_frame_sink_id); |
| 85 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); | 79 RemoveChildFrameSink(FrameSinkId child_frame_sink_id); |
| 86 }; | 80 }; |
| OLD | NEW |