Remove references to libchrome

Removed dependencies on libchrome which was used mostly for logging
and switched over to standard Android log macros.

Bug: None
Test: `m -j32` still succeeds
Change-Id: I0a841c19c15c02f9a031af200e82837f9450d88a
diff --git a/libs/vr/libeds/Android.mk b/libs/vr/libeds/Android.mk
index 0345f6d..373e68e 100644
--- a/libs/vr/libeds/Android.mk
+++ b/libs/vr/libeds/Android.mk
@@ -39,7 +39,6 @@
 	libvulkan
 
 staticLibraries := \
-	libchrome \
 	libdisplay \
 	libdvrcommon \
 	libdvrgraphics \
diff --git a/libs/vr/libeds/composite_hmd.cpp b/libs/vr/libeds/composite_hmd.cpp
index d29cd65..d6bf164 100644
--- a/libs/vr/libeds/composite_hmd.cpp
+++ b/libs/vr/libeds/composite_hmd.cpp
@@ -1,6 +1,7 @@
 #include "include/private/dvr/composite_hmd.h"
 
-#include <base/logging.h>
+#include <log/log.h>
+
 #include <private/dvr/numeric.h>
 
 namespace android {
@@ -113,9 +114,9 @@
   float meters_per_tan_angle = virtual_eye_to_screen_dist;
   vec2 pixels_per_tan_angle = pixels_per_meter * meters_per_tan_angle;
 
-  CHECK_NE(0.0f, display_width_meters);
-  CHECK_NE(0.0f, display_height_meters);
-  CHECK_NE(0.0f, virtual_eye_to_screen_dist);
+  LOG_ALWAYS_FATAL_IF(0.0f == display_width_meters);
+  LOG_ALWAYS_FATAL_IF(0.0f == display_height_meters);
+  LOG_ALWAYS_FATAL_IF(0.0f == virtual_eye_to_screen_dist);
 
   // Height of lenses from the bottom of the screen.
   float lens_y_center = 0;
diff --git a/libs/vr/libeds/distortion_renderer.cpp b/libs/vr/libeds/distortion_renderer.cpp
index a19843f..59029d8 100644
--- a/libs/vr/libeds/distortion_renderer.cpp
+++ b/libs/vr/libeds/distortion_renderer.cpp
@@ -8,7 +8,7 @@
 #define ATRACE_TAG ATRACE_TAG_GRAPHICS
 #include <utils/Trace.h>
 
-#include <base/logging.h>
+#include <log/log.h>
 #include <private/dvr/clock_ns.h>
 #include <private/dvr/composite_hmd.h>
 #include <private/dvr/debug.h>
@@ -303,12 +303,12 @@
     vert_builder += "#define COMPOSITE_LAYER_2\n";
     frag_builder += "#define COMPOSITE_LAYER_2\n";
   } else {
-    CHECK_EQ(num_layers, 1);
+    LOG_ALWAYS_FATAL_IF(num_layers != 1);
   }
   if (blend_with_previous_layer) {
     // Check for unsupported shader combinations:
-    CHECK_EQ(num_layers, 1);
-    CHECK_EQ(use_alpha_vignette, false);
+    LOG_ALWAYS_FATAL_IF(num_layers != 1);
+    LOG_ALWAYS_FATAL_IF(!use_alpha_vignette);
     if (kUseFramebufferReadback)
       frag_builder += "#define BLEND_WITH_PREVIOUS_LAYER\n";
   }
@@ -320,7 +320,7 @@
   vert_builder += vertex;
   frag_builder += fragment;
   pgm.Link(vert_builder, frag_builder);
-  CHECK(pgm.IsUsable());
+  LOG_ALWAYS_FATAL_IF(!pgm.IsUsable());
 
   pgm.Use();
 
@@ -343,7 +343,7 @@
   projectionMatrix =
       projectionMatrix * Eigen::AngleAxisf(rotation, vec3::UnitZ());
 
