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

Unified Diff: ui/compositor/dip_util.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 | « content/renderer/render_widget_fullscreen_pepper.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/dip_util.cc
diff --git a/ui/compositor/dip_util.cc b/ui/compositor/dip_util.cc
index 5adf7c4c35acc4c33273d68fc3020451739ae789..104a5da4d99525bf3278ab58b95c4a7596cc8690 100644
--- a/ui/compositor/dip_util.cc
+++ b/ui/compositor/dip_util.cc
@@ -32,7 +32,7 @@ gfx::Point ConvertPointToDIP(const Layer* layer,
gfx::Size ConvertSizeToDIP(const Layer* layer,
const gfx::Size& size_in_pixel) {
return gfx::ToFlooredSize(
- size_in_pixel.Scale(1.0f / GetDeviceScaleFactor(layer)));
+ gfx::ScaleSize(size_in_pixel, 1.0f / GetDeviceScaleFactor(layer)));
}
gfx::Rect ConvertRectToDIP(const Layer* layer,
@@ -49,7 +49,8 @@ gfx::Point ConvertPointToPixel(const Layer* layer,
gfx::Size ConvertSizeToPixel(const Layer* layer,
const gfx::Size& size_in_dip) {
- return gfx::ToFlooredSize(size_in_dip.Scale(GetDeviceScaleFactor(layer)));
+ return gfx::ToFlooredSize(
+ gfx::ScaleSize(size_in_dip, GetDeviceScaleFactor(layer)));
}
gfx::Rect ConvertRectToPixel(const Layer* layer,
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.cc ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698