From ba0a5e6748543e31b512cfdefc836bc350625d80 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 10 Jul 2026 17:09:12 +0900 Subject: [PATCH 1/7] Remove FlutterView (NUI/Dali embedding) support FlutterView rendered Flutter into a NUI/Dali ImageView via FlutterDesktopViewCreateFromImageView. It depends on dali2-adaptor / dali2-core and keeps breaking against new Tizen platform versions, adding instability for little real usage. Drop the feature. - Delete flutter_tizen_nui.cc, tizen_view_nui.*, tizen_renderer_nui_gl.* - Remove the NUI_SUPPORT build path, dali libs and dali include dirs from BUILD.gn (keep CLIPBOARD_SUPPORT / tizen_clipboard.cc, which shared the api_version != "6.0" block) - Remove FlutterDesktopViewCreateFromImageView and the now-unused FlutterDesktopViewProperties from the public header - Drop NUI branches in flutter_tizen.cc, flutter_tizen_engine.cc, flutter_tizen_view.cc and tizen_renderer_egl.cc, and the HandleNuiKeyEvent path in tizen_input_method_context.* --- flutter/shell/platform/tizen/BUILD.gn | 12 -- flutter/shell/platform/tizen/flutter_tizen.cc | 12 -- .../platform/tizen/flutter_tizen_engine.cc | 12 -- .../shell/platform/tizen/flutter_tizen_nui.cc | 56 -------- .../platform/tizen/flutter_tizen_view.cc | 3 - .../platform/tizen/public/flutter_tizen.h | 20 --- .../tizen/tizen_input_method_context.cc | 50 ------- .../tizen/tizen_input_method_context.h | 15 -- .../platform/tizen/tizen_renderer_egl.cc | 14 -- .../platform/tizen/tizen_renderer_nui_gl.cc | 21 --- .../platform/tizen/tizen_renderer_nui_gl.h | 30 ---- .../shell/platform/tizen/tizen_view_nui.cc | 130 ------------------ flutter/shell/platform/tizen/tizen_view_nui.h | 77 ----------- 13 files changed, 452 deletions(-) delete mode 100644 flutter/shell/platform/tizen/flutter_tizen_nui.cc delete mode 100644 flutter/shell/platform/tizen/tizen_renderer_nui_gl.cc delete mode 100644 flutter/shell/platform/tizen/tizen_renderer_nui_gl.h delete mode 100644 flutter/shell/platform/tizen/tizen_view_nui.cc delete mode 100644 flutter/shell/platform/tizen/tizen_view_nui.h diff --git a/flutter/shell/platform/tizen/BUILD.gn b/flutter/shell/platform/tizen/BUILD.gn index 3d9dfd0b..b6a561a8 100644 --- a/flutter/shell/platform/tizen/BUILD.gn +++ b/flutter/shell/platform/tizen/BUILD.gn @@ -13,9 +13,6 @@ config("flutter_tizen_config") { include_dirs = [ "${sysroot_path}/usr/include/appfw", "${sysroot_path}/usr/include/base", - "${sysroot_path}/usr/include/dali", - "${sysroot_path}/usr/include/dali-adaptor", - "${sysroot_path}/usr/include/dali-toolkit", "${sysroot_path}/usr/include/dlog", "${sysroot_path}/usr/include/ecore-1", "${sysroot_path}/usr/include/ecore-imf-1", @@ -159,19 +156,10 @@ template("embedder") { if (api_version != "6.0") { sources += [ - "flutter_tizen_nui.cc", "tizen_clipboard.cc", - "tizen_renderer_nui_gl.cc", - "tizen_view_nui.cc", - ] - - libs += [ - "dali2-adaptor", - "dali2-core", ] defines += [ - "NUI_SUPPORT", "CLIPBOARD_SUPPORT", ] } diff --git a/flutter/shell/platform/tizen/flutter_tizen.cc b/flutter/shell/platform/tizen/flutter_tizen.cc index bce78e48..7dd48cd9 100644 --- a/flutter/shell/platform/tizen/flutter_tizen.cc +++ b/flutter/shell/platform/tizen/flutter_tizen.cc @@ -15,10 +15,6 @@ #include "flutter/shell/platform/tizen/logger.h" #include "flutter/shell/platform/tizen/public/flutter_platform_view.h" #include "flutter/shell/platform/tizen/tizen_view.h" -#ifdef NUI_SUPPORT -#include "flutter/shell/platform/tizen/tizen_renderer_egl.h" -#include "flutter/shell/platform/tizen/tizen_view_nui.h" -#endif #include "flutter/shell/platform/tizen/tizen_window.h" #include "flutter/shell/platform/tizen/tizen_window_ecore_wl2.h" @@ -277,16 +273,8 @@ void FlutterDesktopViewOnKeyEvent(FlutterDesktopViewRef view, uint32_t scan_code, size_t timestamp, bool is_down) { -#ifdef NUI_SUPPORT - if (auto* nui_view = dynamic_cast( - ViewFromHandle(view)->tizen_view())) { - nui_view->OnKey(device_name, device_class, device_subclass, key, string, - nullptr, modifiers, scan_code, timestamp, is_down); - } -#else ViewFromHandle(view)->OnKey(key, string, nullptr, modifiers, scan_code, device_name, is_down); -#endif } void FlutterDesktopViewSetFocus(FlutterDesktopViewRef view, bool focused) { diff --git a/flutter/shell/platform/tizen/flutter_tizen_engine.cc b/flutter/shell/platform/tizen/flutter_tizen_engine.cc index 758532e9..3c3611ea 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_engine.cc +++ b/flutter/shell/platform/tizen/flutter_tizen_engine.cc @@ -22,11 +22,6 @@ #include "flutter/shell/platform/tizen/tizen_renderer_vulkan.h" #endif -#ifdef NUI_SUPPORT -#include "flutter/shell/platform/tizen/tizen_renderer_nui_gl.h" -#include "flutter/shell/platform/tizen/tizen_view_nui.h" -#endif - namespace flutter { namespace { @@ -90,13 +85,6 @@ std::unique_ptr FlutterTizenEngine::CreateRenderer( FlutterDesktopRendererType renderer_type) { switch (renderer_type) { case FlutterDesktopRendererType::kEGL: -#ifdef NUI_SUPPORT - if (auto* nui_view = - dynamic_cast(view_->tizen_view())) { - return std::make_unique( - nui_view, project_->HasArgument("--enable-impeller")); - } -#endif return std::make_unique( view_->tizen_view(), project_->HasArgument("--enable-impeller")); case FlutterDesktopRendererType::kEVulkan: diff --git a/flutter/shell/platform/tizen/flutter_tizen_nui.cc b/flutter/shell/platform/tizen/flutter_tizen_nui.cc deleted file mode 100644 index 32787e08..00000000 --- a/flutter/shell/platform/tizen/flutter_tizen_nui.cc +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2022 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "public/flutter_tizen.h" - -#include -#include - -#include - -#include "flutter/shell/platform/tizen/flutter_tizen_engine.h" -#include "flutter/shell/platform/tizen/flutter_tizen_view.h" -#include "flutter/shell/platform/tizen/tizen_view_nui.h" - -namespace { - -// Returns the engine corresponding to the given opaque API handle. -flutter::FlutterTizenEngine* EngineFromHandle(FlutterDesktopEngineRef ref) { - return reinterpret_cast(ref); -} - -FlutterDesktopViewRef HandleForView(flutter::FlutterTizenView* view) { - return reinterpret_cast(view); -} - -} // namespace - -FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView( - const FlutterDesktopViewProperties& view_properties, - FlutterDesktopEngineRef engine, - void* image_view, - void* native_image_queue, - int32_t default_window_id) { - std::unique_ptr tizen_view = - std::make_unique( - view_properties.width, view_properties.height, - reinterpret_cast(image_view), - reinterpret_cast(native_image_queue), - default_window_id); - - auto view = std::make_unique( - flutter::kImplicitViewId, std::move(tizen_view), - std::unique_ptr(EngineFromHandle(engine)), - FlutterDesktopRendererType::kEGL); - - if (!view->engine()->IsRunning()) { - if (!view->engine()->RunEngine()) { - return nullptr; - } - } - - view->SendInitialGeometry(); - - return HandleForView(view.release()); -} diff --git a/flutter/shell/platform/tizen/flutter_tizen_view.cc b/flutter/shell/platform/tizen/flutter_tizen_view.cc index bcbc7b87..206a70c3 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_view.cc +++ b/flutter/shell/platform/tizen/flutter_tizen_view.cc @@ -8,9 +8,6 @@ #include "flutter/shell/platform/tizen/logger.h" #include "flutter/shell/platform/tizen/system_utils.h" #include "flutter/shell/platform/tizen/tizen_view.h" -#ifdef NUI_SUPPORT -#include "flutter/shell/platform/tizen/tizen_view_nui.h" -#endif #include "flutter/shell/platform/tizen/tizen_renderer_egl.h" #include "flutter/shell/platform/tizen/tizen_window.h" diff --git a/flutter/shell/platform/tizen/public/flutter_tizen.h b/flutter/shell/platform/tizen/public/flutter_tizen.h index 6e9c27b4..3d2d9d7d 100644 --- a/flutter/shell/platform/tizen/public/flutter_tizen.h +++ b/flutter/shell/platform/tizen/public/flutter_tizen.h @@ -83,14 +83,6 @@ typedef struct { bool floating_menu_support; } FlutterDesktopWindowProperties; -// Properties for configuring the initial settings of a Flutter view. -typedef struct { - // The width of the view, or the maximum width if the value is zero. - int32_t width; - // The height of the view, or the maximum height if the value is zero. - int32_t height; -} FlutterDesktopViewProperties; - // Properties for configuring a Flutter engine instance. typedef struct { // The path to the flutter_assets folder for the application to be run. @@ -185,18 +177,6 @@ FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow( const FlutterDesktopWindowProperties& window_properties, FlutterDesktopEngineRef engine); -// Creates a view that hosts and displays the given engine instance. -// -// The type of |image_view| must be Dali::Toolkit::ImageView*. -// The type of |native_image_queue| must be Dali::NativeImageSourceQueue*. -// @warning This API is a work-in-progress and may change. -FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView( - const FlutterDesktopViewProperties& view_properties, - FlutterDesktopEngineRef engine, - void* image_view, - void* native_image_queue, - int32_t default_window_id); - // Destroys the view. // // The engine owned by the view will also be shut down implicitly. diff --git a/flutter/shell/platform/tizen/tizen_input_method_context.cc b/flutter/shell/platform/tizen/tizen_input_method_context.cc index 76e46d60..07ef091a 100644 --- a/flutter/shell/platform/tizen/tizen_input_method_context.cc +++ b/flutter/shell/platform/tizen/tizen_input_method_context.cc @@ -173,12 +173,6 @@ TizenInputMethodContext::~TizenInputMethodContext() { UnregisterInputPanelEventCallback(); UnregisterEventCallbacks(); -#ifdef NUI_SUPPORT - if (ecore_device_) { - ecore_device_del(ecore_device_); - } -#endif - if (imf_context_) { ecore_imf_context_del(imf_context_); } @@ -207,50 +201,6 @@ bool TizenInputMethodContext::HandleEcoreEventKey(Ecore_Event_Key* event, } } -#ifdef NUI_SUPPORT -bool TizenInputMethodContext::HandleNuiKeyEvent(const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down) { - Ecore_Event_Key event = {}; - event.keyname = event.key = key ? key : ""; - event.string = string ? string : ""; - event.modifiers = modifiers; - event.keycode = scan_code; - event.timestamp = timestamp; - if (device_name) { - if (!ecore_device_) { - ecore_device_ = ecore_device_add(); - } - - event.dev = ecore_device_; - ecore_device_name_set(event.dev, device_name); - ecore_device_class_set(event.dev, - static_cast(device_class)); - ecore_device_subclass_set( - event.dev, static_cast(device_subclass)); - } - - Ecore_IMF_Event imf_event; - if (is_down) { - imf_event.key_down = - EcoreEventKeyToEcoreImfEvent(&event); - return ecore_imf_context_filter_event(imf_context_, - ECORE_IMF_EVENT_KEY_DOWN, &imf_event); - } else { - imf_event.key_up = - EcoreEventKeyToEcoreImfEvent(&event); - return ecore_imf_context_filter_event(imf_context_, ECORE_IMF_EVENT_KEY_UP, - &imf_event); - } -} -#endif - InputPanelGeometry TizenInputMethodContext::GetInputPanelGeometry() { InputPanelGeometry geometry; if (!imf_context_) { diff --git a/flutter/shell/platform/tizen/tizen_input_method_context.h b/flutter/shell/platform/tizen/tizen_input_method_context.h index 1e1a63c0..f852ef2a 100644 --- a/flutter/shell/platform/tizen/tizen_input_method_context.h +++ b/flutter/shell/platform/tizen/tizen_input_method_context.h @@ -31,18 +31,6 @@ class TizenInputMethodContext { bool HandleEcoreEventKey(Ecore_Event_Key* event, bool is_down); -#ifdef NUI_SUPPORT - bool HandleNuiKeyEvent(const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down); -#endif - InputPanelGeometry GetInputPanelGeometry(); void ResetInputMethodContext(); @@ -95,9 +83,6 @@ class TizenInputMethodContext { void SetContextOptions(); void SetInputPanelOptions(); -#ifdef NUI_SUPPORT - Ecore_Device* ecore_device_ = nullptr; -#endif Ecore_IMF_Context* imf_context_ = nullptr; bool editing_active_ = false; OnCommit on_commit_; diff --git a/flutter/shell/platform/tizen/tizen_renderer_egl.cc b/flutter/shell/platform/tizen/tizen_renderer_egl.cc index d618943c..12aeca9a 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_egl.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_egl.cc @@ -8,9 +8,6 @@ #include #include #include -#ifdef NUI_SUPPORT -#include -#endif #include #include #include @@ -99,17 +96,6 @@ bool TizenRendererEgl::CreateSurface(void* render_target, egl_surface_ = eglCreateWindowSurface( egl_display_, egl_config_, reinterpret_cast(egl_window), attribs); - } else { -#ifdef NUI_SUPPORT - Dali::NativeImageSourceQueuePtr dali_native_image_queue = - static_cast(render_target); - tbm_surface_queue_h tbm_surface_queue_ = - Dali::AnyCast( - dali_native_image_queue->GetNativeImageSourceQueue()); - egl_surface_ = eglCreateWindowSurface( - egl_display_, egl_config_, - reinterpret_cast(tbm_surface_queue_), attribs); -#endif } if (egl_surface_ == EGL_NO_SURFACE) { diff --git a/flutter/shell/platform/tizen/tizen_renderer_nui_gl.cc b/flutter/shell/platform/tizen/tizen_renderer_nui_gl.cc deleted file mode 100644 index 5f332757..00000000 --- a/flutter/shell/platform/tizen/tizen_renderer_nui_gl.cc +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2025 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "flutter/shell/platform/tizen/tizen_renderer_nui_gl.h" - -namespace flutter { - -TizenRendererNuiGL::TizenRendererNuiGL(TizenViewNui* view_nui, - bool enable_impeller) - : TizenRendererEgl(view_nui, enable_impeller), view_(view_nui) {} - -TizenRendererNuiGL::~TizenRendererNuiGL() {} - -bool TizenRendererNuiGL::OnPresent() { - bool result = TizenRendererEgl::OnPresent(); - view_->RequestRendering(); - return result; -} - -} // namespace flutter diff --git a/flutter/shell/platform/tizen/tizen_renderer_nui_gl.h b/flutter/shell/platform/tizen/tizen_renderer_nui_gl.h deleted file mode 100644 index abc5ba44..00000000 --- a/flutter/shell/platform/tizen/tizen_renderer_nui_gl.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2025 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef EMBEDDER_TIZEN_RENDERER_NUI_H_ -#define EMBEDDER_TIZEN_RENDERER_NUI_H_ - -#include -#include -#include "flutter/shell/platform/tizen/tizen_renderer_egl.h" -#include "flutter/shell/platform/tizen/tizen_renderer_gl.h" -#include "flutter/shell/platform/tizen/tizen_view_nui.h" - -namespace flutter { - -class TizenRendererNuiGL : public TizenRendererEgl { - public: - explicit TizenRendererNuiGL(TizenViewNui* view_nui, bool enable_impeller); - - virtual ~TizenRendererNuiGL(); - - bool OnPresent() override; - - private: - TizenViewNui* view_; -}; - -} // namespace flutter - -#endif // EMBEDDER_TIZEN_RENDERER_NUI_H_ diff --git a/flutter/shell/platform/tizen/tizen_view_nui.cc b/flutter/shell/platform/tizen/tizen_view_nui.cc deleted file mode 100644 index a848a39f..00000000 --- a/flutter/shell/platform/tizen/tizen_view_nui.cc +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2022 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "flutter/shell/platform/tizen/tizen_view_nui.h" - -#include - -#include - -#include "flutter/shell/platform/tizen/logger.h" -#include "flutter/shell/platform/tizen/tizen_view_event_handler_delegate.h" - -namespace flutter { - -TizenViewNui::TizenViewNui(int32_t width, - int32_t height, - Dali::Toolkit::ImageView* image_view, - Dali::NativeImageSourceQueuePtr native_image_queue, - int32_t default_window_id) - : TizenView(width, height), - image_view_(image_view), - native_image_queue_(native_image_queue), - default_window_id_(default_window_id) { - RegisterEventHandlers(); - PrepareInputMethod(); - Show(); -} - -TizenViewNui::~TizenViewNui() { - UnregisterEventHandlers(); -} - -void TizenViewNui::RegisterEventHandlers() { - rendering_callback_ = std::make_unique( - Dali::MakeCallback(this, &TizenViewNui::RenderOnce)); -} - -void TizenViewNui::UnregisterEventHandlers() { - rendering_callback_.release(); -} - -TizenGeometry TizenViewNui::GetGeometry() { - Dali::Vector2 size = image_view_->GetProperty(Dali::Actor::Property::SIZE) - .Get(); - TizenGeometry result = {0, 0, static_cast(size.width), - static_cast(size.height)}; - return result; -} - -bool TizenViewNui::SetGeometry(TizenGeometry geometry) { - view_delegate_->OnResize(0, 0, geometry.width, geometry.height); - - image_view_->SetProperty(Dali::Actor::Property::SIZE, - Dali::Vector2(geometry.width, geometry.height)); - - native_image_queue_->SetSize(geometry.width, geometry.height); - return true; -} - -int32_t TizenViewNui::GetDpi() { - return Dali::Stage::GetCurrent().GetDpi().width; -} - -uintptr_t TizenViewNui::GetWindowId() { - return default_window_id_; -} - -uint32_t TizenViewNui::GetResourceId() { - return 0; -} - -void TizenViewNui::Show() { - // Do nothing. -} - -void TizenViewNui::RequestRendering() { - rendering_callback_->Trigger(); -} - -void TizenViewNui::OnKey(const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - const char* compose, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down) { - bool handled = false; - - if (input_method_context_->ShouldFilterKey(key)) { - handled = input_method_context_->HandleNuiKeyEvent( - device_name, device_class, device_subclass, key, string, modifiers, - scan_code, timestamp, is_down); - } - - if (!handled) { - view_delegate_->OnKey(key, string, compose, modifiers, scan_code, - device_name, is_down); - } -} - -void TizenViewNui::UpdateFlutterCursor(const std::string& kind) { - FT_LOG(Info) << "UpdateFlutterCursor is not supported."; -} - -void TizenViewNui::PrepareInputMethod() { - input_method_context_ = - std::make_unique(GetWindowId()); - - // Set input method callbacks. - input_method_context_->SetOnPreeditStart( - [this]() { view_delegate_->OnComposeBegin(); }); - input_method_context_->SetOnPreeditChanged( - [this](std::string str, int cursor_pos) { - view_delegate_->OnComposeChange(str, cursor_pos); - }); - input_method_context_->SetOnPreeditEnd( - [this]() { view_delegate_->OnComposeEnd(); }); - input_method_context_->SetOnCommit( - [this](std::string str) { view_delegate_->OnCommit(str); }); -} - -void TizenViewNui::RenderOnce() { - Dali::Stage::GetCurrent().KeepRendering(0.0f); -} - -} // namespace flutter diff --git a/flutter/shell/platform/tizen/tizen_view_nui.h b/flutter/shell/platform/tizen/tizen_view_nui.h deleted file mode 100644 index 8efc9606..00000000 --- a/flutter/shell/platform/tizen/tizen_view_nui.h +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2022 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef EMBEDDER_TIZEN_VIEW_NUI_H_ -#define EMBEDDER_TIZEN_VIEW_NUI_H_ - -#include -#include -#include -#include - -#include - -#include "flutter/shell/platform/tizen/tizen_view.h" - -namespace flutter { - -class TizenViewNui : public TizenView { - public: - TizenViewNui(int32_t width, - int32_t height, - Dali::Toolkit::ImageView* image_view, - Dali::NativeImageSourceQueuePtr native_image_queue, - int32_t default_window_id); - - ~TizenViewNui(); - - TizenGeometry GetGeometry() override; - - bool SetGeometry(TizenGeometry geometry) override; - - void* GetRenderTarget() override { return native_image_queue_.Get(); } - - void* GetNativeHandle() override { return image_view_; } - - int32_t GetDpi() override; - - uintptr_t GetWindowId() override; - - uint32_t GetResourceId() override; - - void Show() override; - - void RequestRendering(); - - void OnKey(const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - const char* compose, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down); - - void UpdateFlutterCursor(const std::string& kind) override; - - private: - void RegisterEventHandlers(); - - void UnregisterEventHandlers(); - - void PrepareInputMethod(); - - void RenderOnce(); - - Dali::Toolkit::ImageView* image_view_ = nullptr; - Dali::NativeImageSourceQueuePtr native_image_queue_; - int32_t default_window_id_; - std::unique_ptr rendering_callback_; -}; - -} // namespace flutter - -#endif // EMBEDDER_TIZEN_VIEW_NUI_H_ From 2cd9cc0c01bee806c5465e4126d73a6f734199fd Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 10 Jul 2026 17:43:26 +0900 Subject: [PATCH 2/7] Remove dali packages from generate_sysroot.py The embedder no longer links dali (FlutterView/NUI removed), so the sysroot no longer needs the dali2 runtime/devel packages. Drop the dali_packages / dali_integration_devel_packages lists and the api_version-gated appends; the package set is now just base_packages + unified_packages. --- tools/generate_sysroot.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tools/generate_sysroot.py b/tools/generate_sysroot.py index 8b036cd2..21cab37f 100755 --- a/tools/generate_sysroot.py +++ b/tools/generate_sysroot.py @@ -95,22 +95,6 @@ 'wayland-devel', ] -# Only available for Tizen 6.5 and above. -dali_packages = [ - 'dali2', - 'dali2-adaptor', - 'dali2-adaptor-devel', - 'dali2-devel', - 'dali2-toolkit', - 'dali2-toolkit-devel', -] - -dali_integration_devel_packages = [ - 'dali2-integration-devel', - 'dali2-adaptor-integration-devel', - 'dali2-toolkit-integration-devel', -] - def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): target = 'standard' @@ -153,10 +137,6 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): existing_rpms = [f for f in download_path.iterdir() if f.suffix == '.rpm'] packages = base_packages + unified_packages - if api_version >= 6.5: - packages += dali_packages - if api_version > 10.0: - packages += dali_integration_devel_packages for package in packages: quoted = urllib.parse.quote(package) From 3e0a982d82c26521ae06babb94a6c38249e46f53 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Fri, 10 Jul 2026 18:34:17 +0900 Subject: [PATCH 3/7] Remove dead view-control C API orphaned by FlutterView removal --- flutter/shell/platform/tizen/BUILD.gn | 8 +-- flutter/shell/platform/tizen/flutter_tizen.cc | 67 ------------------- .../platform/tizen/flutter_tizen_view.cc | 2 +- .../platform/tizen/public/flutter_tizen.h | 38 ----------- 4 files changed, 3 insertions(+), 112 deletions(-) diff --git a/flutter/shell/platform/tizen/BUILD.gn b/flutter/shell/platform/tizen/BUILD.gn index b6a561a8..d942cdec 100644 --- a/flutter/shell/platform/tizen/BUILD.gn +++ b/flutter/shell/platform/tizen/BUILD.gn @@ -155,13 +155,9 @@ template("embedder") { } if (api_version != "6.0") { - sources += [ - "tizen_clipboard.cc", - ] + sources += [ "tizen_clipboard.cc" ] - defines += [ - "CLIPBOARD_SUPPORT", - ] + defines += [ "CLIPBOARD_SUPPORT" ] } configs += [ diff --git a/flutter/shell/platform/tizen/flutter_tizen.cc b/flutter/shell/platform/tizen/flutter_tizen.cc index 7dd48cd9..2411d4cb 100644 --- a/flutter/shell/platform/tizen/flutter_tizen.cc +++ b/flutter/shell/platform/tizen/flutter_tizen.cc @@ -220,78 +220,11 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow( return HandleForView(view.release()); } -void* FlutterDesktopViewGetNativeHandle(FlutterDesktopViewRef view_ref) { - flutter::FlutterTizenView* view = ViewFromHandle(view_ref); - return view->tizen_view()->GetNativeHandle(); -} - uint32_t FlutterDesktopViewGetResourceId(FlutterDesktopViewRef view_ref) { flutter::FlutterTizenView* view = ViewFromHandle(view_ref); return view->tizen_view()->GetResourceId(); } -void FlutterDesktopViewResize(FlutterDesktopViewRef view, - int32_t width, - int32_t height) { - ViewFromHandle(view)->Resize(width, height); -} - -void FlutterDesktopViewOnPointerEvent(FlutterDesktopViewRef view, - FlutterDesktopPointerEventType type, - double x, - double y, - size_t timestamp, - int32_t device_id) { - // TODO(swift-kim): Add support for mouse devices. - FlutterPointerDeviceKind device_kind = kFlutterPointerDeviceKindTouch; - FlutterPointerMouseButtons button = kFlutterPointerButtonMousePrimary; - - switch (type) { - case FlutterDesktopPointerEventType::kMouseDown: - default: - ViewFromHandle(view)->OnPointerDown(x, y, button, timestamp, device_kind, - device_id); - break; - case FlutterDesktopPointerEventType::kMouseUp: - ViewFromHandle(view)->OnPointerUp(x, y, button, timestamp, device_kind, - device_id); - break; - case FlutterDesktopPointerEventType::kMouseMove: - ViewFromHandle(view)->OnPointerMove(x, y, timestamp, device_kind, - device_id); - break; - } -} - -void FlutterDesktopViewOnKeyEvent(FlutterDesktopViewRef view, - const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down) { - ViewFromHandle(view)->OnKey(key, string, nullptr, modifiers, scan_code, - device_name, is_down); -} - -void FlutterDesktopViewSetFocus(FlutterDesktopViewRef view, bool focused) { - if (auto* tizen_view = dynamic_cast( - ViewFromHandle(view)->tizen_view())) { - tizen_view->SetFocus(focused); - } -} - -bool FlutterDesktopViewIsFocused(FlutterDesktopViewRef view) { - if (auto* tizen_view = dynamic_cast( - ViewFromHandle(view)->tizen_view())) { - return tizen_view->focused(); - } - return false; -} - void FlutterDesktopRegisterViewFactory( FlutterDesktopPluginRegistrarRef registrar, const char* view_type, diff --git a/flutter/shell/platform/tizen/flutter_tizen_view.cc b/flutter/shell/platform/tizen/flutter_tizen_view.cc index 206a70c3..593683d1 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_view.cc +++ b/flutter/shell/platform/tizen/flutter_tizen_view.cc @@ -7,8 +7,8 @@ #include "flutter/shell/platform/tizen/logger.h" #include "flutter/shell/platform/tizen/system_utils.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_renderer_egl.h" +#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_window.h" namespace { diff --git a/flutter/shell/platform/tizen/public/flutter_tizen.h b/flutter/shell/platform/tizen/public/flutter_tizen.h index 3d2d9d7d..abf65290 100644 --- a/flutter/shell/platform/tizen/public/flutter_tizen.h +++ b/flutter/shell/platform/tizen/public/flutter_tizen.h @@ -183,48 +183,10 @@ FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow( // @warning This API is a work-in-progress and may change. FLUTTER_EXPORT void FlutterDesktopViewDestroy(FlutterDesktopViewRef view); -// Returns a native UI toolkit handle for manipulation in host application. -// -// Cast the returned void* -// - window ecore wl2 : to Ecore_Wl2_Window* -// @warning This API is a work-in-progress and may change. -FLUTTER_EXPORT void* FlutterDesktopViewGetNativeHandle( - FlutterDesktopViewRef view); - // Returns the resource id of current window. FLUTTER_EXPORT uint32_t FlutterDesktopViewGetResourceId(FlutterDesktopViewRef view); -// Resizes the view. -// @warning This API is a work-in-progress and may change. -FLUTTER_EXPORT void FlutterDesktopViewResize(FlutterDesktopViewRef view, - int32_t width, - int32_t height); - -FLUTTER_EXPORT void FlutterDesktopViewOnPointerEvent( - FlutterDesktopViewRef view, - FlutterDesktopPointerEventType type, - double x, - double y, - size_t timestamp, - int32_t device_id); - -FLUTTER_EXPORT void FlutterDesktopViewOnKeyEvent(FlutterDesktopViewRef view, - const char* device_name, - uint32_t device_class, - uint32_t device_subclass, - const char* key, - const char* string, - uint32_t modifiers, - uint32_t scan_code, - size_t timestamp, - bool is_down); - -FLUTTER_EXPORT void FlutterDesktopViewSetFocus(FlutterDesktopViewRef view, - bool focused); - -FLUTTER_EXPORT bool FlutterDesktopViewIsFocused(FlutterDesktopViewRef view); - // ========== Plugin Registrar (extensions) ========== // Returns the view associated with this registrar's engine instance. From 89d83b305c091886ef2346fcd81d2f4d6c72f85b Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 13 Jul 2026 12:19:54 +0900 Subject: [PATCH 4/7] Remove orphaned FlutterDesktopPointerEventType enum --- flutter/shell/platform/tizen/public/flutter_tizen.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/flutter/shell/platform/tizen/public/flutter_tizen.h b/flutter/shell/platform/tizen/public/flutter_tizen.h index abf65290..b1964492 100644 --- a/flutter/shell/platform/tizen/public/flutter_tizen.h +++ b/flutter/shell/platform/tizen/public/flutter_tizen.h @@ -32,12 +32,6 @@ typedef enum { kEVulkan } FlutterDesktopRendererType; -typedef enum { - kMouseDown, - kMouseUp, - kMouseMove, -} FlutterDesktopPointerEventType; - typedef enum { // No external output. kNone, From dce30b6fbb4eb9d27198005e533a1f18edfb867b Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 13 Jul 2026 12:20:09 +0900 Subject: [PATCH 5/7] Remove dead TizenView class orphaned by FlutterView removal --- .../tizen/channels/platform_channel.cc | 7 +--- flutter/shell/platform/tizen/flutter_tizen.cc | 1 - .../platform/tizen/flutter_tizen_view.cc | 8 ----- .../shell/platform/tizen/flutter_tizen_view.h | 2 -- .../shell/platform/tizen/tizen_renderer.cc | 15 +++----- .../shell/platform/tizen/tizen_renderer_gl.cc | 1 - flutter/shell/platform/tizen/tizen_view.h | 36 ------------------- 7 files changed, 5 insertions(+), 65 deletions(-) delete mode 100644 flutter/shell/platform/tizen/tizen_view.h diff --git a/flutter/shell/platform/tizen/channels/platform_channel.cc b/flutter/shell/platform/tizen/channels/platform_channel.cc index d206490a..30cfc758 100644 --- a/flutter/shell/platform/tizen/channels/platform_channel.cc +++ b/flutter/shell/platform/tizen/channels/platform_channel.cc @@ -16,7 +16,6 @@ #include "flutter/shell/platform/tizen/channels/tizen_shell.h" #endif #include "flutter/shell/platform/tizen/logger.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_window.h" namespace flutter { @@ -244,11 +243,7 @@ void PlatformChannel::HandleMethodCall( } void PlatformChannel::SystemNavigatorPop() { - if (auto* view = dynamic_cast(view_)) { - view->SetFocus(false); - } else { - ui_app_exit(); - } + ui_app_exit(); } void PlatformChannel::PlaySystemSound(const std::string& sound_type) { diff --git a/flutter/shell/platform/tizen/flutter_tizen.cc b/flutter/shell/platform/tizen/flutter_tizen.cc index 2411d4cb..a89a2574 100644 --- a/flutter/shell/platform/tizen/flutter_tizen.cc +++ b/flutter/shell/platform/tizen/flutter_tizen.cc @@ -14,7 +14,6 @@ #include "flutter/shell/platform/tizen/flutter_tizen_view.h" #include "flutter/shell/platform/tizen/logger.h" #include "flutter/shell/platform/tizen/public/flutter_platform_view.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_window.h" #include "flutter/shell/platform/tizen/tizen_window_ecore_wl2.h" diff --git a/flutter/shell/platform/tizen/flutter_tizen_view.cc b/flutter/shell/platform/tizen/flutter_tizen_view.cc index 593683d1..030e12db 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_view.cc +++ b/flutter/shell/platform/tizen/flutter_tizen_view.cc @@ -8,7 +8,6 @@ #include "flutter/shell/platform/tizen/logger.h" #include "flutter/shell/platform/tizen/system_utils.h" #include "flutter/shell/platform/tizen/tizen_renderer_egl.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_window.h" namespace { @@ -97,13 +96,6 @@ void FlutterTizenView::SetupChannels() { messenger, tizen_view_->input_method_context()); } -void FlutterTizenView::Resize(int32_t width, int32_t height) { - TizenGeometry geometry = tizen_view_->GetGeometry(); - geometry.width = width; - geometry.height = height; - tizen_view_->SetGeometry(geometry); -} - void FlutterTizenView::OnResize(int32_t left, int32_t top, int32_t width, diff --git a/flutter/shell/platform/tizen/flutter_tizen_view.h b/flutter/shell/platform/tizen/flutter_tizen_view.h index 085ec06d..4533acc8 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_view.h +++ b/flutter/shell/platform/tizen/flutter_tizen_view.h @@ -44,8 +44,6 @@ class FlutterTizenView : public TizenViewEventHandlerDelegate { TizenViewBase* tizen_view() { return tizen_view_.get(); } - void Resize(int32_t width, int32_t height); - void OnResize(int32_t left, int32_t top, int32_t width, diff --git a/flutter/shell/platform/tizen/tizen_renderer.cc b/flutter/shell/platform/tizen/tizen_renderer.cc index 52586e15..7470aff7 100644 --- a/flutter/shell/platform/tizen/tizen_renderer.cc +++ b/flutter/shell/platform/tizen/tizen_renderer.cc @@ -4,7 +4,6 @@ #include "flutter/shell/platform/tizen/tizen_renderer.h" #include "flutter/shell/platform/tizen/flutter_tizen_engine.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_view_base.h" #include "flutter/shell/platform/tizen/tizen_window.h" @@ -14,16 +13,10 @@ TizenRenderer::TizenRenderer() {} bool TizenRenderer::CreateSurface(TizenViewBase* view) { TizenGeometry geometry = view->GetGeometry(); - if (dynamic_cast(view)) { - auto* window = dynamic_cast(view); - return CreateSurface(window->GetRenderTarget(), - window->GetRenderTargetDisplay(), geometry.width, - geometry.height); - } else { - auto* tizen_view = dynamic_cast(view); - return CreateSurface(tizen_view->GetRenderTarget(), nullptr, geometry.width, - geometry.height); - } + auto* window = dynamic_cast(view); + return CreateSurface(window->GetRenderTarget(), + window->GetRenderTargetDisplay(), geometry.width, + geometry.height); } TizenRenderer::~TizenRenderer() = default; diff --git a/flutter/shell/platform/tizen/tizen_renderer_gl.cc b/flutter/shell/platform/tizen/tizen_renderer_gl.cc index 65cefdee..36b6322f 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_gl.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_gl.cc @@ -5,7 +5,6 @@ #include "flutter/shell/platform/tizen/tizen_renderer_gl.h" #include "flutter/shell/platform/tizen/flutter_tizen_engine.h" #include "flutter/shell/platform/tizen/flutter_tizen_view.h" -#include "flutter/shell/platform/tizen/tizen_view.h" #include "flutter/shell/platform/tizen/tizen_view_base.h" #include "flutter/shell/platform/tizen/tizen_window.h" diff --git a/flutter/shell/platform/tizen/tizen_view.h b/flutter/shell/platform/tizen/tizen_view.h deleted file mode 100644 index 4cebe57e..00000000 --- a/flutter/shell/platform/tizen/tizen_view.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2022 Samsung Electronics Co., Ltd. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef EMBEDDER_TIZEN_VIEW_H_ -#define EMBEDDER_TIZEN_VIEW_H_ - -#include - -#include "flutter/shell/platform/tizen/tizen_view_base.h" - -namespace flutter { - -class FlutterTizenView; - -class TizenView : public TizenViewBase { - public: - TizenView() = default; - virtual ~TizenView() = default; - - bool focused() { return focused_; }; - - void SetFocus(bool focused) { focused_ = focused; }; - - protected: - explicit TizenView(int32_t width, int32_t height) - : initial_width_(width), initial_height_(height) {} - - int32_t initial_width_ = 0; - int32_t initial_height_ = 0; - bool focused_ = false; -}; - -} // namespace flutter - -#endif // EMBEDDER_TIZEN_VIEW_H_ From b7ed2994e172c29dfa905b0bd5ab8a93817718e6 Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 13 Jul 2026 12:20:22 +0900 Subject: [PATCH 6/7] Remove stale NUI build note from README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 178df73a..29c29abd 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,6 @@ The Flutter embedder for Tizen. - To build an app (TPK) with the embedder generated in the above, copy the output artifacts (`libflutter_tizen*.so`) into the [flutter-tizen](https://github.com/flutter-tizen/flutter-tizen) tool's cached artifacts directory (`flutter/bin/cache/artifacts/engine`) and run `flutter-tizen run` or `flutter-tizen build tpk`. - To use the embedder's built-in libc++ (`third_party/libcxx`) instead of the target device's `libstdc++.so`, provide the `--no-system-cxx` option to `tools/gn`. -- Building NUI-related code requires a sysroot for Tizen 6.5 or above and the `--api-version 6.5` option. ## Repository structure From 1da8ac03fb1718419c69a2d4aa1ab0a11530146c Mon Sep 17 00:00:00 2001 From: JunsuChoi Date: Mon, 13 Jul 2026 12:21:48 +0900 Subject: [PATCH 7/7] Drop unused tbm_surface includes in tizen_renderer_egl Also null-check the TizenWindow cast in TizenRenderer::CreateSurface. --- flutter/shell/platform/tizen/tizen_renderer.cc | 5 ++++- flutter/shell/platform/tizen/tizen_renderer_egl.cc | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flutter/shell/platform/tizen/tizen_renderer.cc b/flutter/shell/platform/tizen/tizen_renderer.cc index 7470aff7..b10f699f 100644 --- a/flutter/shell/platform/tizen/tizen_renderer.cc +++ b/flutter/shell/platform/tizen/tizen_renderer.cc @@ -12,8 +12,11 @@ namespace flutter { TizenRenderer::TizenRenderer() {} bool TizenRenderer::CreateSurface(TizenViewBase* view) { - TizenGeometry geometry = view->GetGeometry(); auto* window = dynamic_cast(view); + if (!window) { + return false; + } + TizenGeometry geometry = view->GetGeometry(); return CreateSurface(window->GetRenderTarget(), window->GetRenderTargetDisplay(), geometry.width, geometry.height); diff --git a/flutter/shell/platform/tizen/tizen_renderer_egl.cc b/flutter/shell/platform/tizen/tizen_renderer_egl.cc index 12aeca9a..5da84ad7 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_egl.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_egl.cc @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include "flutter/shell/platform/tizen/external_texture_pixel_egl.h" #include "flutter/shell/platform/tizen/external_texture_surface_egl.h"