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

Unified Diff: ui/base/resource/resource_bundle.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: git try -b win_rel,mac_rel,linux_rel,linux_aura 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
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index f8d214fe81f4509781175a1cebe6a0a4498ba46f..4cc23b43ba4ad4527ed362bc35d2947e28ba7622 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -29,6 +29,7 @@
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_skia_source.h"
#include "ui/gfx/screen.h"
+#include "ui/gfx/size_conversions.h"
#include "ui/gfx/skbitmap_operations.h"
namespace ui {
@@ -73,7 +74,7 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource {
ui::ScaleFactor scale_factor) OVERRIDE {
scoped_ptr<SkBitmap> result(rb_->LoadBitmap(resource_id_, scale_factor));
float scale = ui::GetScaleFactorScale(scale_factor);
- gfx::Size size_in_pixel = size_in_dip_.Scale(scale);
+ gfx::Size size_in_pixel = gfx::ToFlooredSize(size_in_dip_.Scale(scale));
if (scale_factor != SCALE_FACTOR_100P &&
(!result.get() ||

Powered by Google App Engine
This is Rietveld 408576698