| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ | 5 #ifndef CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |
| 6 #define CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ | 6 #define CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "cc/resources/single_release_callback.h" | 8 #include "cc/resources/single_release_callback.h" |
| 9 | 9 |
| 10 namespace WebKit { class WebGraphicsContext3D; } | 10 namespace blink { class WebGraphicsContext3D; } |
| 11 | 11 |
| 12 namespace cc { | 12 namespace cc { |
| 13 class ResourceUpdateQueue; | 13 class ResourceUpdateQueue; |
| 14 class TextureMailbox; | 14 class TextureMailbox; |
| 15 | 15 |
| 16 class TextureLayerClient { | 16 class TextureLayerClient { |
| 17 public: | 17 public: |
| 18 // Called to prepare this layer's texture for compositing. | 18 // Called to prepare this layer's texture for compositing. |
| 19 // Returns the texture ID to be used for compositing. | 19 // Returns the texture ID to be used for compositing. |
| 20 virtual unsigned PrepareTexture() = 0; | 20 virtual unsigned PrepareTexture() = 0; |
| 21 | 21 |
| 22 // Returns true and provides a mailbox if a new frame is available. | 22 // Returns true and provides a mailbox if a new frame is available. |
| 23 // Returns false if no new data is available | 23 // Returns false if no new data is available |
| 24 // and the old mailbox is to be reused. | 24 // and the old mailbox is to be reused. |
| 25 virtual bool PrepareTextureMailbox( | 25 virtual bool PrepareTextureMailbox( |
| 26 TextureMailbox* mailbox, | 26 TextureMailbox* mailbox, |
| 27 scoped_ptr<SingleReleaseCallback>* release_callback, | 27 scoped_ptr<SingleReleaseCallback>* release_callback, |
| 28 bool use_shared_memory) = 0; | 28 bool use_shared_memory) = 0; |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 virtual ~TextureLayerClient() {} | 31 virtual ~TextureLayerClient() {} |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 } // namespace cc | 34 } // namespace cc |
| 35 | 35 |
| 36 #endif // CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ | 36 #endif // CC_LAYERS_TEXTURE_LAYER_CLIENT_H_ |
| OLD | NEW |