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

Unified Diff: ui/gfx/display.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 | « ui/gfx/canvas.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/display.cc
diff --git a/ui/gfx/display.cc b/ui/gfx/display.cc
index 7b77ae40eac7e72f1a6eb4a16b14bc6ee36cf6e7..27f757607be9e47eee6c6b6734a944260116a881 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -159,11 +159,11 @@ void Display::SetScaleAndBounds(
device_scale_factor_ = device_scale_factor;
}
device_scale_factor_ = std::max(1.0f, device_scale_factor_);
- bounds_ = gfx::Rect(
- gfx::ToFlooredPoint(gfx::ScalePoint(bounds_in_pixel.origin(),
- 1.0f / device_scale_factor_)),
- gfx::ToFlooredSize(gfx::ScaleSize(bounds_in_pixel.size(),
- 1.0f / device_scale_factor_)));
+ bounds_ =
+ gfx::Rect(gfx::ToFlooredPoint(gfx::ScalePoint(
+ bounds_in_pixel.origin(), 1.0f / device_scale_factor_)),
+ gfx::ScaleToFlooredSize(bounds_in_pixel.size(),
+ 1.0f / device_scale_factor_));
UpdateWorkAreaFromInsets(insets);
}
@@ -183,7 +183,7 @@ void Display::UpdateWorkAreaFromInsets(const gfx::Insets& insets) {
}
gfx::Size Display::GetSizeInPixel() const {
- return gfx::ToFlooredSize(gfx::ScaleSize(size(), device_scale_factor_));
+ return gfx::ScaleToFlooredSize(size(), device_scale_factor_);
}
std::string Display::ToString() const {
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/geometry/dip_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698