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

Unified Diff: ui/gfx/rect_conversions.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rollback empty changes. 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
Index: ui/gfx/rect_conversions.cc
diff --git a/ui/gfx/rect_conversions.cc b/ui/gfx/rect_conversions.cc
index 251c03711ddd9c670b9fc8c7148a59959e537e5a..2ad96e8da5e45a509a1570cf9d73e7118af7d097 100644
--- a/ui/gfx/rect_conversions.cc
+++ b/ui/gfx/rect_conversions.cc
@@ -11,6 +11,14 @@
namespace gfx {
+Rect ToSizedRect(const RectF& rect) {
kevers 2013/04/19 20:31:42 This logic is identical to ToFlooredRectDeprecated
+ int min_x = ToFlooredInt(rect.origin().x());
+ int min_y = ToFlooredInt(rect.origin().y());
+ int width = ToFlooredInt(rect.size().width());
+ int height = ToFlooredInt(rect.size().height());
+ return Rect(min_x, min_y, width, height);
+}
+
Rect ToEnclosingRect(const RectF& rect) {
int min_x = ToFlooredInt(rect.x());
int min_y = ToFlooredInt(rect.y());

Powered by Google App Engine
This is Rietveld 408576698