libhwjpeg: resolve compilation errors
[GitHub/LineageOS/android_hardware_samsung_slsi_exynos.git] / libhwc / ExynosHWCDebug.h
1 #ifndef HWC_DEBUG_H
2 #define HWC_DEBUG_H
3
4 enum {
5 eDebugDefault = 0x00000001,
6 eDebugWindowUpdate = 0x00000002,
7 eDebugWinConfig = 0x00000004,
8 eDebugSkipStaicLayer = 0x00000008,
9 eDebugOverlaySupported = 0x00000010,
10 eDebugResourceAssigning = 0x00000020,
11 eDebugFence = 0x00000040,
12 eDebugResourceManager = 0x00000080,
13 eDebugMPP = 0x00000100,
14 };
15
16 inline bool hwcCheckDebugMessages(uint32_t type)
17 {
18 return hwcDebug & type;
19 }
20
21 #if defined(DISABLE_HWC_DEBUG)
22 #define HDEBUGLOGD(...)
23 #define HDEBUGLOGV(...)
24 #define HDEBUGLOGE(...)
25 #else
26 #define HDEBUGLOGD(type, ...) \
27 if (hwcCheckDebugMessages(type)) \
28 ALOGD(__VA_ARGS__);
29 #define HDEBUGLOGV(type, ...) \
30 if (hwcCheckDebugMessages(type)) \
31 ALOGV(__VA_ARGS__);
32 #define HDEBUGLOGE(type, ...) \
33 if (hwcCheckDebugMessages(type)) \
34 ALOGE(__VA_ARGS__);
35 #endif
36
37 #if defined(DISABLE_HWC_DEBUG)
38 #define DISPLAY_LOGD(...)
39 #else
40 #define DISPLAY_LOGD(type, msg, ...) \
41 if (hwcCheckDebugMessages(type)) \
42 ALOGD("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
43 #endif
44 #define DISPLAY_LOGV(msg, ...) ALOGV("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
45 #define DISPLAY_LOGI(msg, ...) ALOGI("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
46 #define DISPLAY_LOGW(msg, ...) ALOGW("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
47 #define DISPLAY_LOGE(msg, ...) ALOGE("[%s] " msg, mDisplayName.string(), ##__VA_ARGS__)
48
49 #endif