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

Unified Diff: ui/gfx/rect_f.h

Issue 11369144: ui: Make gfx::Point::Scale() mutate the class, similar to gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for aura 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
Index: ui/gfx/rect_f.h
diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h
index b3734f960995474c02b4ac1b2d3c323e11c584e3..a86ac9e4c669aa4a0eafca5a2dda36eb538b5032 100644
--- a/ui/gfx/rect_f.h
+++ b/ui/gfx/rect_f.h
@@ -34,9 +34,10 @@ class UI_EXPORT RectF
}
void Scale(float x_scale, float y_scale) {
+ set_origin(ScalePoint(origin(), x_scale, y_scale));
+
SizeF newSize = size().Scale(x_scale, y_scale);
newSize.ClampToNonNegative();
- set_origin(origin().Scale(x_scale, y_scale));
set_size(newSize);
}
« cc/layer_impl.cc ('K') | « ui/gfx/quad_unittest.cc ('k') | ui/gfx/shadow_value.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698