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

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

Issue 595593002: Splitting of layers for correct intersections (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes from issues introduced by the rebase, added tests for video_quads. Created 5 years, 11 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/geometry/quad_f.h
diff --git a/ui/gfx/geometry/quad_f.h b/ui/gfx/geometry/quad_f.h
index ada5c54cae3fdb521db8e50f52c49eb408892b9d..ff54303b7cb6fc10c1b23779e0460abf27696c21 100644
--- a/ui/gfx/geometry/quad_f.h
+++ b/ui/gfx/geometry/quad_f.h
@@ -67,6 +67,16 @@ class GFX_EXPORT QuadF {
return RectF(rl, rt, rr - rl, rb - rt);
}
+ void Rotate(size_t times) {
enne (OOO) 2015/02/04 21:24:00 Can you leave a comment about what this does? Rota
awoloszyn 2015/02/12 16:48:52 Renamed to Realign and added comment.
+ for (size_t i = 0; i < times % 4; ++i) {
+ PointF temp = p1_;
+ p1_ = p2_;
+ p2_ = p3_;
+ p3_ = p4_;
+ p4_ = temp;
+ }
+ }
+
// Add a vector to the quad, offseting each point in the quad by the vector.
void operator+=(const Vector2dF& rhs);
// Subtract a vector from the quad, offseting each point in the quad by the

Powered by Google App Engine
This is Rietveld 408576698