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

Unified Diff: cc/stubs/float_quad.h

Issue 10984053: cc: Use ui/gfx geometry types for the CCRenderPass and CCDrawQuad classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 | « cc/stubs/float_point.h ('k') | cc/stubs/float_rect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/stubs/float_quad.h
diff --git a/cc/stubs/float_quad.h b/cc/stubs/float_quad.h
index f2f45ed568371a16ab0432b40a746bab597cfaf6..9e6b1f4387eb7c80bd81d1630e0e1ef0d6af5fbb 100644
--- a/cc/stubs/float_quad.h
+++ b/cc/stubs/float_quad.h
@@ -5,6 +5,8 @@
#ifndef CC_STUBS_FLOATQUAD_H_
#define CC_STUBS_FLOATQUAD_H_
+#include "ui/gfx/rect.h"
+#include "ui/gfx/rect_f.h"
#include "FloatPoint.h"
#include "FloatRect.h"
#if INSIDE_WEBKIT_BUILD
@@ -49,6 +51,16 @@ public:
: WebCore::FloatQuad(quad)
{
}
+
+ FloatQuad(const gfx::Rect& rect)
+ : WebCore::FloatQuad(WebCore::IntRect(rect.x(), rect.y(), rect.width(), rect.height()))
+ {
+ }
+
+ FloatQuad(const gfx::RectF& rect)
+ : WebCore::FloatQuad(WebCore::FloatRect(rect.x(), rect.y(), rect.width(), rect.height()))
+ {
+ }
};
}
« no previous file with comments | « cc/stubs/float_point.h ('k') | cc/stubs/float_rect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698