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

Unified Diff: ui/gfx/display.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 years, 1 month 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/image/image_skia_operations.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 e647f650603ff777e9a2c46931e5e11c7d3c645a..ef3f250a483d113770958e5003f37b2d1507044b 100644
--- a/ui/gfx/display.cc
+++ b/ui/gfx/display.cc
@@ -89,7 +89,7 @@ void Display::SetScaleAndBounds(
bounds_in_pixel_ = bounds_in_pixel;
#endif
bounds_ = gfx::Rect(gfx::ToFlooredSize(
- bounds_in_pixel.size().Scale(1.0f / device_scale_factor_)));
+ gfx::ScaleSize(bounds_in_pixel.size(), 1.0f / device_scale_factor_)));
UpdateWorkAreaFromInsets(insets);
}
@@ -109,7 +109,7 @@ void Display::UpdateWorkAreaFromInsets(const gfx::Insets& insets) {
}
gfx::Size Display::GetSizeInPixel() const {
- return gfx::ToFlooredSize(size().Scale(device_scale_factor_));
+ return gfx::ToFlooredSize(gfx::ScaleSize(size(), device_scale_factor_));
}
std::string Display::ToString() const {
« no previous file with comments | « ui/gfx/canvas.cc ('k') | ui/gfx/image/image_skia_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698