Bug 915077 - Change the debug log level of HWC, r=nrc
authorPeter Chang <pchang@mozilla.com>
Wed, 18 Sep 2013 10:10:35 +0800
changeset 147673 454f59631b74b108c8a7c351e08f8eca50ee2559
parent 147672 08e38303c2ae7625a3e5ce90a109ae5d2cbb89e9
child 147674 6bb1ea0648a284e7c289e69cd81d7e7221dd7ff8
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersnrc
bugs915077
milestone27.0a1
Bug 915077 - Change the debug log level of HWC, r=nrc
widget/gonk/HwcComposer2D.cpp
--- a/widget/gonk/HwcComposer2D.cpp
+++ b/widget/gonk/HwcComposer2D.cpp
@@ -28,22 +28,29 @@
 #include "cutils/properties.h"
 
 #if ANDROID_VERSION >= 18
 #include "libdisplay/FramebufferSurface.h"
 #endif
 
 #define LOG_TAG "HWComposer"
 
-#if (LOG_NDEBUG == 0)
+/*
+ * By default the debug message of hwcomposer (LOG_DEBUG level) are undefined,
+ * but can be enabled by uncommenting HWC_DEBUG below.
+ */
+//#define HWC_DEBUG
+
+#ifdef HWC_DEBUG
 #define LOGD(args...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, ## args)
 #else
 #define LOGD(args...) ((void)0)
 #endif
 
+#define LOGI(args...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, ## args)
 #define LOGE(args...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, ## args)
 
 #define LAYER_COUNT_INCREMENTS 5
 
 using namespace android;
 using namespace mozilla::layers;
 
 namespace mozilla {
@@ -86,17 +93,17 @@ HwcComposer2D::Init(hwc_display_t dpy, h
 
     return 0;
 }
 
 HwcComposer2D*
 HwcComposer2D::GetInstance()
 {
     if (!sInstance) {
-        LOGD("Creating new instance");
+        LOGI("Creating new instance");
         sInstance = new HwcComposer2D();
     }
     return sInstance;
 }
 
 bool
 HwcComposer2D::ReallocLayerList()
 {