Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion aic-emu/YmlParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -52,6 +56,16 @@ int GetEventCode(std::string str)
return event;
}

void YAML::SetParserLogFlag(bool value)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you don't implement them right in the header?

{
g_logEnable = value;
}

bool YAML::GetParserLogFlag()
{
return g_logEnable;
}

bool YAML::convert<AicEventMetadataPtr>::decode(const YAML::Node& node, AicEventMetadataPtr &mptr)
{
if (mptr == nullptr || !node.IsMap())
Expand Down
4 changes: 4 additions & 0 deletions aic-emu/YmlParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,9 @@ namespace YAML
template <> struct convert<DisplayCtrlPtr> {
static bool decode(const Node& node, DisplayCtrlPtr &mptr);
};

bool GetParserLogFlag();

void SetParserLogFlag(bool value);
}
#endif
2 changes: 1 addition & 1 deletion source/hwc_vhal_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down