OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_TEXTURE_LAYER_H_ | 5 #ifndef CC_TEXTURE_LAYER_H_ |
6 #define CC_TEXTURE_LAYER_H_ | 6 #define CC_TEXTURE_LAYER_H_ |
7 | 7 |
8 #include "cc/cc_export.h" | 8 #include "cc/cc_export.h" |
9 #include "cc/layer.h" | 9 #include "cc/layer.h" |
10 | 10 |
11 namespace WebKit { | 11 namespace WebKit { |
12 class WebGraphicsContext3D; | 12 class WebGraphicsContext3D; |
13 } | 13 } |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 class TextureLayerClient; | 17 class TextureLayerClient; |
18 | 18 |
19 // A Layer containing a the rendered output of a plugin instance. | 19 // A Layer containing a the rendered output of a plugin instance. |
20 class CC_EXPORT TextureLayer : public Layer { | 20 class CC_EXPORT TextureLayer : public Layer { |
21 public: | 21 public: |
22 // If this texture layer requires special preparation logic for each frame d
riven by | 22 // If this texture layer requires special preparation logic for each frame d
riven by |
23 // the compositor, pass in a non-nil client. Pass in a nil client pointer if
texture updates | 23 // the compositor, pass in a non-nil client. Pass in a nil client pointer if
texture updates |
24 // are driven by an external process. | 24 // are driven by an external process. |
25 static scoped_refptr<TextureLayer> create(TextureLayerClient*); | 25 static scoped_refptr<TextureLayer> create(TextureLayerClient*); |
26 | 26 |
27 void clearClient() { m_client = 0; } | 27 void clearClient() { m_client = 0; } |
28 | 28 |
29 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; | 29 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeHostImpl* hostImpl) O
VERRIDE; |
30 | 30 |
31 // Sets whether this texture should be Y-flipped at draw time. Defaults to t
rue. | 31 // Sets whether this texture should be Y-flipped at draw time. Defaults to t
rue. |
32 void setFlipped(bool); | 32 void setFlipped(bool); |
33 | 33 |
34 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). | 34 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). |
35 void setUVRect(const gfx::RectF&); | 35 void setUVRect(const gfx::RectF&); |
36 | 36 |
37 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau
lts to true. | 37 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau
lts to true. |
38 void setPremultipliedAlpha(bool); | 38 void setPremultipliedAlpha(bool); |
39 | 39 |
(...skipping 26 matching lines...) Expand all Loading... |
66 bool m_premultipliedAlpha; | 66 bool m_premultipliedAlpha; |
67 bool m_rateLimitContext; | 67 bool m_rateLimitContext; |
68 bool m_contextLost; | 68 bool m_contextLost; |
69 bool m_contentCommitted; | 69 bool m_contentCommitted; |
70 | 70 |
71 unsigned m_textureId; | 71 unsigned m_textureId; |
72 }; | 72 }; |
73 | 73 |
74 } | 74 } |
75 #endif // CC_TEXTURE_LAYER_H_ | 75 #endif // CC_TEXTURE_LAYER_H_ |
OLD | NEW |