Commit bba42183 authored by petermayo's avatar petermayo Committed by Commit bot

Disable Normal DCHECK

This DCHECK fires for some seemingly irrelevant polygons.
The rendering now proceeds quite well when it is removed.
It is symptomatic of calculcations getting unstable, which
can be handled later in the pruning.

BUG=None
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2743283003
Cr-Commit-Position: refs/heads/master@{#457823}
parent 4c403999
......@@ -39,16 +39,17 @@ DrawPolygon::DrawPolygon(const DrawQuad* original,
const std::vector<gfx::Point3F>& in_points,
const gfx::Vector3dF& normal,
int draw_order_index)
: order_index_(draw_order_index), original_ref_(original), is_split_(true) {
: normal_(normal),
order_index_(draw_order_index),
original_ref_(original),
is_split_(true) {
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;
// 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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment