From 7d48264f93e481a3dccf5c1d744fe321ec77001e Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Thu, 15 Dec 2022 18:12:23 +0900 Subject: [PATCH] Change DebugPriority name Change-Id: I6558c8cebec6a26119afd93d7b427490081de9fc --- .../src/dali-scene3d/utc-Dali-StringCallback.cpp | 9 ++++----- .../dali-toolkit-test-utils/test-application.cpp | 9 ++++++--- .../controls/flex-container/flex-container-impl.cpp | 4 ++-- .../controls/scrollable/scroll-view/scroll-view-impl.cpp | 14 +++++++------- .../internal/controls/table-view/table-view-impl.cpp | 4 ++-- dali-toolkit/public-api/visuals/image-visual-properties.h | 4 ++-- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp b/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp index f89ec02..3b80905 100644 --- a/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp +++ b/automated-tests/src/dali-scene3d/utc-Dali-StringCallback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,16 +18,15 @@ // Enable debug log for test coverage #define DEBUG_ENABLED 1 -#include "dali-scene3d/public-api/loader/string-callback.h" #include #include +#include "dali-scene3d/public-api/loader/string-callback.h" using namespace Dali; using namespace Dali::Scene3D::Loader; namespace { - char sBuffer[64]; void TestLogFunction(Integration::Log::DebugPriority level, std::string& str) @@ -35,12 +34,12 @@ void TestLogFunction(Integration::Log::DebugPriority level, std::string& str) snprintf(sBuffer, sizeof(sBuffer), "%d: %s", level, str.c_str()); } -} +} // namespace int UtcDaliUtilsDefaultStringCallback(void) { InstallLogFunction(TestLogFunction); DefaultErrorCallback("Hello world!"); - DALI_TEST_EQUAL(std::string(sBuffer), "2: string-callback.cpp: DefaultErrorCallback(28) > Hello world!"); + DALI_TEST_EQUAL(std::string(sBuffer), "3: string-callback.cpp: DefaultErrorCallback(28) > Hello world!"); END_TEST; } diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp index 873b7b3..e4c6078 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp @@ -117,13 +117,16 @@ void TestApplication::LogMessage(Dali::Integration::Log::DebugPriority level, st { switch(level) { - case Dali::Integration::Log::DebugInfo: + case Dali::Integration::Log::DEBUG: + fprintf(stderr, "DEBUG: %s", message.c_str()); + break; + case Dali::Integration::Log::INFO: fprintf(stderr, "INFO: %s", message.c_str()); break; - case Dali::Integration::Log::DebugWarning: + case Dali::Integration::Log::WARNING: fprintf(stderr, "WARN: %s", message.c_str()); break; - case Dali::Integration::Log::DebugError: + case Dali::Integration::Log::ERROR: fprintf(stderr, "ERROR: %s", message.c_str()); break; default: diff --git a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp index b220445..51b9be2 100644 --- a/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp +++ b/dali-toolkit/internal/controls/flex-container/flex-container-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +39,7 @@ namespace // currently not called from code so compiler will optimize these away, kept here for future debugging #define FLEX_CONTAINER_TAG "DALI Toolkit::FlexContainer " -#define FC_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::DebugInfo, FLEX_CONTAINER_TAG fmt, ##args) +#define FC_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::INFO, FLEX_CONTAINER_TAG fmt, ##args) // #define FLEX_CONTAINER_DEBUG 1 #if defined(FLEX_CONTAINER_DEBUG) diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp index 3779e35..986040b 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ //#define ENABLED_SCROLL_STATE_LOGGING #ifdef ENABLED_SCROLL_STATE_LOGGING -#define DALI_LOG_SCROLL_STATE(format, ...) Dali::Integration::Log::LogMessageWithFunctionLine(Dali::Integration::Log::DebugInfo, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) +#define DALI_LOG_SCROLL_STATE(format, ...) Dali::Integration::Log::LogMessageWithFunctionLine(Dali::Integration::Log::INFO, "%s:%d " format "\n", __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) #else #define DALI_LOG_SCROLL_STATE(format, ...) #endif @@ -532,11 +532,11 @@ void SnapWithVelocity( Dali::Vector2 GetPosition(Dali::Actor actor) { - Vector2 screenPosition = actor.GetProperty(Actor::Property::SCREEN_POSITION); - Vector3 size = actor.GetCurrentProperty(Actor::Property::SIZE) * actor.GetCurrentProperty(Actor::Property::WORLD_SCALE); - bool positionUsesAnchorPoint = actor.GetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT); - Vector3 anchorPointOffSet = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT); - Vector2 position = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y); + Vector2 screenPosition = actor.GetProperty(Actor::Property::SCREEN_POSITION); + Vector3 size = actor.GetCurrentProperty(Actor::Property::SIZE) * actor.GetCurrentProperty(Actor::Property::WORLD_SCALE); + bool positionUsesAnchorPoint = actor.GetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT); + Vector3 anchorPointOffSet = size * (positionUsesAnchorPoint ? actor.GetCurrentProperty(Actor::Property::ANCHOR_POINT) : AnchorPoint::TOP_LEFT); + Vector2 position = Vector2(screenPosition.x - anchorPointOffSet.x, screenPosition.y - anchorPointOffSet.y); return position; } diff --git a/dali-toolkit/internal/controls/table-view/table-view-impl.cpp b/dali-toolkit/internal/controls/table-view/table-view-impl.cpp index 2afc0da..d75d100 100644 --- a/dali-toolkit/internal/controls/table-view/table-view-impl.cpp +++ b/dali-toolkit/internal/controls/table-view/table-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ bool FitToChild(Actor actor, Dimension::Type dimension) // currently not called from code so compiler will optimize these away, kept here for future debugging #define TABLEVIEW_TAG "DALI Toolkit::TableView " -#define TV_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::DebugInfo, TABLEVIEW_TAG fmt, ##args) +#define TV_LOG(fmt, args, ...) Debug::LogMessageWithFunctionLine(Debug::INFO, TABLEVIEW_TAG fmt, ##args) //#define TABLEVIEW_DEBUG 1 #if defined(TABLEVIEW_DEBUG) diff --git a/dali-toolkit/public-api/visuals/image-visual-properties.h b/dali-toolkit/public-api/visuals/image-visual-properties.h index 29b9409..2586547 100644 --- a/dali-toolkit/public-api/visuals/image-visual-properties.h +++ b/dali-toolkit/public-api/visuals/image-visual-properties.h @@ -2,7 +2,7 @@ #define DALI_TOOLKIT_IMAGE_VISUAL_PROPERTIES_H /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -245,7 +245,7 @@ enum * @brief The policy to determine when an image should no longer be cached. * @details Name "releasePolicy", Type ReleasePolicy::Type (Property::INTEGER) or Property::STRING * @SINCE_1_3_5 - * @note Default ReleasePolicy::DESTROYED + * @note Default ReleasePolicy::DETACHED * @see ReleasePolicy::Type */ RELEASE_POLICY, -- 2.7.4