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

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: Revert spurious changes, plus some corrections. Created 7 years, 7 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/rect_conversions.h ('k') | ui/gfx/skbitmap_operations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/rect_conversions.cc
diff --git a/ui/gfx/rect_conversions.cc b/ui/gfx/rect_conversions.cc
index ac7767b3204de84881b752a43c5c4a09d3e18744..bd980df782dc8cb714e3b2ae40cd6c7a3e29d16c 100644
--- a/ui/gfx/rect_conversions.cc
+++ b/ui/gfx/rect_conversions.cc
@@ -7,10 +7,16 @@
#include <cmath>
#include "base/logging.h"
+#include "ui/gfx/point_conversions.h"
#include "ui/gfx/safe_integer_conversions.h"
+#include "ui/gfx/size_conversions.h"
namespace gfx {
+Rect ToSizedRect(const RectF& rect) {
+ return Rect(ToFlooredPoint(rect.origin()),ToCeiledSize(rect.size()));
+}
+
Rect ToEnclosingRect(const RectF& rect) {
int min_x = ToFlooredInt(rect.x());
int min_y = ToFlooredInt(rect.y());
« no previous file with comments | « ui/gfx/rect_conversions.h ('k') | ui/gfx/skbitmap_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698