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

Unified Diff: cc/trees/layer_sorter.cc

Issue 444983002: Remove unnecessary static function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added statc cast Created 6 years, 4 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/trees/layer_sorter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_sorter.cc
diff --git a/cc/trees/layer_sorter.cc b/cc/trees/layer_sorter.cc
index e171fe01120f6389931b1acb403581968e7126db..8f3454e8514957ff47c5d194b62b4e65e64efa63 100644
--- a/cc/trees/layer_sorter.cc
+++ b/cc/trees/layer_sorter.cc
@@ -23,11 +23,6 @@ namespace cc {
// the test scene went away.
const float k_layer_epsilon = 1e-4f;
-inline static float PerpProduct(const gfx::Vector2dF& u,
- const gfx::Vector2dF& v) {
- return u.x() * v.y() - u.y() * v.x();
-}
-
// Tests if two edges defined by their endpoints (a,b) and (c,d) intersect.
// Returns true and the point of intersection if they do and false otherwise.
static bool EdgeEdgeTest(const gfx::PointF& a,
@@ -39,7 +34,7 @@ static bool EdgeEdgeTest(const gfx::PointF& a,
gfx::Vector2dF v = d - c;
gfx::Vector2dF w = a - c;
- float denom = PerpProduct(u, v);
+ float denom = static_cast<float>(gfx::CrossProduct(u, v));
// If denom == 0 then the edges are parallel. While they could be overlapping
// we don't bother to check here as the we'll find their intersections from
@@ -47,11 +42,11 @@ static bool EdgeEdgeTest(const gfx::PointF& a,
if (!denom)
return false;
- float s = PerpProduct(v, w) / denom;
+ float s = static_cast<float>(gfx::CrossProduct(v, w)) / denom;
if (s < 0.f || s > 1.f)
return false;
- float t = PerpProduct(u, w) / denom;
+ float t = static_cast<float>(gfx::CrossProduct(u, w)) / denom;
if (t < 0.f || t > 1.f)
return false;
« no previous file with comments | « cc/trees/layer_sorter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698