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 #include "cc/test/tiled_layer_test_common.h" | 5 #include "cc/test/tiled_layer_test_common.h" |
6 | 6 |
7 using cc::LayerTilingData; | 7 using cc::LayerTilingData; |
8 using cc::LayerUpdater; | 8 using cc::LayerUpdater; |
9 using cc::PriorityCalculator; | 9 using cc::PriorityCalculator; |
10 using cc::PrioritizedResource; | 10 using cc::PrioritizedResource; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // set (the layer is an orphan for the test), then just set a surface on its
elf. | 118 // set (the layer is an orphan for the test), then just set a surface on its
elf. |
119 bool missingTargetRenderSurface = !renderTarget(); | 119 bool missingTargetRenderSurface = !renderTarget(); |
120 | 120 |
121 if (missingTargetRenderSurface) | 121 if (missingTargetRenderSurface) |
122 createRenderSurface(); | 122 createRenderSurface(); |
123 | 123 |
124 TiledLayer::setTexturePriorities(calculator); | 124 TiledLayer::setTexturePriorities(calculator); |
125 | 125 |
126 if (missingTargetRenderSurface) { | 126 if (missingTargetRenderSurface) { |
127 clearRenderSurface(); | 127 clearRenderSurface(); |
128 setRenderTarget(0); | 128 drawProperties().render_target = 0; |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 cc::PrioritizedResourceManager* FakeTiledLayer::resourceManager() const | 132 cc::PrioritizedResourceManager* FakeTiledLayer::resourceManager() const |
133 { | 133 { |
134 return m_resourceManager; | 134 return m_resourceManager; |
135 } | 135 } |
136 | 136 |
137 cc::LayerUpdater* FakeTiledLayer::updater() const | 137 cc::LayerUpdater* FakeTiledLayer::updater() const |
138 { | 138 { |
(...skipping 14 matching lines...) Expand all Loading... |
153 { | 153 { |
154 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(
); | 154 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(
); |
155 } | 155 } |
156 | 156 |
157 void FakeTiledLayerWithScaledBounds::setContentsScale(float) | 157 void FakeTiledLayerWithScaledBounds::setContentsScale(float) |
158 { | 158 { |
159 NOTREACHED(); | 159 NOTREACHED(); |
160 } | 160 } |
161 | 161 |
162 } // namespace | 162 } // namespace |
OLD | NEW |