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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 FakeTiledLayer::~FakeTiledLayer() | 105 FakeTiledLayer::~FakeTiledLayer() |
106 { | 106 { |
107 } | 107 } |
108 | 108 |
109 void FakeTiledLayer::setNeedsDisplayRect(const gfx::RectF& rect) | 109 void FakeTiledLayer::setNeedsDisplayRect(const gfx::RectF& rect) |
110 { | 110 { |
111 m_lastNeedsDisplayRect = rect; | 111 m_lastNeedsDisplayRect = rect; |
112 TiledLayer::setNeedsDisplayRect(rect); | 112 TiledLayer::setNeedsDisplayRect(rect); |
113 } | 113 } |
114 | 114 |
| 115 void FakeTiledLayer::setCanUseLCDText(bool useLCDText) |
| 116 { |
| 117 // FIXME: Do not call TiledLayer::setCanUseLCDText, which changes border-tex
el option. |
| 118 // Otherwise tests that rely on NoBorderTexels data and count the number of
commits/updates will fail. |
| 119 // This will be fixed once we decouple using LCD text and border texels on t
iles. |
| 120 // crbug.com/160072 |
| 121 Layer::setCanUseLCDText(useLCDText); |
| 122 } |
| 123 |
115 void FakeTiledLayer::setTexturePriorities(const PriorityCalculator& calculator) | 124 void FakeTiledLayer::setTexturePriorities(const PriorityCalculator& calculator) |
116 { | 125 { |
117 // Ensure there is always a target render surface available. If none has bee
n | 126 // Ensure there is always a target render surface available. If none has bee
n |
118 // set (the layer is an orphan for the test), then just set a surface on its
elf. | 127 // set (the layer is an orphan for the test), then just set a surface on its
elf. |
119 bool missingTargetRenderSurface = !renderTarget(); | 128 bool missingTargetRenderSurface = !renderTarget(); |
120 | 129 |
121 if (missingTargetRenderSurface) | 130 if (missingTargetRenderSurface) |
122 createRenderSurface(); | 131 createRenderSurface(); |
123 | 132 |
124 TiledLayer::setTexturePriorities(calculator); | 133 TiledLayer::setTexturePriorities(calculator); |
(...skipping 28 matching lines...) Expand all Loading... |
153 { | 162 { |
154 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(
); | 163 return static_cast<float>(m_forcedContentBounds.height()) / bounds().height(
); |
155 } | 164 } |
156 | 165 |
157 void FakeTiledLayerWithScaledBounds::setContentsScale(float) | 166 void FakeTiledLayerWithScaledBounds::setContentsScale(float) |
158 { | 167 { |
159 NOTREACHED(); | 168 NOTREACHED(); |
160 } | 169 } |
161 | 170 |
162 } // namespace | 171 } // namespace |
OLD | NEW |