| 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_TEXTURE_LAYER_IMPL_H_ | 5 #ifndef CC_TEXTURE_LAYER_IMPL_H_ |
| 6 #define CC_TEXTURE_LAYER_IMPL_H_ | 6 #define CC_TEXTURE_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| 11 #include "cc/cc_export.h" | 11 #include "cc/cc_export.h" |
| 12 #include "cc/layer_impl.h" | 12 #include "cc/layer_impl.h" |
| 13 | 13 |
| 14 namespace cc { | 14 namespace cc { |
| 15 | 15 |
| 16 class CC_EXPORT TextureLayerImpl : public LayerImpl { | 16 class CC_EXPORT TextureLayerImpl : public LayerImpl { |
| 17 public: | 17 public: |
| 18 static scoped_ptr<TextureLayerImpl> create(LayerTreeImpl* treeImpl, int id,
bool usesMailbox) | 18 static scoped_ptr<TextureLayerImpl> create(LayerTreeImpl* treeImpl, int id,
bool usesMailbox) |
| 19 { | 19 { |
| 20 return make_scoped_ptr(new TextureLayerImpl(treeImpl, id, usesMailbox)); | 20 return make_scoped_ptr(new TextureLayerImpl(treeImpl, id, usesMailbox)); |
| 21 } | 21 } |
| 22 virtual ~TextureLayerImpl(); | 22 virtual ~TextureLayerImpl(); |
| 23 | 23 |
| 24 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeImpl*) OVERRIDE; |
| 25 virtual void pushPropertiesTo(LayerImpl*) OVERRIDE; |
| 26 |
| 24 virtual void willDraw(ResourceProvider*) OVERRIDE; | 27 virtual void willDraw(ResourceProvider*) OVERRIDE; |
| 25 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; | 28 virtual void appendQuads(QuadSink&, AppendQuadsData&) OVERRIDE; |
| 26 virtual void didDraw(ResourceProvider*) OVERRIDE; | 29 virtual void didDraw(ResourceProvider*) OVERRIDE; |
| 27 | 30 |
| 28 virtual void didLoseOutputSurface() OVERRIDE; | 31 virtual void didLoseOutputSurface() OVERRIDE; |
| 29 | 32 |
| 30 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; | 33 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE; |
| 31 | 34 |
| 32 unsigned textureId() const { return m_textureId; } | 35 unsigned textureId() const { return m_textureId; } |
| 33 void setTextureId(unsigned id) { m_textureId = id; } | 36 void setTextureId(unsigned id) { m_textureId = id; } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 58 float m_vertexOpacity[4]; | 61 float m_vertexOpacity[4]; |
| 59 | 62 |
| 60 bool m_hasPendingMailbox; | 63 bool m_hasPendingMailbox; |
| 61 TextureMailbox m_pendingTextureMailbox; | 64 TextureMailbox m_pendingTextureMailbox; |
| 62 bool m_usesMailbox; | 65 bool m_usesMailbox; |
| 63 }; | 66 }; |
| 64 | 67 |
| 65 } | 68 } |
| 66 | 69 |
| 67 #endif // CC_TEXTURE_LAYER_IMPL_H_ | 70 #endif // CC_TEXTURE_LAYER_IMPL_H_ |
| OLD | NEW |