Skip to content

Commit 39f7d91

Browse files
authored
Change minimum Tizen version 5.5 to 6.0 (#66)
1 parent a03d21c commit 39f7d91

13 files changed

+30
-113
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
strategy:
1010
matrix:
11-
api-version: ['5.5', '6.0', '6.5']
11+
api-version: ['6.0', '6.5']
1212
arch: [arm, arm64, x86]
1313
include:
1414
- arch: arm
@@ -45,29 +45,19 @@ jobs:
4545
4646
- name: Generate Tizen 6.0 sysroot
4747
if: ${{ matrix.api-version == '6.0' }}
48-
run: src/tools/generate_sysroot.py --api-version 6.0 --out src/sysroot-6.0
48+
run: src/tools/generate_sysroot.py --out src/sysroot-6.0
4949

5050
- name: Generate Tizen 6.5 sysroot
5151
if: ${{ matrix.api-version == '6.5' }}
5252
run: src/tools/generate_sysroot.py --api-version 6.5 --out src/sysroot-6.5
5353

54-
- name: Build for Tizen 5.5
55-
if: ${{ matrix.api-version == '5.5' }}
56-
run: |
57-
src/tools/gn \
58-
--target-cpu ${{ matrix.arch }} \
59-
--target-toolchain /usr/lib/llvm-12 \
60-
--target-dir build
61-
ninja -C src/out/build
62-
6354
- name: Build for Tizen 6.0
6455
if: ${{ matrix.api-version == '6.0' }}
6556
run: |
6657
src/tools/gn \
6758
--target-cpu ${{ matrix.arch }} \
6859
--target-toolchain /usr/lib/llvm-12 \
6960
--target-sysroot src/sysroot-6.0/${{ matrix.arch }} \
70-
--api-version 6.0 --system-cxx \
7161
--target-dir build
7262
ninja -C src/out/build
7363
@@ -78,7 +68,7 @@ jobs:
7868
--target-cpu ${{ matrix.arch }} \
7969
--target-toolchain /usr/lib/llvm-12 \
8070
--target-sysroot src/sysroot-6.5/${{ matrix.arch }} \
81-
--api-version 6.5 --system-cxx \
71+
--api-version 6.5 \
8272
--target-dir build
8373
ninja -C src/out/build
8474

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ The Flutter embedder for Tizen.
5858
### Notes
5959

6060
- 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`.
61-
- To use the target device's `libstdc++.so` instead of the embedder's built-in libc++ (`third_party/libcxx`), provide the `--system-cxx` option to `tools/gn`. Tizen 5.5's `libstdc++.so` is not compatible with C++17, so you cannot use this option for Tizen 5.5.
61+
- 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`.
6262
- Building NUI-related code requires a sysroot for Tizen 6.5 or above and the `--api-version 6.5` option.
6363

6464
## Repository structure

flutter/shell/platform/tizen/BUILD.gn

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ template("embedder") {
7777
public = _public_headers
7878

7979
sources = [
80+
"accessibility_bridge_tizen.cc",
8081
"accessibility_settings.cc",
8182
"channels/accessibility_channel.cc",
8283
"channels/app_control.cc",
@@ -93,8 +94,11 @@ template("embedder") {
9394
"channels/settings_channel.cc",
9495
"channels/text_input_channel.cc",
9596
"channels/window_channel.cc",
97+
"external_texture_pixel_egl.cc",
9698
"external_texture_pixel_evas_gl.cc",
99+
"external_texture_surface_egl.cc",
97100
"external_texture_surface_evas_gl.cc",
101+
"flutter_platform_node_delegate_tizen.cc",
98102
"flutter_project_bundle.cc",
99103
"flutter_tizen.cc",
100104
"flutter_tizen_elementary.cc",
@@ -106,8 +110,11 @@ template("embedder") {
106110
"tizen_event_loop.cc",
107111
"tizen_input_method_context.cc",
108112
"tizen_renderer.cc",
113+
"tizen_renderer_egl.cc",
109114
"tizen_renderer_evas_gl.cc",
110115
"tizen_view_elementary.cc",
116+
"tizen_vsync_waiter.cc",
117+
"tizen_window_ecore_wl2.cc",
111118
"tizen_window_elementary.cc",
112119
]
113120

@@ -128,6 +135,7 @@ template("embedder") {
128135
"ecore_imf",
129136
"ecore_imf_evas",
130137
"ecore_input",
138+
"ecore_wl2",
131139
"efl-extension",
132140
"eina",
133141
"elementary",
@@ -136,30 +144,14 @@ template("embedder") {
136144
"feedback",
137145
"flutter_engine",
138146
"tbm",
147+
"tdm-client",
148+
"tizen-extension-client",
139149
"vconf",
140150
"wayland-client",
151+
"EGL",
152+
"GLESv2",
141153
]
142154

143-
if (target_name != "flutter_tizen_wearable") {
144-
sources += [
145-
"accessibility_bridge_tizen.cc",
146-
"external_texture_pixel_egl.cc",
147-
"external_texture_surface_egl.cc",
148-
"flutter_platform_node_delegate_tizen.cc",
149-
"tizen_renderer_egl.cc",
150-
"tizen_vsync_waiter.cc",
151-
"tizen_window_ecore_wl2.cc",
152-
]
153-
154-
libs += [
155-
"ecore_wl2",
156-
"tdm-client",
157-
"tizen-extension-client",
158-
"EGL",
159-
"GLESv2",
160-
]
161-
}
162-
163155
if (target_name == "flutter_tizen_common") {
164156
sources += [ "channels/tizen_shell.cc" ]
165157

@@ -172,7 +164,7 @@ template("embedder") {
172164
defines += invoker.defines
173165
defines += [ "FLUTTER_ENGINE_NO_PROTOTYPES" ]
174166

175-
if (api_version == "6.5" && target_name != "flutter_tizen_wearable") {
167+
if (api_version == "6.5") {
176168
sources += [
177169
"flutter_tizen_nui.cc",
178170
"tizen_clipboard.cc",
@@ -203,16 +195,13 @@ template("embedder") {
203195
deps += [
204196
":dart_api_dl",
205197
"//flutter/shell/platform/common:common_cpp",
198+
"//flutter/shell/platform/common:common_cpp_accessibility",
206199
"//flutter/shell/platform/common:common_cpp_input",
207200
"//flutter/shell/platform/common:common_cpp_library_headers",
208201
"//flutter/shell/platform/common/client_wrapper:client_wrapper",
209202
"//flutter/shell/platform/embedder:embedder_headers",
210203
"//third_party/rapidjson",
211204
]
212-
213-
if (target_name != "flutter_tizen_wearable") {
214-
deps += [ "//flutter/shell/platform/common:common_cpp_accessibility" ]
215-
}
216205
}
217206
}
218207

@@ -222,12 +211,6 @@ embedder("flutter_tizen_mobile") {
222211
defines = [ "MOBILE_PROFILE" ]
223212
}
224213

225-
embedder("flutter_tizen_wearable") {
226-
target_type = "shared_library"
227-
228-
defines = [ "WEARABLE_PROFILE" ]
229-
}
230-
231214
embedder("flutter_tizen_tv") {
232215
target_type = "shared_library"
233216

@@ -286,7 +269,6 @@ group("flutter_tizen") {
286269
":flutter_tizen_common",
287270
":flutter_tizen_mobile",
288271
":flutter_tizen_tv",
289-
":flutter_tizen_wearable",
290272
":publish_cpp_client_wrapper",
291273
":publish_headers_tizen",
292274
]

flutter/shell/platform/tizen/accessibility_settings.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace flutter {
1616

1717
AccessibilitySettings::AccessibilitySettings(FlutterTizenEngine* engine)
1818
: engine_(engine) {
19-
#ifndef WEARABLE_PROFILE
2019
bool tts_enabled = false;
2120
int ret = system_settings_get_value_bool(
2221
SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, &tts_enabled);
@@ -29,7 +28,6 @@ AccessibilitySettings::AccessibilitySettings(FlutterTizenEngine* engine)
2928
}
3029
system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS,
3130
OnScreenReaderStateChanged, this);
32-
#endif
3331

3432
#ifdef TV_PROFILE
3533
int high_contrast = 0;
@@ -46,9 +44,7 @@ AccessibilitySettings::AccessibilitySettings(FlutterTizenEngine* engine)
4644
}
4745

4846
AccessibilitySettings::~AccessibilitySettings() {
49-
#ifndef WEARABLE_PROFILE
5047
system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS);
51-
#endif
5248
#ifdef TV_PROFILE
5349
system_settings_unset_changed_cb(
5450
SYSTEM_SETTINGS_KEY_ACCESSIBILITY_HIGHCONTRAST);
@@ -76,7 +72,6 @@ void AccessibilitySettings::OnHighContrastStateChanged(
7672
void AccessibilitySettings::OnScreenReaderStateChanged(
7773
system_settings_key_e key,
7874
void* user_data) {
79-
#ifndef WEARABLE_PROFILE
8075
auto* self = static_cast<AccessibilitySettings*>(user_data);
8176

8277
bool enabled = false;
@@ -90,7 +85,6 @@ void AccessibilitySettings::OnScreenReaderStateChanged(
9085
self->screen_reader_enabled_ = enabled;
9186
self->engine_->SetSemanticsEnabled(enabled);
9287
}
93-
#endif
9488
}
9589

9690
} // namespace flutter

flutter/shell/platform/tizen/flutter_tizen.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
#include "flutter/shell/platform/tizen/tizen_view_nui.h"
2121
#endif
2222
#include "flutter/shell/platform/tizen/tizen_window.h"
23-
#ifndef WEARABLE_PROFILE
2423
#include "flutter/shell/platform/tizen/tizen_window_ecore_wl2.h"
25-
#endif
2624
#include "flutter/shell/platform/tizen/tizen_window_elementary.h"
2725

2826
namespace {
@@ -209,13 +207,9 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow(
209207
window_properties.focusable, window_properties.top_level,
210208
window_properties.external_output_type);
211209
} else {
212-
#ifndef WEARABLE_PROFILE
213210
window = std::make_unique<flutter::TizenWindowEcoreWl2>(
214211
window_geometry, window_properties.transparent,
215212
window_properties.focusable, window_properties.top_level);
216-
#else
217-
return nullptr;
218-
#endif
219213
}
220214

221215
auto view = std::make_unique<flutter::FlutterTizenView>(

flutter/shell/platform/tizen/flutter_tizen_engine.cc

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
#include <string>
1010
#include <vector>
1111

12-
#ifndef WEARABLE_PROFILE
1312
#include "flutter/shell/platform/tizen/accessibility_bridge_tizen.h"
1413
#include "flutter/shell/platform/tizen/flutter_platform_node_delegate_tizen.h"
15-
#include "flutter/shell/platform/tizen/tizen_renderer_egl.h"
16-
#endif
1714
#include "flutter/shell/platform/tizen/flutter_tizen_view.h"
1815
#include "flutter/shell/platform/tizen/logger.h"
1916
#include "flutter/shell/platform/tizen/system_utils.h"
2017
#include "flutter/shell/platform/tizen/tizen_input_method_context.h"
18+
#include "flutter/shell/platform/tizen/tizen_renderer_egl.h"
2119
#include "flutter/shell/platform/tizen/tizen_renderer_evas_gl.h"
2220

2321
namespace flutter {
@@ -92,12 +90,9 @@ void FlutterTizenEngine::CreateRenderer(
9290
}
9391
},
9492
renderer_.get());
95-
}
96-
#ifndef WEARABLE_PROFILE
97-
else {
93+
} else {
9894
renderer_ = std::make_unique<TizenRendererEgl>();
9995
}
100-
#endif
10196
}
10297

10398
bool FlutterTizenEngine::RunEngine() {
@@ -205,7 +200,7 @@ bool FlutterTizenEngine::RunEngine() {
205200
if (!project_->custom_dart_entrypoint().empty()) {
206201
args.custom_dart_entrypoint = project_->custom_dart_entrypoint().c_str();
207202
}
208-
#ifndef WEARABLE_PROFILE
203+
209204
args.update_semantics_callback2 = [](const FlutterSemanticsUpdate2* update,
210205
void* user_data) {
211206
auto* engine = static_cast<FlutterTizenEngine*>(user_data);
@@ -222,7 +217,6 @@ bool FlutterTizenEngine::RunEngine() {
222217
}
223218
};
224219
}
225-
#endif
226220

227221
FlutterRendererConfig renderer_config = GetRendererConfig();
228222

@@ -268,14 +262,14 @@ bool FlutterTizenEngine::StopEngine() {
268262
plugin_registrar_destruction_callbacks_) {
269263
callback(registrar);
270264
}
271-
#ifndef WEARABLE_PROFILE
265+
272266
{
273267
std::lock_guard<std::mutex> lock(vsync_mutex_);
274268
if (vsync_waiter_) {
275269
vsync_waiter_.reset();
276270
}
277271
}
278-
#endif
272+
279273
FlutterEngineResult result = embedder_api_.Shutdown(engine_);
280274
view_ = nullptr;
281275
engine_ = nullptr;
@@ -500,7 +494,6 @@ FlutterRendererConfig FlutterTizenEngine::GetRendererConfig() {
500494
return config;
501495
}
502496

503-
#ifndef WEARABLE_PROFILE
504497
void FlutterTizenEngine::DispatchAccessibilityAction(
505498
uint64_t target,
506499
FlutterSemanticsAction action,
@@ -552,6 +545,5 @@ void FlutterTizenEngine::OnUpdateSemantics(
552545
geometry.height);
553546
window->SetRootNode(root);
554547
}
555-
#endif
556548

557549
} // namespace flutter

0 commit comments

Comments
 (0)