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

Unified Diff: cc/geometry.h

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 | « no previous file | cc/layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/geometry.h
diff --git a/cc/geometry.h b/cc/geometry.h
index 91989270997e17155654c2f9aa3be0338fdc81b2..e634536cd4e45a1411b6bcad3e39645d1a07ffc7 100644
--- a/cc/geometry.h
+++ b/cc/geometry.h
@@ -12,51 +12,6 @@
namespace cc {
-inline gfx::Size ClampSizeFromAbove(gfx::Size s, gfx::Size other) {
- return gfx::Size(s.width() < other.width() ? s.width() : other.width(),
- s.height() < other.height() ? s.height() : other.height());
-}
-
-inline gfx::Vector2dF ClampFromAbove(gfx::Vector2dF s, gfx::Vector2dF max) {
- return gfx::Vector2dF(s.x() < max.x() ? s.x() : max.x(),
- s.y() < max.y() ? s.y() : max.y());
-}
-
-inline gfx::Vector2dF ClampFromBelow(gfx::Vector2dF s, gfx::Vector2dF min) {
- return gfx::Vector2dF(s.x() > min.x() ? s.x() : min.x(),
- s.y() > min.y() ? s.y() : min.y());
-}
-
-inline gfx::Vector2d ClampFromAbove(gfx::Vector2d s, gfx::Vector2d max) {
- return gfx::Vector2d(s.x() < max.x() ? s.x() : max.x(),
- s.y() < max.y() ? s.y() : max.y());
-}
-
-inline gfx::Vector2d ClampFromBelow(gfx::Vector2d s, gfx::Vector2d min) {
- return gfx::Vector2d(s.x() > min.x() ? s.x() : min.x(),
- s.y() > min.y() ? s.y() : min.y());
-}
-
-inline gfx::PointF ClampFromAbove(gfx::PointF s, gfx::PointF max) {
- return gfx::PointF(s.x() < max.x() ? s.x() : max.x(),
- s.y() < max.y() ? s.y() : max.y());
-}
-
-inline gfx::PointF ClampFromBelow(gfx::PointF s, gfx::PointF min) {
- return gfx::PointF(s.x() > min.x() ? s.x() : min.x(),
- s.y() > min.y() ? s.y() : min.y());
-}
-
-inline gfx::Point ClampFromAbove(gfx::Point s, gfx::Point max) {
- return gfx::Point(s.x() < max.x() ? s.x() : max.x(),
- s.y() < max.y() ? s.y() : max.y());
-}
-
-inline gfx::Point ClampFromBelow(gfx::Point s, gfx::Point min) {
- return gfx::Point(s.x() > min.x() ? s.x() : min.x(),
- s.y() > min.y() ? s.y() : min.y());
-}
-
inline gfx::Point BottomRight(gfx::Rect rect) {
return gfx::Point(rect.right(), rect.bottom());
}
« no previous file with comments | « no previous file | cc/layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698