Merge "sde: Read simulation flag"
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
commit
bbfaced6b5
@@ -25,6 +25,7 @@
|
||||
#ifndef __DEBUG_H__
|
||||
#define __DEBUG_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <core/sde_types.h>
|
||||
|
||||
#define DLOG(tag, method, format, ...) Debug::GetLogHandler()->method(tag, \
|
||||
@@ -47,6 +48,7 @@ class Debug {
|
||||
static inline void SetLogHandler(LogHandler *log_handler) { debug_.log_handler_ = log_handler; }
|
||||
static inline LogHandler* GetLogHandler() { return debug_.log_handler_; }
|
||||
static inline bool IsVirtualDriver() { return debug_.virtual_driver_; }
|
||||
static uint32_t GetSimulationFlag();
|
||||
|
||||
private:
|
||||
Debug();
|
||||
|
||||
@@ -38,5 +38,14 @@ Debug::Debug() : log_handler_(&default_log_handler_), virtual_driver_(false) {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Debug::GetSimulationFlag() {
|
||||
char property[PROPERTY_VALUE_MAX];
|
||||
if (property_get("debug.hwc.simulate", property, NULL) > 0) {
|
||||
return atoi(property);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace sde
|
||||
|
||||
|
||||
Reference in New Issue
Block a user