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

Unified Diff: cc/tiled_layer.cc

Issue 11361186: ui: Add methods to clamp Sizes, Points, and Vectors from above or below. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/page_scale_animation.cc ('k') | ui/gfx/point_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiled_layer.cc
diff --git a/cc/tiled_layer.cc b/cc/tiled_layer.cc
index b152bfae6468790570d37005a8b21df8ece6e1d7..f3377b12efc063fe751b06fc85ed6146198cee85 100644
--- a/cc/tiled_layer.cc
+++ b/cc/tiled_layer.cc
@@ -134,8 +134,8 @@ void TiledLayer::updateTileSizeAndTilingOption()
gfx::Size requestedSize = isTiled ? tileSize : contentBounds();
const int maxSize = layerTreeHost()->rendererCapabilities().maxTextureSize;
- gfx::Size clampedSize = ClampSizeFromAbove(requestedSize, gfx::Size(maxSize, maxSize));
- setTileSize(clampedSize);
+ requestedSize.ClampToMax(gfx::Size(maxSize, maxSize));
+ setTileSize(requestedSize);
}
void TiledLayer::updateBounds()
« no previous file with comments | « cc/page_scale_animation.cc ('k') | ui/gfx/point_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698