Changeset 52115 in webkit
- Timestamp:
- Dec 14, 2009 1:27:11 PM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r52113 r52115 1 2009-12-14 Jakob Petsovits <jpetsovits@rim.com> 2 3 Reviewed by Simon Fraser. 4 5 Add FloatQuad::isRectilinear() to check whether it can be represented as FloatRect. 6 https://bugs.webkit.org/show_bug.cgi?id=30442 7 8 This enables optimizations for distinguishing between 9 arbitrary FloatQuads and rectilinear ones. 10 11 * platform/graphics/FloatQuad.cpp: 12 (WebCore::FloatQuad::isRectilinear): 13 * platform/graphics/FloatQuad.h: 14 1 15 2009-12-14 Simon Hausmann <hausmann@webkit.org> 2 16 -
trunk/WebCore/platform/graphics/FloatQuad.cpp
r42206 r52115 86 86 } 87 87 88 bool FloatQuad::isRectilinear() const 89 { 90 return (m_p1.x() == m_p2.x() && m_p2.y() == m_p3.y() && m_p3.x() == m_p4.x() && m_p4.y() == m_p1.y()) 91 || (m_p1.y() == m_p2.y() && m_p2.x() == m_p3.x() && m_p3.y() == m_p4.y() && m_p4.x() == m_p1.x()); 92 } 93 88 94 bool FloatQuad::containsPoint(const FloatPoint& p) const 89 95 { -
trunk/WebCore/platform/graphics/FloatQuad.h
r42206 r52115 75 75 bool isEmpty() const { return boundingBox().isEmpty(); } 76 76 77 // Tests whether this quad can be losslessly represented by a FloatRect, 78 // that is, if two edges are parallel to the x-axis and the other two 79 // are parallel to the y-axis. If this method returns true, the 80 // corresponding FloatRect can be retrieved with boundingBox(). 81 bool isRectilinear() const; 82 77 83 // Tests whether the given point is inside, or on an edge or corner of this quad. 78 84 bool containsPoint(const FloatPoint&) const;
Note: See TracChangeset
for help on using the changeset viewer.