| 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 #include "cc/layer.h" | 8 #include "cc/layer.h" |
| 9 | 9 |
| 10 namespace WebKit { | 10 namespace WebKit { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 static scoped_refptr<TextureLayer> create(TextureLayerClient*); | 24 static scoped_refptr<TextureLayer> create(TextureLayerClient*); |
| 25 | 25 |
| 26 void clearClient() { m_client = 0; } | 26 void clearClient() { m_client = 0; } |
| 27 | 27 |
| 28 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; | 28 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; |
| 29 | 29 |
| 30 // Sets whether this texture should be Y-flipped at draw time. Defaults to t
rue. | 30 // Sets whether this texture should be Y-flipped at draw time. Defaults to t
rue. |
| 31 void setFlipped(bool); | 31 void setFlipped(bool); |
| 32 | 32 |
| 33 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). | 33 // Sets a UV transform to be used at draw time. Defaults to (0, 0, 1, 1). |
| 34 void setUVRect(const FloatRect&); | 34 void setUVRect(const gfx::RectF&); |
| 35 | 35 |
| 36 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau
lts to true. | 36 // Sets whether the alpha channel is premultiplied or unpremultiplied. Defau
lts to true. |
| 37 void setPremultipliedAlpha(bool); | 37 void setPremultipliedAlpha(bool); |
| 38 | 38 |
| 39 // Sets whether this context should rate limit on damage to prevent too many
frames from | 39 // Sets whether this context should rate limit on damage to prevent too many
frames from |
| 40 // being queued up before the compositor gets a chance to run. Requires a no
n-nil client. | 40 // being queued up before the compositor gets a chance to run. Requires a no
n-nil client. |
| 41 // Defaults to false. | 41 // Defaults to false. |
| 42 void setRateLimitContext(bool); | 42 void setRateLimitContext(bool); |
| 43 | 43 |
| 44 // Code path for plugins which supply their own texture ID. | 44 // Code path for plugins which supply their own texture ID. |
| 45 void setTextureId(unsigned); | 45 void setTextureId(unsigned); |
| 46 | 46 |
| 47 void willModifyTexture(); | 47 void willModifyTexture(); |
| 48 | 48 |
| 49 virtual void setNeedsDisplayRect(const FloatRect&) OVERRIDE; | 49 virtual void setNeedsDisplayRect(const gfx::RectF&) OVERRIDE; |
| 50 | 50 |
| 51 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; | 51 virtual void setLayerTreeHost(LayerTreeHost*) OVERRIDE; |
| 52 virtual bool drawsContent() const OVERRIDE; | 52 virtual bool drawsContent() const OVERRIDE; |
| 53 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) OVERRIDE; | 53 virtual void update(ResourceUpdateQueue&, const OcclusionTracker*, Rendering
Stats&) OVERRIDE; |
| 54 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; | 54 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; |
| 55 | 55 |
| 56 protected: | 56 protected: |
| 57 explicit TextureLayer(TextureLayerClient*); | 57 explicit TextureLayer(TextureLayerClient*); |
| 58 virtual ~TextureLayer(); | 58 virtual ~TextureLayer(); |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 TextureLayerClient* m_client; | 61 TextureLayerClient* m_client; |
| 62 | 62 |
| 63 bool m_flipped; | 63 bool m_flipped; |
| 64 FloatRect m_uvRect; | 64 gfx::RectF m_uvRect; |
| 65 bool m_premultipliedAlpha; | 65 bool m_premultipliedAlpha; |
| 66 bool m_rateLimitContext; | 66 bool m_rateLimitContext; |
| 67 bool m_contextLost; | 67 bool m_contextLost; |
| 68 bool m_contentCommitted; | 68 bool m_contentCommitted; |
| 69 | 69 |
| 70 unsigned m_textureId; | 70 unsigned m_textureId; |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } | 73 } |
| 74 #endif | 74 #endif |
| OLD | NEW |