-  CHECK(sizeof(mat4) == 4 * 4 * 4);
+  LOG_ALWAYS_FATAL_IF(sizeof(mat4) != 4 * 4 * 4);
   glUniformMatrix4fv(uProjectionMatrix, 1, false, projectionMatrix.data());
 }
 
@@ -367,8 +367,7 @@
   if (eds_enabled_) {
     // Late latch must be on if eds_enabled_ is true.
     if (!late_latch_enabled) {
-      LOG(ERROR) << "Cannot enable EDS without late latch. "
-                 << "Force enabling late latch.";
+      ALOGE("Cannot enable EDS without late latch. Force enabling late latch.");
       late_latch_enabled = true;
     }
   }
@@ -633,11 +632,11 @@
     PrepGlState(eye);
 
   if (num_textures > kMaxLayers) {
-    LOG(ERROR) << "Too many textures for DistortionRenderer";
+    ALOGE("Too many textures for DistortionRenderer");
     num_textures = kMaxLayers;
   }
 
-  CHECK(num_textures == 1 || num_textures == 2);
+  LOG_ALWAYS_FATAL_IF(num_textures != 1 && num_textures != 2);
 
   if (num_textures == 2) {
     if (chromatic_aberration_correction_enabled_) {
@@ -776,7 +775,7 @@
 
 bool DistortionRenderer::GetLastEdsPose(LateLatchOutput* out_data, int layer_id) const {
   if (layer_id >= kMaxLayers) {
-    LOG(ERROR) << "Accessing invalid layer " << layer_id << std::endl;
+    ALOGE("Accessing invalid layer %d", layer_id);
     return false;
   }
 
@@ -784,7 +783,7 @@
     late_latch_[layer_id]->CaptureOutputData(out_data);
     return true;
   } else {
-    LOG(ERROR) << "Late latch shader not enabled." << std::endl;
+    ALOGE("Late latch shader not enabled.");
     return false;
   }
 }
diff --git a/libs/vr/libeds/eds_mesh.cpp b/libs/vr/libeds/eds_mesh.cpp
index 2c7dc2f..01a90cf 100644
--- a/libs/vr/libeds/eds_mesh.cpp
+++ b/libs/vr/libeds/eds_mesh.cpp
@@ -1,8 +1,8 @@
 #include "include/private/dvr/eds_mesh.h"
 
+#include <log/log.h>
 #include <math.h>
 
-#include <base/logging.h>
 #include <private/dvr/types.h>
 
 namespace {
@@ -105,7 +105,7 @@
 // provided by |hmd| for |eye|.
 EdsMesh BuildDistortionMesh(EyeType eye, int resolution,
                             const DistortionFunction& distortion_function) {
-  CHECK_GT(resolution, 2);
+  LOG_ALWAYS_FATAL_IF(resolution <= 2);
 
   // Number of indices produced by the strip method
   // (see comment in ComputeDistortionMeshIndices):
diff --git a/libs/vr/libeds/lucid_pose_tracker.cpp b/libs/vr/libeds/lucid_pose_tracker.cpp
index c321bb0..5247020 100644
--- a/libs/vr/libeds/lucid_pose_tracker.cpp
+++ b/libs/vr/libeds/lucid_pose_tracker.cpp
@@ -1,7 +1,7 @@
 #include "include/private/dvr/lucid_pose_tracker.h"
 
 #define LOG_TAG "LucidPoseTracker"
-#include <cutils/log.h>
+#include <log/log.h>
 
 #include <private/dvr/clock_ns.h>
 
diff --git a/libs/vr/libeds/tests/eds_app_tests.cpp b/libs/vr/libeds/tests/eds_app_tests.cpp
index 1742736..549d864 100644
--- a/libs/vr/libeds/tests/eds_app_tests.cpp
+++ b/libs/vr/libeds/tests/eds_app_tests.cpp
@@ -1,7 +1,6 @@
 #include <EGL/egl.h>
 #include <GLES2/gl2.h>
 
-#include <base/logging.h>
 #include <dvr/graphics.h>
 #include <dvr/pose_client.h>
 #include <gtest/gtest.h>