Index: cc/quads/draw_polygon.cc |
diff --git a/cc/quads/draw_polygon.cc b/cc/quads/draw_polygon.cc |
index 6574196ae0976031b002422978571f191c861adf..574cd79257090de6875f582684c391fabe829341 100644 |
--- a/cc/quads/draw_polygon.cc |
+++ b/cc/quads/draw_polygon.cc |
@@ -43,12 +43,11 @@ DrawPolygon::DrawPolygon(const DrawQuad* original, |
for (size_t i = 0; i < in_points.size(); i++) { |
points_.push_back(in_points[i]); |
} |
-#if DCHECK_IS_ON() |
- normal_ = normal; |
- ConstructNormal(); |
- DCHECK_LE((normal_ - normal).Length(), normalized_threshold); |
-#endif |
normal_ = normal; |
danakj
2017/03/17 14:14:44
can this be initialized in the constructor init li
Peter Mayo
2017/03/17 16:04:07
Yes, that makes sense now. Done.
|
+ // If life was fair, we could recalculate the normal from the given points |
+ // and assert it was roughly the same. This causes unhelpful breaks on |
+ // trivial slices of split polygons. Similarly, when splitting, it is |
+ // better to keep the normal that was constructed from the original. |
} |
// This takes the original DrawQuad that this polygon should be based on, |