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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "cc/test/tiled_layer_test_common.h" | 7 #include "cc/test/tiled_layer_test_common.h" |
8 | 8 |
9 using namespace cc; | 9 using namespace cc; |
10 | 10 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 cc::LayerUpdater* FakeTiledLayer::updater() const | 132 cc::LayerUpdater* FakeTiledLayer::updater() const |
133 { | 133 { |
134 return m_fakeUpdater.get(); | 134 return m_fakeUpdater.get(); |
135 } | 135 } |
136 | 136 |
137 cc::IntSize FakeTiledLayerWithScaledBounds::contentBounds() const | 137 cc::IntSize FakeTiledLayerWithScaledBounds::contentBounds() const |
138 { | 138 { |
139 return m_forcedContentBounds; | 139 return m_forcedContentBounds; |
140 } | 140 } |
141 | 141 |
| 142 float FakeTiledLayerWithScaledBounds::contentsScaleX() const |
| 143 { |
| 144 return static_cast<float>(m_forcedContentBounds.width()) / bounds().width(); |
| 145 } |
| 146 |
| 147 float FakeTiledLayerWithScaledBounds::contentsScaleY() const |
| 148 { |
| 149 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(
); |
| 150 } |
| 151 |
| 152 void FakeTiledLayerWithScaledBounds::setContentsScale(float) |
| 153 { |
| 154 NOTREACHED(); |
| 155 } |
| 156 |
142 } // namespace | 157 } // namespace |
OLD | NEW |