OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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_TREES_LAYER_TREE_HOST_SINGLE_THREAD_CLIENT_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_SINGLE_THREAD_CLIENT_H_ |
| 7 |
| 8 namespace cc { |
| 9 |
| 10 class LayerTreeHostSingleThreadClient { |
| 11 public: |
| 12 // Request that the client schedule a composite. |
| 13 virtual void ScheduleComposite() = 0; |
| 14 |
| 15 // Called whenever the compositor posts a SwapBuffers (either full or |
| 16 // partial). After DidPostSwapBuffers(), exactly one of |
| 17 // LayerTreeHostClient::DidCompleteSwapBuffers() or DidAbortSwapBuffers() will |
| 18 // be called, thus these functions can be used to keep track of pending swap |
| 19 // buffers calls for rate limiting. |
| 20 virtual void DidPostSwapBuffers() = 0; |
| 21 virtual void DidAbortSwapBuffers() = 0; |
| 22 |
| 23 protected: |
| 24 virtual ~LayerTreeHostSingleThreadClient() {} |
| 25 }; |
| 26 |
| 27 } // namespace cc |
| 28 |
| 29 #endif // CC_TREES_LAYER_TREE_HOST_SINGLE_THREAD_CLIENT_H_ |
OLD | NEW |