Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,17 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}
path: src/out/build/libflutter_tizen*.so
path: |
src/out/build/libflutter_tizen_common.so
src/out/build/libflutter_tizen_mobile.so
src/out/build/libflutter_tizen_tv.so
if-no-files-found: error

- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_experimental
path: |
src/out/build/libflutter_tizen*_experimental.so
if-no-files-found: error

- uses: actions/upload-artifact@v4
Expand All @@ -85,7 +95,17 @@ jobs:
if: ${{ github.event_name == 'push' }}
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_symbols
path: src/out/build/so.unstripped/libflutter_tizen*.so
path: |
src/out/build/so.unstripped/libflutter_tizen_common.so
src/out/build/so.unstripped/libflutter_tizen_mobile.so
src/out/build/so.unstripped/libflutter_tizen_tv.so
if-no-files-found: error

- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_experimental_symbols
path: src/out/build/so.unstripped/libflutter_tizen*_experimental.so
if-no-files-found: error

- uses: actions/upload-artifact@v4
Expand Down
32 changes: 31 additions & 1 deletion flutter/shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ template("embedder") {
"GLESv2",
]

if (target_name == "flutter_tizen_common") {
if (target_name == "flutter_tizen_common" ||
target_name == "flutter_tizen_common_experimental") {
sources += [ "channels/tizen_shell.cc" ]

libs += [
Expand All @@ -152,6 +153,14 @@ template("embedder") {
defines += invoker.defines
defines += [ "FLUTTER_ENGINE_NO_PROTOTYPES" ]

if (target_name == "flutter_tizen_mobile_experimental" ||
target_name == "flutter_tizen_tv_experimental" ||
target_name == "flutter_tizen_common_experimental") {
defines += [ "FLUTTER_TIZEN_EXPERIMENTAL" ]
sources += [ "tizen_renderer_vulkan.cc" ]
libs += [ "vulkan" ]
}

if (api_version != "6.0") {
sources += [
"flutter_tizen_nui.cc",
Expand Down Expand Up @@ -201,18 +210,36 @@ embedder("flutter_tizen_mobile") {
defines = [ "MOBILE_PROFILE" ]
}

embedder("flutter_tizen_mobile_experimental") {
target_type = "shared_library"

defines = [ "MOBILE_PROFILE" ]
}

embedder("flutter_tizen_tv") {
target_type = "shared_library"

defines = [ "TV_PROFILE" ]
}

embedder("flutter_tizen_tv_experimental") {
target_type = "shared_library"

defines = [ "TV_PROFILE" ]
}

embedder("flutter_tizen_common") {
target_type = "shared_library"

defines = [ "COMMON_PROFILE" ]
}

embedder("flutter_tizen_common_experimental") {
target_type = "shared_library"

defines = [ "COMMON_PROFILE" ]
}

Comment on lines +237 to +242
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to test libflutter_tizen_common_experimental.so on an RPi4 with the Vulkan library installed.

I renamed libflutter_tizen_common_experimental.so to libflutter_tizen_common.so in the path flutter/bin/cache/artifacts/engine/tizen-arm/6.5.

c# hostapp ran the Vulkan renderer app normally.
However, c++ hostapp displayed the error message below. Do you know the cause?

E/STDERR_pkgmgr-server( 8385): [EXEC_CHECKER_PLUGIN_PARSER][ERROR] Not found library (	libflutter_tizen_common_experimental.so)
E/STDERR  ( 8112): /opt/usr/globalapps/com.example.test_cpp_6/bin/runner: error while loading shared libraries: libflutter_tizen_common_experimental.so: cannot open shared object file: No such file or directory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I can't reproduce this issue:
below are my steps:

 2025  cp ../embedder/src/out/tizen_arm_6.5/libflutter_tizen_common_experimental.so ../flutter-tizen/flutter/bin/cache/artifacts/engine/tizen-arm/6.5/libflutter_tizen_common.so
 2026  sync
 2027  ../flutter-tizen/bin/flutter-tizen clean
 2028  ../flutter-tizen/bin/flutter-tizen run  --enable-impeller

and logs:

guanxw@samsung10022:~/flutter-tizen-3.35.3/sample$ ../flutter-tizen/bin/flutter-tizen run  --enable-impeller
Launching tizen/flutter/generated_main.dart on Tizen rpi4 in debug mode...
The partner profile is used for signing.
Building a Tizen application in debug mode...                      24.3s
✓ Built build/tizen/tpk/com.example.sample-1.0.0.tpk (30.1MB)
Installing build/tizen/tpk/com.example.sample-1.0.0.tpk...         19.4s
[E] [WARNING:flutter/impeller/renderer/backend/vulkan/driver_info_vk.cc(263)] Unknown GPU Driver Vendor: 5348. This is not an error.
[IMPORTANT:flutter/shell/platform/embedder/embedder_surface_vulkan_impeller.cc(80)] Using the Impeller rendering backend (Vulkan).
Syncing files to device Tizen rpi4...                               57ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Tizen rpi4 is available at: http://127.0.0.1:43323/LoQ0Sh-iQZs=/
The Flutter DevTools debugger and profiler on Tizen rpi4 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:43323/LoQ0Sh-iQZs=/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the confirmation, but just looking at your logs I can't tell if it's a C# app or a C++ app.
I tried setting up RPI5+ aarch64 environment again and it still fails with c++ host app (--tizen-language=cpp).
(In the log it shows as rpi4 due to the fusing script.)

E/STDERR_pkgmgr-server( 5433): [EXEC_CHECKER_PLUGIN_PARSER][ERROR] Not found library (	libflutter_tizen_common_experimental.so)
E/STDERR  ( 5281): /opt/usr/globalapps/com.example.test_cpp_6/bin/runner: error while loading shared libraries: libflutter_tizen_common_experimental.so: cannot open shared object file: No such file or directory

I don't want to delay progress on this PR any longer. Since you have separated the feature into experimental so, it won't affect existing behavior.
Therefore, I think it's okay to continue monitoring this PR after it's merged.
So.. It needs to be synchronized with the Interop.cs of flutter-tizen. Please also prepare the flutter-tizen patch.
(The flag to use experimental.so can be prepared as a separate PR.)

If your C++ host app tests ok, please merge this patch.


Below is the log of my test.

Changed libflutter_tizen_common to libflutter_tizen_common_experimental.so

~/dev/os/f-project/flutter-tizen/flutter/bin/cache/artifacts/engine/tizen-arm64/6.5 ((HEAD detached at FETCH_HEAD)) 14:59:33 $ cp libflutter_tizen_common_experimental.so ./libflutter_tizen_common.so

C++ host app test

$ flutter-tizen create test_cpp_7 --tizen-language=cpp
Creating project test_cpp_7...
Resolving dependencies in `test_cpp_7`...
Downloading packages...
Got dependencies in `test_cpp_7`.
Wrote 137 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd test_cpp_7
  $ flutter run

Your application code is in test_cpp_7/lib/main.dart.

~/dev/os/f-project/dev 15:11:05 $ cd test_cpp_7/
~/dev/os/f-project/dev/test_cpp_7 15:11:10 $ vi tizen/tizen-manifest.xml            //modify api-version 6.0 to 6.5
~/dev/os/f-project/dev/test_cpp_7 15:11:32 $ flutter-tizen run --enable-impeller
Connected devices:
Linux (desktop)     • linux            • linux-x64      • Ubuntu 22.04.5 LTS 6.8.0-87-generic
Chrome (web)        • chrome           • web-javascript • Google Chrome 142.0.7444.59
Tizen rpi4 (mobile) • d633f6d91e953c01 • flutter-tester • Tizen 10.0
[1]: Linux (linux)
[2]: Chrome (chrome)
[3]: Tizen rpi4 (d633f6d91e953c01)
Please choose one (or "q" to quit): 3
Launching tizen/flutter/generated_main.dart on Tizen rpi4 in debug mode...
The platform profile is used for signing.
Building a Tizen application in debug mode...                          ⡿
   17.4s
✓ Built build/tizen/tpk/com.example.test_cpp_7-1.0.0.tpk (31.3MB)
Installing build/tizen/tpk/com.example.test_cpp_7-1.0.0.tpk...         7.9s

dlogutil STDERR
E/STDERR  (17113): /opt/usr/globalapps/com.example.test_cpp_7/bin/runner: error while loading shared libraries: libflutter_tizen_common_experimental.so: cannot open shared object file: No such file or directory

C# host app test

$ flutter-tizen create test_27
Creating project test_27...
Resolving dependencies in `test_27`...
Downloading packages...
Got dependencies in `test_27`.
Wrote 135 files.

All done!
You can find general documentation for Flutter at: https://docs.flutter.dev/
Detailed API documentation is available at: https://api.flutter.dev/
If you prefer video documentation, consider: https://www.youtube.com/c/flutterdev

In order to run your application, type:

  $ cd test_27
  $ flutter run

Your application code is in test_27/lib/main.dart.

~/dev/os/f-project/dev 15:15:02 $ cd test_27/
~/dev/os/f-project/dev/test_27 15:15:05 $ vi tizen/tizen-manifest.xml                  //modify api-version 6.0 to 6.5
$ flutter-tizen run --enable-impeller
Connected devices:
Linux (desktop)     • linux            • linux-x64      • Ubuntu 22.04.5 LTS 6.8.0-87-generic
Chrome (web)        • chrome           • web-javascript • Google Chrome 142.0.7444.59
Tizen rpi4 (mobile) • d633f6d91e953c01 • flutter-tester • Tizen 10.0
[1]: Linux (linux)
[2]: Chrome (chrome)
[3]: Tizen rpi4 (d633f6d91e953c01)
Please choose one (or "q" to quit): 3
Launching tizen/flutter/generated_main.dart on Tizen rpi4 in debug mode...
Building a Tizen application in debug mode...                          ⣿
The platform profile is used for signing.
Building a Tizen application in debug mode...                      13.9s
✓ Built build/tizen/tpk/com.example.test_27-1.0.0.tpk (31.4MB)
Installing build/tizen/tpk/com.example.test_27-1.0.0.tpk...         9.8s
[E] flutter_tizen_engine.cc: SetView(299) > renderer_type : 0
[E] [IMPORTANT:flutter/shell/platform/embedder/embedder_surface_gl_impeller.cc(99)] Using the Impeller rendering backend (OpenGL).
Syncing files to device Tizen rpi4...                               58ms

Flutter run key commands.
r Hot reload. 🔥🔥🔥
R Hot restart.
h List all available interactive commands.
d Detach (terminate "flutter run" but leave application running).
c Clear the screen
q Quit (terminate the application on the device).

A Dart VM Service on Tizen rpi4 is available at: http://127.0.0.1:45779/S7ddlTj023c=/
The Flutter DevTools debugger and profiler on Tizen rpi4 is available at: http://127.0.0.1:9105?uri=http://127.0.0.1:45779/S7ddlTj023c=/


embedder("flutter_tizen_source") {
target_type = "source_set"

Expand Down Expand Up @@ -257,8 +284,11 @@ copy("publish_headers_tizen") {
group("flutter_tizen") {
deps = [
":flutter_tizen_common",
":flutter_tizen_common_experimental",
":flutter_tizen_mobile",
":flutter_tizen_mobile_experimental",
":flutter_tizen_tv",
":flutter_tizen_tv_experimental",
":publish_cpp_client_wrapper",
":publish_headers_tizen",
]
Expand Down
3 changes: 2 additions & 1 deletion flutter/shell/platform/tizen/flutter_tizen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromNewWindow(
window_geometry, window_properties.transparent,
window_properties.focusable, window_properties.top_level,
window_properties.pointing_device_support,
window_properties.floating_menu_support, window_properties.window_handle);
window_properties.floating_menu_support, window_properties.window_handle,
window_properties.renderer_type == kEVulkan);

auto view = std::make_unique<flutter::FlutterTizenView>(
flutter::kImplicitViewId, std::move(window),
Expand Down
10 changes: 10 additions & 0 deletions flutter/shell/platform/tizen/flutter_tizen_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
#include "flutter/shell/platform/tizen/tizen_input_method_context.h"
#include "flutter/shell/platform/tizen/tizen_renderer_egl.h"

#ifdef FLUTTER_TIZEN_EXPERIMENTAL
#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"
Expand Down Expand Up @@ -95,6 +99,12 @@ std::unique_ptr<TizenRenderer> FlutterTizenEngine::CreateRenderer(
#endif
return std::make_unique<TizenRendererEgl>(
view_->tizen_view(), project_->HasArgument("--enable-impeller"));
case FlutterDesktopRendererType::kEVulkan:
#ifdef FLUTTER_TIZEN_EXPERIMENTAL
return std::make_unique<TizenRendererVulkan>(view_->tizen_view());
#else
return nullptr;
#endif
}
}

Expand Down
2 changes: 2 additions & 0 deletions flutter/shell/platform/tizen/public/flutter_tizen.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ typedef struct FlutterDesktopView* FlutterDesktopViewRef;
typedef enum {
// The renderer based on EGL.
kEGL,
// The renderer based on Vulkan.
kEVulkan
} FlutterDesktopRendererType;

typedef enum {
Expand Down
Loading