blob: f0a9ee0c507c3e45f683dcfb3685bfe86b059800 [file] [log] [blame]
[email protected]0fb25002012-10-12 07:20:021// 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]cd57cc5a2012-10-12 22:43:414
[email protected]cc3cfaa2013-03-18 09:05:525#ifndef CC_LAYERS_TEXTURE_LAYER_CLIENT_H_
6#define CC_LAYERS_TEXTURE_LAYER_CLIENT_H_
[email protected]cd57cc5a2012-10-12 22:43:417
8namespace WebKit {
9class WebGraphicsContext3D;
10}
11
12namespace cc {
[email protected]b4da2032012-10-25 21:22:5513class ResourceUpdateQueue;
[email protected]cd57cc5a2012-10-12 22:43:4114
[email protected]96baf3e2012-10-22 23:09:5515class TextureLayerClient {
[email protected]cd57cc5a2012-10-12 22:43:4116public:
17 // Called to prepare this layer's texture for compositing. The client may queue a texture
[email protected]b4da2032012-10-25 21:22:5518 // upload or copy on the ResourceUpdateQueue.
[email protected]cd57cc5a2012-10-12 22:43:4119 // Returns the texture ID to be used for compositing.
[email protected]b4da2032012-10-25 21:22:5520 virtual unsigned prepareTexture(ResourceUpdateQueue&) = 0;
[email protected]cd57cc5a2012-10-12 22:43:4121
22 // Returns the context that is providing the texture. Used for rate limiting and detecting lost context.
23 virtual WebKit::WebGraphicsContext3D* context() = 0;
24
25protected:
[email protected]96baf3e2012-10-22 23:09:5526 virtual ~TextureLayerClient() { }
[email protected]cd57cc5a2012-10-12 22:43:4127};
28
29}
30
[email protected]cc3cfaa2013-03-18 09:05:5231#endif // CC_LAYERS_TEXTURE_LAYER_CLIENT_H_