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

Unified Diff: cc/scrollbar_layer.cc

Issue 11503005: cc: Refactor content scale/bounds into draw properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: cc/scrollbar_layer.cc
diff --git a/cc/scrollbar_layer.cc b/cc/scrollbar_layer.cc
index 83152bb34bffb76d147b5bb8fd95627906a53e9a..075b9c29ca30f077e6e0366f6ccf10b634ad95b8 100644
--- a/cc/scrollbar_layer.cc
+++ b/cc/scrollbar_layer.cc
@@ -68,9 +68,10 @@ float ScrollbarLayer::clampScaleToMaxTextureSize(float scale) {
return scale;
}
-void ScrollbarLayer::setContentsScale(float contentsScale) {
- contentsScale = clampScaleToMaxTextureSize(contentsScale);
- ContentsScalingLayer::setContentsScale(contentsScale);
+void ScrollbarLayer::setIdealContentsScale(float scale)
+{
+ float contentsScale = clampScaleToMaxTextureSize(scale);
+ ContentsScalingLayer::setIdealContentsScale(contentsScale);
DCHECK_LE(contentBounds().width(), maxTextureSize());
DCHECK_LE(contentBounds().height(), maxTextureSize());
}

Powered by Google App Engine
This is Rietveld 408576698