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/layer_sorter.cc | |
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/layer_sorter.cc')
-rw-r--r-- | cc/layer_sorter.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cc/layer_sorter.cc b/cc/layer_sorter.cc index c4a540d..ca1e8b2 100644 --- a/cc/layer_sorter.cc +++ b/cc/layer_sorter.cc @@ -92,9 +92,9 @@ LayerSorter::ABCompareResult LayerSorter::checkOverlap(LayerShape* a, LayerShape // Check all four corners of one layer against the other layer's quad. for (int i = 0; i < 4; ++i) { - if (a->projectedQuad.containsPoint(bPoints[i])) + if (a->projectedQuad.Contains(bPoints[i])) overlapPoints.push_back(bPoints[i]); - if (b->projectedQuad.containsPoint(aPoints[i])) + if (b->projectedQuad.Contains(aPoints[i])) overlapPoints.push_back(aPoints[i]); } @@ -149,7 +149,7 @@ LayerShape::LayerShape() LayerShape::LayerShape(float width, float height, const WebTransformationMatrix& drawTransform) { - FloatQuad layerQuad(gfx::RectF(0, 0, width, height)); + gfx::QuadF layerQuad(gfx::RectF(0, 0, width, height)); // Compute the projection of the layer quad onto the z = 0 plane. @@ -169,13 +169,13 @@ LayerShape::LayerShape(float width, float height, const WebTransformationMatrix& // sorting it is equally correct to take a subsection of the polygon that can be made // into a quad. This will only be incorrect in the case of intersecting layers, which // are not supported yet anyway. - projectedQuad.setP1(clippedQuad[0]); - projectedQuad.setP2(clippedQuad[1]); - projectedQuad.setP3(clippedQuad[2]); + projectedQuad.set_p1(clippedQuad[0]); + projectedQuad.set_p2(clippedQuad[1]); + projectedQuad.set_p3(clippedQuad[2]); if (numVerticesInClippedQuad >= 4) - projectedQuad.setP4(clippedQuad[3]); + projectedQuad.set_p4(clippedQuad[3]); else - projectedQuad.setP4(clippedQuad[2]); // this will be a degenerate quad that is actually a triangle. + projectedQuad.set_p4(clippedQuad[2]); // this will be a degenerate quad that is actually a triangle. // Compute the normal of the layer's plane. bool clipped = false; |