[Tizen] Fix InvalidateFrameBuffer error
[platform/core/uifw/dali-core.git] / dali / integration-api / debug.h
index a2a9732..807c0d0 100755 (executable)
@@ -1,8 +1,8 @@
-#ifndef __DALI_INTEGRATION_DEBUG_H__
-#define __DALI_INTEGRATION_DEBUG_H__
+#ifndef DALI_INTEGRATION_DEBUG_H
+#define DALI_INTEGRATION_DEBUG_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 // EXTERNAL INCLUDES
 #include <string>
 #include <sstream>
+#include <iostream>
 #include <list>
 #include <stdint.h>
+
 #include <dali/public-api/common/vector-wrapper.h>
 #include <dali/public-api/object/property-map.h>
 
@@ -312,9 +314,18 @@ public:
 #define DALI_LOG_INFO(filter, level, format, ...)                        \
   if(filter && filter->IsEnabledFor(level)) { filter->Log(level, format,  ## __VA_ARGS__); }
 
+#define DALI_LOG_STREAM( filter, level, stream )  \
+  if(filter && filter->IsEnabledFor(level))       \
+  {                                               \
+    std::ostringstream o;                         \
+    o << stream << std::endl;                     \
+    filter->Log(level, "%s", o.str().c_str());    \
+  }
+
 #else // DEBUG_ENABLED
 
 #define DALI_LOG_INFO(filter, level, format, ...)
+#define DALI_LOG_STREAM( filter, level, stream )
 
 #endif // DEBUG_ENABLED
 
@@ -454,4 +465,4 @@ void GetNanoseconds( uint64_t& timeInNanoseconds );
 } // Dali
 
 
-#endif // __DALI_INTEGRATION_DEBUG_H__
+#endif // DALI_INTEGRATION_DEBUG_H