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 #include "config.h" | 5 #include "config.h" |
6 | 6 |
7 #if USE(ACCELERATED_COMPOSITING) | 7 #if USE(ACCELERATED_COMPOSITING) |
8 | 8 |
9 #include "TextureLayerChromium.h" | 9 #include "TextureLayerChromium.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 TextureLayerChromium::~TextureLayerChromium() | 35 TextureLayerChromium::~TextureLayerChromium() |
36 { | 36 { |
37 if (layerTreeHost()) { | 37 if (layerTreeHost()) { |
38 if (m_textureId) | 38 if (m_textureId) |
39 layerTreeHost()->acquireLayerTextures(); | 39 layerTreeHost()->acquireLayerTextures(); |
40 if (m_rateLimitContext && m_client) | 40 if (m_rateLimitContext && m_client) |
41 layerTreeHost()->stopRateLimiter(m_client->context()); | 41 layerTreeHost()->stopRateLimiter(m_client->context()); |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 PassOwnPtr<CCLayerImpl> TextureLayerChromium::createCCLayerImpl() | 45 scoped_ptr<CCLayerImpl> TextureLayerChromium::createCCLayerImpl() |
46 { | 46 { |
47 return CCTextureLayerImpl::create(m_layerId); | 47 return CCTextureLayerImpl::create(m_layerId).PassAs<CCLayerImpl>(); |
48 } | 48 } |
49 | 49 |
50 void TextureLayerChromium::setFlipped(bool flipped) | 50 void TextureLayerChromium::setFlipped(bool flipped) |
51 { | 51 { |
52 m_flipped = flipped; | 52 m_flipped = flipped; |
53 setNeedsCommit(); | 53 setNeedsCommit(); |
54 } | 54 } |
55 | 55 |
56 void TextureLayerChromium::setUVRect(const FloatRect& rect) | 56 void TextureLayerChromium::setUVRect(const FloatRect& rect) |
57 { | 57 { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer); | 126 CCTextureLayerImpl* textureLayer = static_cast<CCTextureLayerImpl*>(layer); |
127 textureLayer->setFlipped(m_flipped); | 127 textureLayer->setFlipped(m_flipped); |
128 textureLayer->setUVRect(m_uvRect); | 128 textureLayer->setUVRect(m_uvRect); |
129 textureLayer->setPremultipliedAlpha(m_premultipliedAlpha); | 129 textureLayer->setPremultipliedAlpha(m_premultipliedAlpha); |
130 textureLayer->setTextureId(m_textureId); | 130 textureLayer->setTextureId(m_textureId); |
131 } | 131 } |
132 | 132 |
133 } | 133 } |
134 #endif // USE(ACCELERATED_COMPOSITING) | 134 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |