summaryrefslogtreecommitdiffstats
path: root/cc/quads
diff options
context:
space:
mode:
authorpetermayo <petermayo@chromium.org>2015-10-21 18:22:12 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-22 01:23:02 +0000
commitd63b9263f498da166b2aed62227a549e2e04f265 (patch)
treeb0b001a3c2716c107adf3d86a15ae269141eb6b0 /cc/quads
parent4b8cf72ddecff6332b1ce504227da13bfa89484c (diff)
downloadchromium_src-d63b9263f498da166b2aed62227a549e2e04f265.zip
chromium_src-d63b9263f498da166b2aed62227a549e2e04f265.tar.gz
chromium_src-d63b9263f498da166b2aed62227a549e2e04f265.tar.bz2
Remove unused variable.
The value of normal_match is completely determined in all of the places it is used. BUG=None TEST=No extra sorting artifacts introduced in layouts. R=vollick@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1415283002 Cr-Commit-Position: refs/heads/master@{#355470}
Diffstat (limited to 'cc/quads')
-rw-r--r--cc/quads/draw_polygon.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc
index cdb94d0..9ff1af6 100644
--- a/cc/quads/draw_polygon.cc
+++ b/cc/quads/draw_polygon.cc
@@ -107,10 +107,8 @@ BspCompareResult DrawPolygon::SideCompare(const DrawPolygon& a,
// Right away let's check if they're coplanar
double dot = gfx::DotProduct(a.normal_, b.normal_);
float sign = 0.0f;
- bool normal_match = false;
// This check assumes that the normals are normalized.
if (std::abs(dot) >= 1.0f - coplanar_dot_epsilon) {
- normal_match = true;
// The normals are matching enough that we only have to test one point.
sign = b.SignedPointDistance(a.points_[0]);
// Is it on either side of the splitter?
@@ -140,9 +138,7 @@ BspCompareResult DrawPolygon::SideCompare(const DrawPolygon& a,
int pos_count = 0;
int neg_count = 0;
for (size_t i = 0; i < a.points_.size(); i++) {
- if (!normal_match || (normal_match && i > 0)) {
- sign = gfx::DotProduct(a.points_[i] - b.points_[0], b.normal_);
- }
+ sign = gfx::DotProduct(a.points_[i] - b.points_[0], b.normal_);
if (sign < -compare_threshold) {
++neg_count;