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

Unified Diff: ui/gfx/shadow_value.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months 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 | « ui/gfx/point_f.h ('k') | ui/gfx/size.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/shadow_value.cc
diff --git a/ui/gfx/shadow_value.cc b/ui/gfx/shadow_value.cc
index 09127ee5bfc7dd3a7da500026511e08bbc45646e..0602c2d31b1d7b926f4334bb49e723d85e8718f9 100644
--- a/ui/gfx/shadow_value.cc
+++ b/ui/gfx/shadow_value.cc
@@ -8,6 +8,7 @@
#include "base/stringprintf.h"
#include "ui/gfx/insets.h"
+#include "ui/gfx/point_conversions.h"
namespace gfx {
@@ -28,7 +29,8 @@ ShadowValue::~ShadowValue() {
}
ShadowValue ShadowValue::Scale(float scale) const {
- return ShadowValue(offset_.Scale(scale), blur_ * scale, color_);
+ gfx::Point scaled_offset = gfx::ToFlooredPoint(offset_.Scale(scale));
+ return ShadowValue(scaled_offset, blur_ * scale, color_);
}
std::string ShadowValue::ToString() const {
« no previous file with comments | « ui/gfx/point_f.h ('k') | ui/gfx/size.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698