OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
| 6 #define CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
| 7 |
| 8 #include "cc/resources/returned_resource.h" |
| 9 |
| 10 namespace cc { |
| 11 |
| 12 struct BeginFrameArgs; |
| 13 |
| 14 class CompositorFrameSinkSupportClient { |
| 15 public: |
| 16 // Notification that the previous CompositorFrame given to |
| 17 // SubmitCompositorFrame() has been processed and that another frame |
| 18 // can be submitted. This provides backpressure from the display compositor |
| 19 // so that frames are submitted only at the rate it can handle them. |
| 20 // TODO(fsamuel): This method ought not be necessary with unified BeginFrame. |
| 21 // However, there's a fair amount of cleanup and refactoring necessary to get |
| 22 // rid of it. |
| 23 virtual void DidReceiveCompositorFrameAck() = 0; |
| 24 |
| 25 // Notification for the client to generate a CompositorFrame. |
| 26 virtual void OnBeginFrame(const BeginFrameArgs& args) = 0; |
| 27 |
| 28 // Returns resources sent to SubmitCompositorFrame to be reused or freed. |
| 29 virtual void ReclaimResources(const ReturnedResourceArray& resources) = 0; |
| 30 |
| 31 protected: |
| 32 virtual ~CompositorFrameSinkSupportClient() {} |
| 33 }; |
| 34 |
| 35 } // namespace cc |
| 36 |
| 37 #endif // CC_SURFACES_COMPOSITOR_FRAME_SINK_SUPPORT_CLIENT_H_ |
OLD | NEW |