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

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

Issue 11276060: Pass accurate contentsScale to LayerImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698