X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Flayers.cpp;h=b79d2f62ef0ba79430ebfe0aeb0bd084c4bf5fc6;hb=refs%2Fchanges%2F63%2F20663%2F1;hp=c74f425fe817a4454e305f30e0ee23cac84bcfad;hpb=231c489591095d294b93244e388abdf39debd983;p=apps%2Fagl-service-windowmanager.git diff --git a/src/layers.cpp b/src/layers.cpp index c74f425..b79d2f6 100644 --- a/src/layers.cpp +++ b/src/layers.cpp @@ -20,7 +20,6 @@ #include "layers.hpp" #include "json_helper.hpp" #include "util.hpp" -#include "hmi-debug.h" namespace wm { @@ -33,7 +32,7 @@ layer::layer(nlohmann::json const &j) this->name = j["name"]; this->layer_id = j["layer_id"]; - HMI_DEBUG("wm", "layer_id:%d name:%s", this->layer_id, this->name.c_str()); + HMI_DEBUG("layer_id:%d name:%s", this->layer_id, this->name.c_str()); } struct result to_layer_map(nlohmann::json const &j) @@ -110,11 +109,11 @@ optional layer_map::get_layer_id(std::string const &role) auto re = std::regex(r.first); if (std::regex_match(role, re)) { - HMI_DEBUG("wm", "role %s matches layer %d", role.c_str(), r.second); + HMI_DEBUG("role %s matches layer %d", role.c_str(), r.second); return optional(r.second); } } - HMI_DEBUG("wm", "role %s does NOT match any layer", role.c_str()); + HMI_DEBUG("role %s does NOT match any layer", role.c_str()); return nullopt; } @@ -170,7 +169,7 @@ void layer_map::setupArea(double scaling) i.second.w = static_cast(scaling * i.second.w + 0.5); i.second.h = static_cast(scaling * i.second.h + 0.5); - HMI_DEBUG("wm:lm", "area:%s size(after) : x:%d y:%d w:%d h:%d", + HMI_DEBUG("area:%s size(after) : x:%d y:%d w:%d h:%d", i.first.c_str(), i.second.x, i.second.y, i.second.w, i.second.h); } } @@ -182,7 +181,7 @@ compositor::rect layer_map::getAreaSize(const std::string &area) int layer_map::loadAreaDb() { - HMI_DEBUG("wm:lm", "Call"); + HMI_DEBUG("Call"); std::string file_name(get_file_path("areas.db")); @@ -191,45 +190,45 @@ int layer_map::loadAreaDb() int ret = jh::inputJsonFilie(file_name.c_str(), &json_obj); if (0 > ret) { - HMI_DEBUG("wm:lm", "Could not open area.db, so use default area information"); + HMI_DEBUG("Could not open area.db, so use default area information"); json_obj = json_tokener_parse(kDefaultAreaDb); } - HMI_DEBUG("wm:lm", "json_obj dump:%s", json_object_get_string(json_obj)); + HMI_DEBUG("json_obj dump:%s", json_object_get_string(json_obj)); // Perse areas - HMI_DEBUG("wm:lm", "Perse areas"); + HMI_DEBUG("Perse areas"); json_object *json_cfg; if (!json_object_object_get_ex(json_obj, "areas", &json_cfg)) { - HMI_ERROR("wm:lm", "Parse Error!!"); + HMI_ERROR("Parse Error!!"); return -1; } int len = json_object_array_length(json_cfg); - HMI_DEBUG("wm:lm", "json_cfg len:%d", len); - HMI_DEBUG("wm:lm", "json_cfg dump:%s", json_object_get_string(json_cfg)); + HMI_DEBUG("json_cfg len:%d", len); + HMI_DEBUG("json_cfg dump:%s", json_object_get_string(json_cfg)); const char *area; for (int i = 0; i < len; i++) { json_object *json_tmp = json_object_array_get_idx(json_cfg, i); - HMI_DEBUG("wm:lm", "> json_tmp dump:%s", json_object_get_string(json_tmp)); + HMI_DEBUG("> json_tmp dump:%s", json_object_get_string(json_tmp)); area = jh::getStringFromJson(json_tmp, "name"); if (nullptr == area) { - HMI_ERROR("wm:lm", "Parse Error!!"); + HMI_ERROR("Parse Error!!"); return -1; } - HMI_DEBUG("wm:lm", "> area:%s", area); + HMI_DEBUG("> area:%s", area); json_object *json_rect; if (!json_object_object_get_ex(json_tmp, "rect", &json_rect)) { - HMI_ERROR("wm:lm", "Parse Error!!"); + HMI_ERROR("Parse Error!!"); return -1; } - HMI_DEBUG("wm:lm", "> json_rect dump:%s", json_object_get_string(json_rect)); + HMI_DEBUG("> json_rect dump:%s", json_object_get_string(json_rect)); compositor::rect area_size; area_size.x = jh::getIntFromJson(json_rect, "x"); @@ -244,7 +243,7 @@ int layer_map::loadAreaDb() for (auto itr = this->area2size.begin(); itr != this->area2size.end(); ++itr) { - HMI_DEBUG("wm:lm", "area:%s x:%d y:%d w:%d h:%d", + HMI_DEBUG("area:%s x:%d y:%d w:%d h:%d", itr->first.c_str(), itr->second.x, itr->second.y, itr->second.w, itr->second.h); }