[email protected] | 0fb2500 | 2012-10-12 07:20:02 | [diff] [blame] | 1 | // Copyright 2012 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. | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 4 | |
[email protected] | cc3cfaa | 2013-03-18 09:05:52 | [diff] [blame] | 5 | #ifndef CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |
6 | #define CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 7 | |
[email protected] | 9260757f | 2013-09-17 01:24:16 | [diff] [blame] | 8 | #include "cc/resources/single_release_callback.h" |
9 | |||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 10 | namespace cc { |
[email protected] | b4da203 | 2012-10-25 21:22:55 | [diff] [blame] | 11 | class ResourceUpdateQueue; |
[email protected] | e8e4ae23 | 2013-04-12 00:26:01 | [diff] [blame] | 12 | class TextureMailbox; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 13 | |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 14 | class TextureLayerClient { |
[email protected] | 8b104060 | 2013-03-19 17:28:09 | [diff] [blame] | 15 | public: |
[email protected] | e8e4ae23 | 2013-04-12 00:26:01 | [diff] [blame] | 16 | // Returns true and provides a mailbox if a new frame is available. |
17 | // Returns false if no new data is available | ||||
18 | // and the old mailbox is to be reused. | ||||
[email protected] | 9260757f | 2013-09-17 01:24:16 | [diff] [blame] | 19 | virtual bool PrepareTextureMailbox( |
20 | TextureMailbox* mailbox, | ||||
21 | scoped_ptr<SingleReleaseCallback>* release_callback, | ||||
22 | bool use_shared_memory) = 0; | ||||
[email protected] | e8e4ae23 | 2013-04-12 00:26:01 | [diff] [blame] | 23 | |
[email protected] | 8b104060 | 2013-03-19 17:28:09 | [diff] [blame] | 24 | protected: |
25 | virtual ~TextureLayerClient() {} | ||||
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 26 | }; |
27 | |||||
[email protected] | 8b104060 | 2013-03-19 17:28:09 | [diff] [blame] | 28 | } // namespace cc |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 29 | |
[email protected] | cc3cfaa | 2013-03-18 09:05:52 | [diff] [blame] | 30 | #endif // CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |