diff --git a/shell/platform/tizen/channels/localization_channel.cc b/shell/platform/tizen/channels/localization_channel.cc index 825b93369af03..a4fd18b5ed5ca 100644 --- a/shell/platform/tizen/channels/localization_channel.cc +++ b/shell/platform/tizen/channels/localization_channel.cc @@ -231,4 +231,4 @@ FlutterLocale* LocalizationChannel::GetFlutterLocale(const char* locale) { void LocalizationChannel::DestroyFlutterLocale(FlutterLocale* flutter_locale) {} } // namespace flutter -#endif \ No newline at end of file +#endif diff --git a/shell/platform/tizen/channels/platform_channel.cc b/shell/platform/tizen/channels/platform_channel.cc index 0436c9822e136..6550049644afa 100644 --- a/shell/platform/tizen/channels/platform_channel.cc +++ b/shell/platform/tizen/channels/platform_channel.cc @@ -362,13 +362,14 @@ PlatformChannel::PlatformChannel(BinaryMessenger* messenger, std::unique_ptr> result) { HandleMethodCall(call, std::move(result)); }); - if (!renderer_) { +} + +PlatformChannel::~PlatformChannel() { + if (renderer_) { renderer_ = nullptr; } } -PlatformChannel::~PlatformChannel() {} - void PlatformChannel::HandleMethodCall( const MethodCall& call, std::unique_ptr> result) { diff --git a/shell/platform/tizen/testing/mock_engine.cc b/shell/platform/tizen/testing/mock_engine.cc index 29ed124a0a689..7ebf8c8e60566 100644 --- a/shell/platform/tizen/testing/mock_engine.cc +++ b/shell/platform/tizen/testing/mock_engine.cc @@ -294,7 +294,9 @@ FlutterEngineResult FlutterEngineDispatchSemanticsAction( } uint64_t FlutterEngineGetCurrentTime() { - return 0; + const auto elapsed_time = std::chrono::steady_clock::now().time_since_epoch(); + return std::chrono::duration_cast(elapsed_time) + .count(); } FlutterEngineResult FlutterEngineGetProcAddresses( diff --git a/shell/platform/tizen/tizen_log.h b/shell/platform/tizen/tizen_log.h index 46ec792bcff31..dea705569ee6a 100644 --- a/shell/platform/tizen/tizen_log.h +++ b/shell/platform/tizen/tizen_log.h @@ -6,8 +6,14 @@ #define EMBEDDER_TIZEN_LOG_H_ #ifndef __X64_SHELL__ - #include +#else +#define log_priority int +#define DLOG_DEBUG 0 +#define DLOG_WARN 1 +#define DLOG_INFO 2 +#define DLOG_ERROR 3 +#endif #include #include @@ -29,7 +35,9 @@ log_priority GetMinLoggingLevel(); #define LOG_TAG "ConsoleMessage" #undef __LOG -#ifdef TV_PROFILE +#ifdef __X64_SHELL__ +#define __LOG(prio, fmt, args...) printf(fmt, ##args) +#elif TV_PROFILE // dlog_print() cannot be used because it implicitly passes LOG_ID_APPS as // a log id, which is ignored by TV devices. Instead, an internal function // __dlog_print() that takes a log id as a parameter is used. @@ -39,6 +47,15 @@ log_priority GetMinLoggingLevel(); #define __LOG(prio, fmt, args...) dlog_print(prio, LOG_TAG, fmt, ##args) #endif +#ifdef __X64_SHELL__ +#define __FT_LOG(prio, fmt, args...) \ + do { \ + if (prio >= flutter::GetMinLoggingLevel()) { \ + __LOG(prio, "%s: %s(%d) > " fmt, "X64_SHELL", __func__, __LINE__, \ + ##args); \ + } \ + } while (0) +#else #define __FT_LOG(prio, fmt, args...) \ do { \ if (prio >= flutter::GetMinLoggingLevel()) { \ @@ -46,6 +63,7 @@ log_priority GetMinLoggingLevel(); ##args); \ } \ } while (0) +#endif #define FT_LOGD(fmt, args...) __FT_LOG(DLOG_DEBUG, fmt, ##args) #define FT_LOGI(fmt, args...) __FT_LOG(DLOG_INFO, fmt, ##args) @@ -88,33 +106,4 @@ log_priority GetMinLoggingLevel(); } // namespace flutter -#else - -namespace flutter { - -#define log_priority int -#define DLOG_DEBUG 0 -#define DLOG_WARN 1 -#define DLOG_INFO 2 -#define DLOG_ERROR 3 - -void StartLogging(); -void SetMinLoggingLevel(log_priority p); -log_priority GetMinLoggingLevel(); - -#define FT_LOGD(fmt, args...) ((void)0) -#define FT_LOGI(fmt, args...) ((void)0) -#define FT_LOGW(fmt, args...) ((void)0) -#define FT_LOGE(fmt, args...) ((void)0) - -#define FT_ASSERT(assertion) ((void)0) -#define FT_ASSERT_NOT_REACHED() ((void)0) -#define FT_ASSERT_STATIC(assertion, reason) -#define FT_RELEASE_ASSERT_NOT_REACHED() ((void)0) - -#define FT_UNIMPLEMENTED() FT_LOGW("UNIMPLEMENTED!") - -} // namespace flutter -#endif - #endif // EMBEDDER_TIZEN_LOG_H_ diff --git a/tools/gn b/tools/gn index 816ff30e983ec..0c9914854ba7a 100755 --- a/tools/gn +++ b/tools/gn @@ -132,7 +132,6 @@ def to_gn_args(args): gn_args['use_clang_static_analyzer'] = args.clang_static_analyzer gn_args['embedder_for_target'] = args.embedder_for_target - gn_args['build_tizen_shell'] = args.build_tizen_shell gn_args['enable_coverage'] = args.coverage @@ -406,7 +405,6 @@ def parse_args(args): parser.add_argument('--always-use-skshaper', action='store_true', default=False) parser.add_argument('--embedder-for-target', dest='embedder_for_target', action='store_true', default=False) - parser.add_argument('--build-tizen-shell', dest='build_tizen_shell', action='store_true', default=False) parser.add_argument('--coverage', default=False, action='store_true')