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

Unified Diff: ui/gfx/image/image_skia_operations.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/display.cc ('k') | ui/gfx/point.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/image/image_skia_operations.cc
diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc
index f190d8c48a0d1a2090235da81291def92eec5cb3..8afaf876eab4e777ab66f447b1b37bac9554ebb8 100644
--- a/ui/gfx/image/image_skia_operations.cc
+++ b/ui/gfx/image/image_skia_operations.cc
@@ -19,6 +19,7 @@
#include "ui/gfx/rect.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/gfx/size.h"
+#include "ui/gfx/size_conversions.h"
#include "ui/gfx/skbitmap_operations.h"
#include "ui/gfx/skia_util.h"
@@ -325,7 +326,8 @@ class ResizeSource : public ImageSkiaSource {
return image_rep;
const float scale = ui::GetScaleFactorScale(scale_factor);
- const Size target_pixel_size(target_dip_size_.Scale(scale));
+ const Size target_pixel_size = gfx::ToFlooredSize(
+ target_dip_size_.Scale(scale));
const SkBitmap resized = skia::ImageOperations::Resize(
image_rep.sk_bitmap(),
resize_method_,
« no previous file with comments | « ui/gfx/display.cc ('k') | ui/gfx/point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698