Skip to content

Commit 4273a17

Browse files
committed
Support Tizen 11
1 parent bbd1ea6 commit 4273a17

File tree

6 files changed

+65
-7
lines changed

6 files changed

+65
-7
lines changed

build/config/BUILD.gn

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,18 @@ config("system_cxx") {
138138
}
139139

140140
include_dirs = []
141-
if (api_version == "10.0") {
142-
include_dirs += [
143-
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include",
144-
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++",
145-
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++/${gcc_target_triple}",
146-
]
147-
} else {
141+
if (api_version == "6.0" || api_version == "6.5" || api_version == "7.0" || api_version == "8.0" || api_version == "9.0") {
148142
include_dirs += [
149143
"${lib_path}/gcc/${gcc_target_triple}/9.2.0/include",
150144
"${lib_path}/gcc/${gcc_target_triple}/9.2.0/include/c++",
151145
"${lib_path}/gcc/${gcc_target_triple}/9.2.0/include/c++/${gcc_target_triple}",
152146
]
147+
} else {
148+
include_dirs += [
149+
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include",
150+
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++",
151+
"${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++/${gcc_target_triple}",
152+
]
153153
}
154154

155155
libs = [ "stdc++" ]

flutter/shell/platform/tizen/BUILD.gn

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,28 @@ template("embedder") {
140140
]
141141
}
142142

143+
# Convert version string "6.0", "6.5", etc. to integer 60, 65, etc.
144+
api_version_numeric = 60
145+
if (api_version == "6.0") {
146+
api_version_numeric = "60"
147+
} else if (api_version == "6.5") {
148+
api_version_numeric = "65"
149+
} else if (api_version == "7.0") {
150+
api_version_numeric = "70"
151+
} else if (api_version == "8.0") {
152+
api_version_numeric = "80"
153+
} else if (api_version == "9.0") {
154+
api_version_numeric = "90"
155+
} else if (api_version == "10.0") {
156+
api_version_numeric = "100"
157+
} else if (api_version == "11.0") {
158+
api_version_numeric = "110"
159+
}
160+
161+
defines += [
162+
"TIZEN_API_VERSION_NUM=$api_version_numeric",
163+
]
164+
143165
defines += invoker.defines
144166
defines += [ "FLUTTER_ENGINE_NO_PROTOTYPES" ]
145167

flutter/shell/platform/tizen/flutter_tizen_nui.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#include "public/flutter_tizen.h"
66

77
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
8+
#if TIZEN_API_VERSION_NUM >= 110
9+
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
10+
#else
811
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
12+
#endif
913

1014
#include <memory>
1115

@@ -36,7 +40,11 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView(
3640
std::make_unique<flutter::TizenViewNui>(
3741
view_properties.width, view_properties.height,
3842
reinterpret_cast<Dali::Toolkit::ImageView*>(image_view),
43+
#if TIZEN_API_VERSION_NUM >= 110
44+
reinterpret_cast<Dali::NativeImageQueue*>(native_image_queue),
45+
#else
3946
reinterpret_cast<Dali::NativeImageSourceQueue*>(native_image_queue),
47+
#endif
4048
default_window_id);
4149

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

flutter/shell/platform/tizen/tizen_renderer_egl.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@
99
#include <GLES2/gl2.h>
1010
#include <GLES2/gl2ext.h>
1111
#ifdef NUI_SUPPORT
12+
#if TIZEN_API_VERSION_NUM >= 110
13+
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
14+
#else
1215
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
1316
#endif
17+
#endif
1418
#include <tbm_dummy_display.h>
1519
#include <tbm_surface.h>
1620
#include <tbm_surface_queue.h>
@@ -101,6 +105,13 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
101105
reinterpret_cast<EGLNativeWindowType>(egl_window), attribs);
102106
} else {
103107
#ifdef NUI_SUPPORT
108+
#if TIZEN_API_VERSION_NUM >= 110
109+
Dali::NativeImageQueuePtr dali_native_image_queue =
110+
static_cast<Dali::NativeImageQueue*>(render_target);
111+
tbm_surface_queue_h tbm_surface_queue_ =
112+
Dali::AnyCast<tbm_surface_queue_h>(
113+
dali_native_image_queue->GetNativeImageQueue());
114+
#else
104115
Dali::NativeImageSourceQueuePtr dali_native_image_queue =
105116
static_cast<Dali::NativeImageSourceQueue*>(render_target);
106117
tbm_surface_queue_h tbm_surface_queue_ =
@@ -109,6 +120,7 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
109120
egl_surface_ = eglCreateWindowSurface(
110121
egl_display_, egl_config_,
111122
reinterpret_cast<EGLNativeWindowType>(tbm_surface_queue_), attribs);
123+
#endif
112124
#endif
113125
}
114126

flutter/shell/platform/tizen/tizen_view_nui.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ namespace flutter {
1616
TizenViewNui::TizenViewNui(int32_t width,
1717
int32_t height,
1818
Dali::Toolkit::ImageView* image_view,
19+
#if TIZEN_API_VERSION_NUM >= 110
20+
Dali::NativeImageQueuePtr native_image_queue,
21+
#else
1922
Dali::NativeImageSourceQueuePtr native_image_queue,
23+
#endif
2024
int32_t default_window_id)
2125
: TizenView(width, height),
2226
image_view_(image_view),

flutter/shell/platform/tizen/tizen_view_nui.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
99
#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
10+
#if TIZEN_API_VERSION_NUM >= 110
11+
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
12+
#else
1013
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
14+
#endif
1115
#include <dali/devel-api/common/stage.h>
1216

1317
#include <memory>
@@ -21,7 +25,11 @@ class TizenViewNui : public TizenView {
2125
TizenViewNui(int32_t width,
2226
int32_t height,
2327
Dali::Toolkit::ImageView* image_view,
28+
#if TIZEN_API_VERSION_NUM >= 110
29+
Dali::NativeImageQueuePtr native_image_queue,
30+
#else
2431
Dali::NativeImageSourceQueuePtr native_image_queue,
32+
#endif
2533
int32_t default_window_id);
2634

2735
~TizenViewNui();
@@ -67,7 +75,11 @@ class TizenViewNui : public TizenView {
6775
void RenderOnce();
6876

6977
Dali::Toolkit::ImageView* image_view_ = nullptr;
78+
#if TIZEN_API_VERSION_NUM >= 110
79+
Dali::NativeImageQueuePtr native_image_queue_;
80+
#else
7081
Dali::NativeImageSourceQueuePtr native_image_queue_;
82+
#endif
7183
int32_t default_window_id_;
7284
std::unique_ptr<Dali::EventThreadCallback> rendering_callback_;
7385
};

0 commit comments

Comments
 (0)