diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-02 20:02:41 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-02 20:02:41 +0000 |
commit | 075ae0349a2933720638ef085130efad774d9e37 (patch) | |
tree | d6a9d3c7f3666431b0534781fd5f3bab1132dfa7 /cc/math_util.h | |
parent | 1bf5a67bf5b09f4338a5df92e3658250b65f8cd3 (diff) | |
download | chromium_src-075ae0349a2933720638ef085130efad774d9e37.zip chromium_src-075ae0349a2933720638ef085130efad774d9e37.tar.gz chromium_src-075ae0349a2933720638ef085130efad774d9e37.tar.bz2 |
cc: Replace WebCore::FloatQuad with gfx::QuadF.
It does as it says it does. This depends on the QuadF CL found at
https://codereview.chromium.org/11369043/ and is just search/replace
after that, as I added all the equivalent functionality to QuadF that
we made use of on FloatQuad.
It is possible we may see some slight differences in behaviour from using
FloatQuad, as we should benefit from increased precision, using doubles after
multiplying floats, when using Contains(Point) or IsCounterClockwise().
Covered by existing tests; no dramatic change in behaviour.
R=enne
BUG=147395
Review URL: https://codereview.chromium.org/11364044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165735 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/math_util.h')
-rw-r--r-- | cc/math_util.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cc/math_util.h b/cc/math_util.h index 1c2072a..dae4efb 100644 --- a/cc/math_util.h +++ b/cc/math_util.h @@ -14,13 +14,13 @@ class WebTransformationMatrix; } namespace gfx { +class QuadF; class Rect; class RectF; } namespace cc { -class FloatQuad; class FloatSize; struct HomogeneousCoordinate { @@ -84,17 +84,17 @@ public: // 0 to numVerticesInClippedQuad are valid in the clippedQuad array. Note that // numVerticesInClippedQuad may be zero, which means the entire quad was clipped, and // none of the vertices in the array are valid. - static void mapClippedQuad(const WebKit::WebTransformationMatrix&, const FloatQuad& srcQuad, gfx::PointF clippedQuad[8], int& numVerticesInClippedQuad); + static void mapClippedQuad(const WebKit::WebTransformationMatrix&, const gfx::QuadF& srcQuad, gfx::PointF clippedQuad[8], int& numVerticesInClippedQuad); static gfx::RectF computeEnclosingRectOfVertices(gfx::PointF vertices[], int numVertices); static gfx::RectF computeEnclosingClippedRect(const HomogeneousCoordinate& h1, const HomogeneousCoordinate& h2, const HomogeneousCoordinate& h3, const HomogeneousCoordinate& h4); // NOTE: These functions do not do correct clipping against w = 0 plane, but they // correctly detect the clipped condition via the boolean clipped. - static FloatQuad mapQuad(const WebKit::WebTransformationMatrix&, const FloatQuad&, bool& clipped); + static gfx::QuadF mapQuad(const WebKit::WebTransformationMatrix&, const gfx::QuadF&, bool& clipped); static gfx::PointF mapPoint(const WebKit::WebTransformationMatrix&, const gfx::PointF&, bool& clipped); static gfx::Point3F mapPoint(const WebKit::WebTransformationMatrix&, const gfx::Point3F&, bool& clipped); - static FloatQuad projectQuad(const WebKit::WebTransformationMatrix&, const FloatQuad&, bool& clipped); + static gfx::QuadF projectQuad(const WebKit::WebTransformationMatrix&, const gfx::QuadF&, bool& clipped); static gfx::PointF projectPoint(const WebKit::WebTransformationMatrix&, const gfx::PointF&, bool& clipped); static void flattenTransformTo2d(WebKit::WebTransformationMatrix&); |