Chromium Code Reviews| Index: chrome/browser/android/vr_shell/vr_math.cc |
| diff --git a/chrome/browser/android/vr_shell/vr_math.cc b/chrome/browser/android/vr_shell/vr_math.cc |
| index 1438010c8061477ca0d62800d0cb3896de0d4864..0994a51bfd855e48a4d7940f06d8f7f50138fd70 100644 |
| --- a/chrome/browser/android/vr_shell/vr_math.cc |
| +++ b/chrome/browser/android/vr_shell/vr_math.cc |
| @@ -6,6 +6,8 @@ |
| #include <cmath> |
| +#include "base/logging.h" |
| + |
| namespace vr_shell { |
| // Internal matrix layout: |
| @@ -106,7 +108,7 @@ gvr::Mat4f PerspectiveMatrixFromView(const gvr::Rectf& fov, |
| const float y_bottom = -std::tan(fov.bottom * M_PI / 180.0f) * z_near; |
| const float y_top = std::tan(fov.top * M_PI / 180.0f) * z_near; |
| - assert(x_left < x_right && y_bottom < y_top && z_near < z_far && |
| + DCHECK(x_left < x_right && y_bottom < y_top && z_near < z_far && |
|
bajones
2017/03/21 15:44:24
What's the reasoning for making this a DCHECK? Wor
acondor_
2017/03/21 19:31:30
I'm not changing functionality here, only making t
|
| z_near > 0.0f && z_far > 0.0f); |
| const float X = (2 * z_near) / (x_right - x_left); |
| const float Y = (2 * z_near) / (y_top - y_bottom); |