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

Unified Diff: ui/gfx/geometry/rect_f.h

Issue 1271123002: Mac: Enable partial swap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 | « content/common/gpu/image_transport_surface_overlay_mac.mm ('k') | ui/gfx/geometry/rect_f.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/geometry/rect_f.h
diff --git a/ui/gfx/geometry/rect_f.h b/ui/gfx/geometry/rect_f.h
index dc233a77154a37c9424d3e305783e90f51d84fdf..3b132667e40d321f3b0e6b0d74c1495612844af7 100644
--- a/ui/gfx/geometry/rect_f.h
+++ b/ui/gfx/geometry/rect_f.h
@@ -12,6 +12,10 @@
#include "ui/gfx/geometry/size_f.h"
#include "ui/gfx/geometry/vector2d_f.h"
+#if defined(OS_MACOSX)
+typedef struct CGRect CGRect;
+#endif
+
namespace gfx {
class InsetsF;
@@ -27,6 +31,12 @@ class GFX_EXPORT RectF {
RectF(const PointF& origin, const SizeF& size)
: origin_(origin), size_(size) {}
+#if defined(OS_MACOSX)
+ explicit RectF(const CGRect& r);
+ // Construct an equivalent CoreGraphics object.
+ CGRect ToCGRect() const;
+#endif
+
~RectF() {}
float x() const { return origin_.x(); }
« no previous file with comments | « content/common/gpu/image_transport_surface_overlay_mac.mm ('k') | ui/gfx/geometry/rect_f.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698