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

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

Issue 12939015: Fix sizing when auto-scaling a missing resource at a non-integer scale factor. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make rounding test Windows only. Created 7 years, 8 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 | « no previous file | ui/base/resource/resource_bundle_unittest.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 3c03ee84722d425e806285260d9e0aec43b35624..c1687f83cf389a42394a9dc7d001fae93eb3cdcc 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -86,8 +86,8 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource {
image = skia::ImageOperations::Resize(
image,
skia::ImageOperations::RESIZE_LANCZOS3,
- gfx::ToFlooredInt(image.width() * scale),
- gfx::ToFlooredInt(image.height() * scale));
+ gfx::ToCeiledInt(image.width() * scale),
+ gfx::ToCeiledInt(image.height() * scale));
// If --highlight-missing-scaled-resources is specified, log the resource
// id and blend the created resource with red.
if (ShouldHighlightMissingScaledResources()) {
« no previous file with comments | « no previous file | ui/base/resource/resource_bundle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698