[WIP] Support tizen-core window - #170
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an alternative implementation for the Tizen embedder using the tizen-core-wl and tizen-core-imf APIs instead of Ecore, controlled by a new use_tcore build argument. Key changes include the addition of TizenWindowTcoreWl and a Tcore-specific TizenInputMethodContext, migration of the event loop to GLib, and updates to the clipboard and build configuration. Feedback focuses on the removal of excessive error-level debug logs, addressing the fragility of dynamic library loading for cursor support, and investigating alternatives to the hardcoded 60Hz refresh rate. Additionally, improvements were suggested for memory management in the clipboard implementation and restoring documentation regarding specific MIME type handling.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces support for the tizen-core-wl API as an alternative to ecore for windowing, input method context, and clipboard management under a new use_tcore build flag. Feedback focuses on critical safety and robustness improvements, such as avoiding unsafe strlen calls on non-null-terminated Wayland clipboard data, implementing thread-safe tracking and cancellation of active GLib timeouts in TizenEventLoop to prevent use-after-free bugs, and avoiding a potential null pointer dereference in the TizenInputMethodContext destructor. Additionally, corrections are suggested for Google C++ Style Guide violations regarding header guards and default arguments, alongside a fix for version parsing in the gn tool.
Apply the changes requested in the Gemini code review on flutter-tizen#170: - Remove temporary FT_LOG(Error) debug breadcrumbs added throughout the key-event path (tizen_window_tcore_wl, tizen_view_nui, flutter_tizen_view, channels/keyboard_channel, channels/text_input_channel, tizen_input_method_context_tcore). Error level was being used for trace logging, which made real errors hard to find. Genuine error paths (initialization failures, out-of-order events, dlopen/dlsym failures) keep their FT_LOG(Error) calls. - flutter_tizen_display_monitor: add a TODO explaining that refresh_rate = 60.0 is a fallback until tizen-core (or another public Tizen API) exposes a way to query the actual rate, since ecore_animator_frametime_get() is gone. - tizen_window_tcore_wl: document that the TV cursor / pointer / floating-menu helpers depend on libvd-win-util.so, a private Samsung TV library, and that dlopen/dlsym lookups must be treated as best-effort. - Fix wrong header include in tizen_input_method_context_tcore.cc (was including the ecore version's header).
cbfc9dd to
70d310b
Compare
Introduce a use_tcore GN flag (surfaced as the --use-tcore build option) that switches the window and input-method backends from Ecore/ecore_wl2 to the tizen-core-wl / tizen-core-imf APIs. - Add tizen_window_tcore_wl and tizen_input_method_context_tcore, selected in BUILD.gn when use_tcore is set. - Reimplement the clipboard on tizen-core-wl for tcore builds. - Expose the native window handle via FlutterDesktopViewGetNativeHandle. - Install the tizen-core-* sysroot packages for Tizen 10.0 and above. - Reject --use-tcore on Tizen versions below 10. Squashed from flutter-tizen#170 and rebased onto master. The DALI/NUI sysroot packages removed upstream are not reintroduced, and the work-in-progress key-event trace logging is dropped.
Introduce a use_tcore GN flag (surfaced as the --use-tcore build option) that switches the window and input-method backends from Ecore/ecore_wl2 to the tizen-core-wl / tizen-core-imf APIs. - Add tizen_window_tcore_wl and tizen_input_method_context_tcore, selected in BUILD.gn when use_tcore is set. - Reimplement the clipboard on tizen-core-wl for tcore builds. - Expose the native window handle via FlutterDesktopViewGetNativeHandle. - Install the tizen-core-* sysroot packages for Tizen 10.0 and above. - Reject --use-tcore on Tizen versions below 10. Squashed from flutter-tizen#170 and rebased onto master. The DALI/NUI sysroot packages removed upstream are not reintroduced, and the work-in-progress key-event trace logging is dropped.
Master flutter-tizen#189 restored the public API with an ecore_wl2-only doc comment. Extend it to note that --use-tcore builds return a tizen_core_wl_window_h.
|
/codex review |
This is working only Tizen 11