[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 | |
8 | namespace WebKit { | ||||
9 | class WebGraphicsContext3D; | ||||
10 | } | ||||
11 | |||||
12 | namespace cc { | ||||
[email protected] | b4da203 | 2012-10-25 21:22:55 | [diff] [blame] | 13 | class ResourceUpdateQueue; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 14 | |
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 15 | class TextureLayerClient { |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 16 | public: |
17 | // Called to prepare this layer's texture for compositing. The client may queue a texture | ||||
[email protected] | b4da203 | 2012-10-25 21:22:55 | [diff] [blame] | 18 | // upload or copy on the ResourceUpdateQueue. |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 19 | // Returns the texture ID to be used for compositing. |
[email protected] | b4da203 | 2012-10-25 21:22:55 | [diff] [blame] | 20 | virtual unsigned prepareTexture(ResourceUpdateQueue&) = 0; |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 21 | |
22 | // Returns the context that is providing the texture. Used for rate limiting and detecting lost context. | ||||
23 | virtual WebKit::WebGraphicsContext3D* context() = 0; | ||||
24 | |||||
25 | protected: | ||||
[email protected] | 96baf3e | 2012-10-22 23:09:55 | [diff] [blame] | 26 | virtual ~TextureLayerClient() { } |
[email protected] | cd57cc5a | 2012-10-12 22:43:41 | [diff] [blame] | 27 | }; |
28 | |||||
29 | } | ||||
30 | |||||
[email protected] | cc3cfaa | 2013-03-18 09:05:52 | [diff] [blame^] | 31 | #endif // CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |