Skip to content

Commit 14ed60c

Browse files
committed
Preserve existing behavior in non-tcore builds
Keep the ecore_animator_frametime_get() based refresh rate query in non-tcore builds and use the fixed 60Hz fallback only when built with use_tcore. Restore the unhandled key log in TextInputChannel, document the native handle type for both window backends, and drop a leftover unused include.
1 parent 5d77017 commit 14ed60c

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

flutter/shell/platform/tizen/channels/text_input_channel.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ bool TextInputChannel::HandleKey(const char* key,
335335
return true;
336336
#endif
337337
} else {
338+
FT_LOG(Info) << "Key[" << key << "] is unhandled.";
338339
return false;
339340
}
340341

flutter/shell/platform/tizen/flutter_tizen_display_monitor.cc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
// Use of this source code is governed by a BSD-style license that can be
44
// found in the LICENSE file.
55

6+
#ifndef USE_TCORE_WL
7+
#include <Ecore.h>
8+
#endif
69
#include <system_info.h>
710

811
#include "flutter/shell/platform/tizen/flutter_tizen_display_monitor.h"
@@ -28,11 +31,20 @@ void FlutterTizenDisplayMonitor::UpdateDisplays() {
2831
display.display_id = 0;
2932
display.single_display = true;
3033

31-
// TODO(jsuya): Default to 60Hz refresh rate. The previous implementation
32-
// used ecore_animator_frametime_get(), which is no longer available after
33-
// dropping the Ecore dependency. Replace this once tizen-core (or another
34-
// public Tizen API) exposes a way to query the display refresh rate.
34+
#ifdef USE_TCORE_WL
35+
// TODO(jsuya): Default to 60Hz refresh rate. ecore_animator_frametime_get()
36+
// is not available without the Ecore dependency. Replace this once
37+
// tizen-core (or another public Tizen API) exposes a way to query the
38+
// display refresh rate.
3539
display.refresh_rate = 60.0;
40+
#else
41+
double fps = ecore_animator_frametime_get();
42+
if (fps <= 0.0) {
43+
display.refresh_rate = 0.0;
44+
} else {
45+
display.refresh_rate = 1 / fps;
46+
}
47+
#endif
3648

3749
int32_t width = 0, height = 0, dpi = 0;
3850
FlutterTizenView* view = engine_->view();

flutter/shell/platform/tizen/public/flutter_tizen.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ FLUTTER_EXPORT void FlutterDesktopViewDestroy(FlutterDesktopViewRef view);
206206
// Returns a native UI toolkit handle for manipulation in host application.
207207
//
208208
// Cast the returned void*
209-
// - window ecore wl2 : to tizen_core_wl_window_h
209+
// - window ecore wl2 : to Ecore_Wl2_Window*
210+
// - window tcore wl : to tizen_core_wl_window_h (when built with use_tcore)
210211
// @warning This API is a work-in-progress and may change.
211212
FLUTTER_EXPORT void* FlutterDesktopViewGetNativeHandle(
212213
FlutterDesktopViewRef view);

flutter/shell/platform/tizen/tizen_event_loop.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <memory>
1616
#include <mutex>
1717
#include <queue>
18-
#include <set>
1918
#include <thread>
2019

2120
#include "flutter/shell/platform/embedder/embedder.h"

0 commit comments

Comments
 (0)