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

Unified Diff: chrome/browser/android/vr_shell/vr_math.cc

Issue 2757213003: Implementing glTF 1.0 parser (Closed)
Patch Set: Moving glTF test data to a file. Created 3 years, 9 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
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 &&
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);

Powered by Google App Engine
This is Rietveld 408576698