Skip to content

Commit e375b8c

Browse files
committed
Apply review's comment
Signed-off-by: MuHong Byun <[email protected]>
1 parent 8088228 commit e375b8c

File tree

5 files changed

+28
-38
lines changed

5 files changed

+28
-38
lines changed

shell/platform/tizen/channels/localization_channel.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ FlutterLocale* LocalizationChannel::GetFlutterLocale(const char* locale) {
231231

232232
void LocalizationChannel::DestroyFlutterLocale(FlutterLocale* flutter_locale) {}
233233
} // namespace flutter
234-
#endif
234+
#endif

shell/platform/tizen/channels/platform_channel.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,14 @@ PlatformChannel::PlatformChannel(BinaryMessenger* messenger,
362362
std::unique_ptr<MethodResult<rapidjson::Document>> result) {
363363
HandleMethodCall(call, std::move(result));
364364
});
365-
if (!renderer_) {
365+
}
366+
367+
PlatformChannel::~PlatformChannel() {
368+
if (renderer_) {
366369
renderer_ = nullptr;
367370
}
368371
}
369372

370-
PlatformChannel::~PlatformChannel() {}
371-
372373
void PlatformChannel::HandleMethodCall(
373374
const MethodCall<rapidjson::Document>& call,
374375
std::unique_ptr<MethodResult<rapidjson::Document>> result) {

shell/platform/tizen/testing/mock_engine.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ FlutterEngineResult FlutterEngineDispatchSemanticsAction(
294294
}
295295

296296
uint64_t FlutterEngineGetCurrentTime() {
297-
return 0;
297+
const auto elapsed_time = std::chrono::steady_clock::now().time_since_epoch();
298+
return std::chrono::duration_cast<std::chrono::nanoseconds>(elapsed_time)
299+
.count();
298300
}
299301

300302
FlutterEngineResult FlutterEngineGetProcAddresses(

shell/platform/tizen/tizen_log.h

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
#define EMBEDDER_TIZEN_LOG_H_
77

88
#ifndef __X64_SHELL__
9-
109
#include <dlog.h>
10+
#else
11+
#define log_priority int
12+
#define DLOG_DEBUG 0
13+
#define DLOG_WARN 1
14+
#define DLOG_INFO 2
15+
#define DLOG_ERROR 3
16+
#endif
1117

1218
#include <cassert>
1319
#include <cstdlib>
@@ -29,7 +35,9 @@ log_priority GetMinLoggingLevel();
2935
#define LOG_TAG "ConsoleMessage"
3036

3137
#undef __LOG
32-
#ifdef TV_PROFILE
38+
#ifdef __X64_SHELL__
39+
#define __LOG(prio, fmt, args...) printf(fmt, ##args)
40+
#elif TV_PROFILE
3341
// dlog_print() cannot be used because it implicitly passes LOG_ID_APPS as
3442
// a log id, which is ignored by TV devices. Instead, an internal function
3543
// __dlog_print() that takes a log id as a parameter is used.
@@ -39,13 +47,23 @@ log_priority GetMinLoggingLevel();
3947
#define __LOG(prio, fmt, args...) dlog_print(prio, LOG_TAG, fmt, ##args)
4048
#endif
4149

50+
#ifdef __X64_SHELL__
51+
#define __FT_LOG(prio, fmt, args...) \
52+
do { \
53+
if (prio >= flutter::GetMinLoggingLevel()) { \
54+
__LOG(prio, "%s: %s(%d) > " fmt, "X64_SHELL", __func__, __LINE__, \
55+
##args); \
56+
} \
57+
} while (0)
58+
#else
4259
#define __FT_LOG(prio, fmt, args...) \
4360
do { \
4461
if (prio >= flutter::GetMinLoggingLevel()) { \
4562
__LOG(prio, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, \
4663
##args); \
4764
} \
4865
} while (0)
66+
#endif
4967

5068
#define FT_LOGD(fmt, args...) __FT_LOG(DLOG_DEBUG, fmt, ##args)
5169
#define FT_LOGI(fmt, args...) __FT_LOG(DLOG_INFO, fmt, ##args)
@@ -88,33 +106,4 @@ log_priority GetMinLoggingLevel();
88106

89107
} // namespace flutter
90108

91-
#else
92-
93-
namespace flutter {
94-
95-
#define log_priority int
96-
#define DLOG_DEBUG 0
97-
#define DLOG_WARN 1
98-
#define DLOG_INFO 2
99-
#define DLOG_ERROR 3
100-
101-
void StartLogging();
102-
void SetMinLoggingLevel(log_priority p);
103-
log_priority GetMinLoggingLevel();
104-
105-
#define FT_LOGD(fmt, args...) ((void)0)
106-
#define FT_LOGI(fmt, args...) ((void)0)
107-
#define FT_LOGW(fmt, args...) ((void)0)
108-
#define FT_LOGE(fmt, args...) ((void)0)
109-
110-
#define FT_ASSERT(assertion) ((void)0)
111-
#define FT_ASSERT_NOT_REACHED() ((void)0)
112-
#define FT_ASSERT_STATIC(assertion, reason)
113-
#define FT_RELEASE_ASSERT_NOT_REACHED() ((void)0)
114-
115-
#define FT_UNIMPLEMENTED() FT_LOGW("UNIMPLEMENTED!")
116-
117-
} // namespace flutter
118-
#endif
119-
120109
#endif // EMBEDDER_TIZEN_LOG_H_

tools/gn

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def to_gn_args(args):
132132
gn_args['use_clang_static_analyzer'] = args.clang_static_analyzer
133133

134134
gn_args['embedder_for_target'] = args.embedder_for_target
135-
136135
gn_args['build_tizen_shell'] = args.build_tizen_shell
137136

138137
gn_args['enable_coverage'] = args.coverage
@@ -406,7 +405,6 @@ def parse_args(args):
406405
parser.add_argument('--always-use-skshaper', action='store_true', default=False)
407406

408407
parser.add_argument('--embedder-for-target', dest='embedder_for_target', action='store_true', default=False)
409-
410408
parser.add_argument('--build-tizen-shell', dest='build_tizen_shell', action='store_true', default=False)
411409

412410
parser.add_argument('--coverage', default=False, action='store_true')

0 commit comments

Comments
 (0)