Skip to content

Commit ba0a5e6

Browse files
committed
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.*
1 parent ee9f5f2 commit ba0a5e6

13 files changed

Lines changed: 0 additions & 452 deletions

flutter/shell/platform/tizen/BUILD.gn

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ config("flutter_tizen_config") {
1313
include_dirs = [
1414
"${sysroot_path}/usr/include/appfw",
1515
"${sysroot_path}/usr/include/base",
16-
"${sysroot_path}/usr/include/dali",
17-
"${sysroot_path}/usr/include/dali-adaptor",
18-
"${sysroot_path}/usr/include/dali-toolkit",
1916
"${sysroot_path}/usr/include/dlog",
2017
"${sysroot_path}/usr/include/ecore-1",
2118
"${sysroot_path}/usr/include/ecore-imf-1",
@@ -159,19 +156,10 @@ template("embedder") {
159156

160157
if (api_version != "6.0") {
161158
sources += [
162-
"flutter_tizen_nui.cc",
163159
"tizen_clipboard.cc",
164-
"tizen_renderer_nui_gl.cc",
165-
"tizen_view_nui.cc",
166-
]
167-
168-
libs += [
169-
"dali2-adaptor",
170-
"dali2-core",
171160
]
172161

173162
defines += [
174-
"NUI_SUPPORT",
175163
"CLIPBOARD_SUPPORT",
176164
]
177165
}

flutter/shell/platform/tizen/flutter_tizen.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515
#include "flutter/shell/platform/tizen/logger.h"
1616
#include "flutter/shell/platform/tizen/public/flutter_platform_view.h"
1717
#include "flutter/shell/platform/tizen/tizen_view.h"
18-
#ifdef NUI_SUPPORT
19-
#include "flutter/shell/platform/tizen/tizen_renderer_egl.h"
20-
#include "flutter/shell/platform/tizen/tizen_view_nui.h"
21-
#endif
2218
#include "flutter/shell/platform/tizen/tizen_window.h"
2319
#include "flutter/shell/platform/tizen/tizen_window_ecore_wl2.h"
2420

@@ -277,16 +273,8 @@ void FlutterDesktopViewOnKeyEvent(FlutterDesktopViewRef view,
277273
uint32_t scan_code,
278274
size_t timestamp,
279275
bool is_down) {
280-
#ifdef NUI_SUPPORT
281-
if (auto* nui_view = dynamic_cast<flutter::TizenViewNui*>(
282-
ViewFromHandle(view)->tizen_view())) {
283-
nui_view->OnKey(device_name, device_class, device_subclass, key, string,
284-
nullptr, modifiers, scan_code, timestamp, is_down);
285-
}
286-
#else
287276
ViewFromHandle(view)->OnKey(key, string, nullptr, modifiers, scan_code,
288277
device_name, is_down);
289-
#endif
290278
}
291279

292280
void FlutterDesktopViewSetFocus(FlutterDesktopViewRef view, bool focused) {

flutter/shell/platform/tizen/flutter_tizen_engine.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@
2222
#include "flutter/shell/platform/tizen/tizen_renderer_vulkan.h"
2323
#endif
2424

25-
#ifdef NUI_SUPPORT
26-
#include "flutter/shell/platform/tizen/tizen_renderer_nui_gl.h"
27-
#include "flutter/shell/platform/tizen/tizen_view_nui.h"
28-
#endif
29-
3025
namespace flutter {
3126

3227
namespace {
@@ -90,13 +85,6 @@ std::unique_ptr<TizenRenderer> FlutterTizenEngine::CreateRenderer(
9085
FlutterDesktopRendererType renderer_type) {
9186
switch (renderer_type) {
9287
case FlutterDesktopRendererType::kEGL:
93-
#ifdef NUI_SUPPORT
94-
if (auto* nui_view =
95-
dynamic_cast<flutter::TizenViewNui*>(view_->tizen_view())) {
96-
return std::make_unique<TizenRendererNuiGL>(
97-
nui_view, project_->HasArgument("--enable-impeller"));
98-
}
99-
#endif
10088
return std::make_unique<TizenRendererEgl>(
10189
view_->tizen_view(), project_->HasArgument("--enable-impeller"));
10290
case FlutterDesktopRendererType::kEVulkan:

flutter/shell/platform/tizen/flutter_tizen_nui.cc

Lines changed: 0 additions & 56 deletions
This file was deleted.

flutter/shell/platform/tizen/flutter_tizen_view.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include "flutter/shell/platform/tizen/logger.h"
99
#include "flutter/shell/platform/tizen/system_utils.h"
1010
#include "flutter/shell/platform/tizen/tizen_view.h"
11-
#ifdef NUI_SUPPORT
12-
#include "flutter/shell/platform/tizen/tizen_view_nui.h"
13-
#endif
1411
#include "flutter/shell/platform/tizen/tizen_renderer_egl.h"
1512
#include "flutter/shell/platform/tizen/tizen_window.h"
1613

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

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@ typedef struct {
8383
bool floating_menu_support;
8484
} FlutterDesktopWindowProperties;
8585

86-
// Properties for configuring the initial settings of a Flutter view.
87-
typedef struct {
88-
// The width of the view, or the maximum width if the value is zero.
89-
int32_t width;
90-
// The height of the view, or the maximum height if the value is zero.
91-
int32_t height;
92-
} FlutterDesktopViewProperties;
93-
9486
// Properties for configuring a Flutter engine instance.
9587
typedef struct {
9688
// The path to the flutter_assets folder for the application to be run.
@@ -185,18 +177,6 @@ FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow(
185177
const FlutterDesktopWindowProperties& window_properties,
186178
FlutterDesktopEngineRef engine);
187179

188-
// Creates a view that hosts and displays the given engine instance.
189-
//
190-
// The type of |image_view| must be Dali::Toolkit::ImageView*.
191-
// The type of |native_image_queue| must be Dali::NativeImageSourceQueue*.
192-
// @warning This API is a work-in-progress and may change.
193-
FLUTTER_EXPORT FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView(
194-
const FlutterDesktopViewProperties& view_properties,
195-
FlutterDesktopEngineRef engine,
196-
void* image_view,
197-
void* native_image_queue,
198-
int32_t default_window_id);
199-
200180
// Destroys the view.
201181
//
202182
// The engine owned by the view will also be shut down implicitly.

flutter/shell/platform/tizen/tizen_input_method_context.cc

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ TizenInputMethodContext::~TizenInputMethodContext() {
173173
UnregisterInputPanelEventCallback();
174174
UnregisterEventCallbacks();
175175

176-
#ifdef NUI_SUPPORT
177-
if (ecore_device_) {
178-
ecore_device_del(ecore_device_);
179-
}
180-
#endif
181-
182176
if (imf_context_) {
183177
ecore_imf_context_del(imf_context_);
184178
}
@@ -207,50 +201,6 @@ bool TizenInputMethodContext::HandleEcoreEventKey(Ecore_Event_Key* event,
207201
}
208202
}
209203

210-
#ifdef NUI_SUPPORT
211-
bool TizenInputMethodContext::HandleNuiKeyEvent(const char* device_name,
212-
uint32_t device_class,
213-
uint32_t device_subclass,
214-
const char* key,
215-
const char* string,
216-
uint32_t modifiers,
217-
uint32_t scan_code,
218-
size_t timestamp,
219-
bool is_down) {
220-
Ecore_Event_Key event = {};
221-
event.keyname = event.key = key ? key : "";
222-
event.string = string ? string : "";
223-
event.modifiers = modifiers;
224-
event.keycode = scan_code;
225-
event.timestamp = timestamp;
226-
if (device_name) {
227-
if (!ecore_device_) {
228-
ecore_device_ = ecore_device_add();
229-
}
230-
231-
event.dev = ecore_device_;
232-
ecore_device_name_set(event.dev, device_name);
233-
ecore_device_class_set(event.dev,
234-
static_cast<Ecore_IMF_Device_Class>(device_class));
235-
ecore_device_subclass_set(
236-
event.dev, static_cast<Ecore_IMF_Device_Subclass>(device_subclass));
237-
}
238-
239-
Ecore_IMF_Event imf_event;
240-
if (is_down) {
241-
imf_event.key_down =
242-
EcoreEventKeyToEcoreImfEvent<Ecore_IMF_Event_Key_Down>(&event);
243-
return ecore_imf_context_filter_event(imf_context_,
244-
ECORE_IMF_EVENT_KEY_DOWN, &imf_event);
245-
} else {
246-
imf_event.key_up =
247-
EcoreEventKeyToEcoreImfEvent<Ecore_IMF_Event_Key_Up>(&event);
248-
return ecore_imf_context_filter_event(imf_context_, ECORE_IMF_EVENT_KEY_UP,
249-
&imf_event);
250-
}
251-
}
252-
#endif
253-
254204
InputPanelGeometry TizenInputMethodContext::GetInputPanelGeometry() {
255205
InputPanelGeometry geometry;
256206
if (!imf_context_) {

flutter/shell/platform/tizen/tizen_input_method_context.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,6 @@ class TizenInputMethodContext {
3131

3232
bool HandleEcoreEventKey(Ecore_Event_Key* event, bool is_down);
3333

34-
#ifdef NUI_SUPPORT
35-
bool HandleNuiKeyEvent(const char* device_name,
36-
uint32_t device_class,
37-
uint32_t device_subclass,
38-
const char* key,
39-
const char* string,
40-
uint32_t modifiers,
41-
uint32_t scan_code,
42-
size_t timestamp,
43-
bool is_down);
44-
#endif
45-
4634
InputPanelGeometry GetInputPanelGeometry();
4735

4836
void ResetInputMethodContext();
@@ -95,9 +83,6 @@ class TizenInputMethodContext {
9583
void SetContextOptions();
9684
void SetInputPanelOptions();
9785

98-
#ifdef NUI_SUPPORT
99-
Ecore_Device* ecore_device_ = nullptr;
100-
#endif
10186
Ecore_IMF_Context* imf_context_ = nullptr;
10287
bool editing_active_ = false;
10388
OnCommit on_commit_;

flutter/shell/platform/tizen/tizen_renderer_egl.cc

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
#include <Ecore_Wl2.h>
99
#include <GLES2/gl2.h>
1010
#include <GLES2/gl2ext.h>
11-
#ifdef NUI_SUPPORT
12-
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
13-
#endif
1411
#include <tbm_dummy_display.h>
1512
#include <tbm_surface.h>
1613
#include <tbm_surface_queue.h>
@@ -99,17 +96,6 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
9996
egl_surface_ = eglCreateWindowSurface(
10097
egl_display_, egl_config_,
10198
reinterpret_cast<EGLNativeWindowType>(egl_window), attribs);
102-
} else {
103-
#ifdef NUI_SUPPORT
104-
Dali::NativeImageSourceQueuePtr dali_native_image_queue =
105-
static_cast<Dali::NativeImageSourceQueue*>(render_target);
106-
tbm_surface_queue_h tbm_surface_queue_ =
107-
Dali::AnyCast<tbm_surface_queue_h>(
108-
dali_native_image_queue->GetNativeImageSourceQueue());
109-
egl_surface_ = eglCreateWindowSurface(
110-
egl_display_, egl_config_,
111-
reinterpret_cast<EGLNativeWindowType>(tbm_surface_queue_), attribs);
112-
#endif
11399
}
114100

115101
if (egl_surface_ == EGL_NO_SURFACE) {

flutter/shell/platform/tizen/tizen_renderer_nui_gl.cc

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)