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

Unified Diff: ash/desktop_background/desktop_background_view.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 3 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 | ash/display/display_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_view.cc
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 6975c11d66c697b70aa280a5758c1daef98b2098..afa536e3d64891f36ba4967f4124a54bfaef878f 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -57,9 +57,8 @@ class LayerControlView : public views::View {
DisplayManager* display_manager = Shell::GetInstance()->display_manager();
DisplayInfo info = display_manager->GetDisplayInfo(display.id());
float ui_scale = info.GetEffectiveUIScale();
- gfx::SizeF pixel_size = display.size();
- pixel_size.Scale(1.0f / ui_scale);
- gfx::Size rounded_size = gfx::ToFlooredSize(pixel_size);
+ gfx::Size rounded_size =
+ gfx::ScaleToFlooredSize(display.size(), 1.f / ui_scale);
DCHECK_EQ(1, child_count());
views::View* child = child_at(0);
child->SetBounds(0, 0, rounded_size.width(), rounded_size.height());
« no previous file with comments | « no previous file | ash/display/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698