diff --git a/aic-emu/YmlParser.cc b/aic-emu/YmlParser.cc index 0a583bb..ddca3d1 100644 --- a/aic-emu/YmlParser.cc +++ b/aic-emu/YmlParser.cc @@ -19,9 +19,13 @@ #include "CmdHandler.h" +static bool g_logEnable = true; + int GetEventCode(std::string str) { - std::cout << str << "@@@@@@@@@" << std::endl; + if (g_logEnable) + std::cout << str << "@@@@@@@@@" << std::endl; + int event = 0; if (str == "VHAL_DD_EVENT_DISPINFO_REQ") @@ -52,6 +56,16 @@ int GetEventCode(std::string str) return event; } +void YAML::SetParserLogFlag(bool value) +{ + g_logEnable = value; +} + +bool YAML::GetParserLogFlag() +{ + return g_logEnable; +} + bool YAML::convert::decode(const YAML::Node& node, AicEventMetadataPtr &mptr) { if (mptr == nullptr || !node.IsMap()) diff --git a/aic-emu/YmlParser.h b/aic-emu/YmlParser.h index b5c8655..8be02ea 100644 --- a/aic-emu/YmlParser.h +++ b/aic-emu/YmlParser.h @@ -91,5 +91,9 @@ namespace YAML template <> struct convert { static bool decode(const Node& node, DisplayCtrlPtr &mptr); }; + + bool GetParserLogFlag(); + + void SetParserLogFlag(bool value); } #endif diff --git a/source/hwc_vhal_impl.h b/source/hwc_vhal_impl.h index 5462584..b99517f 100644 --- a/source/hwc_vhal_impl.h +++ b/source/hwc_vhal_impl.h @@ -504,7 +504,7 @@ class VirtualHwcReceiver::Impl AIC_LOG(mDebug, "Failed to read display control info: %s\n", strerror(errno)); return -1; } - m_pLog->AddDisplayControlStruct(&ctrl, 2); + m_pLog->AddDisplayControlStruct(&ctrl, 1); } cros_gralloc_handle_t handle = get_handle(ev.info.remote_handle);