Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: cc/test/tiled_layer_test_common.cc

Issue 11360093: Mark layers that can use LCD text based on layer transform and opacity. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase with TOT, addressed comments Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698