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