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

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: 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/aura/root_window.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle.cc
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 5a77c12a1d851629eeea188b737a9b538e3769c8..294b48a12db25990c3997700c179d9c1ec0d731f 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() ||
« no previous file with comments | « ui/aura/root_window.cc ('k') | ui/base/x/x11_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698