diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 4201f02c..170c10b5 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -138,18 +138,19 @@ config("system_cxx") { } include_dirs = [] - if (api_version == "10.0") { - include_dirs += [ - "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include", - "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++", - "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++/${gcc_target_triple}", - ] - } else { + if (api_version == "6.0" || api_version == "6.5" || api_version == "7.0" || + api_version == "8.0" || api_version == "9.0") { include_dirs += [ "${lib_path}/gcc/${gcc_target_triple}/9.2.0/include", "${lib_path}/gcc/${gcc_target_triple}/9.2.0/include/c++", "${lib_path}/gcc/${gcc_target_triple}/9.2.0/include/c++/${gcc_target_triple}", ] + } else { + include_dirs += [ + "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include", + "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++", + "${lib_path}/gcc/${gcc_target_triple}/14.2.0/include/c++/${gcc_target_triple}", + ] } libs = [ "stdc++" ] diff --git a/flutter/shell/platform/tizen/BUILD.gn b/flutter/shell/platform/tizen/BUILD.gn index 3d9dfd0b..7e056285 100644 --- a/flutter/shell/platform/tizen/BUILD.gn +++ b/flutter/shell/platform/tizen/BUILD.gn @@ -140,6 +140,24 @@ template("embedder") { ] } + # Convert version string "6.0", "6.5", etc. to integer 60, 65, etc. + api_version_numeric = 60 + if (api_version == "6.5") { + api_version_numeric = 65 + } else if (api_version == "7.0") { + api_version_numeric = 70 + } else if (api_version == "8.0") { + api_version_numeric = 80 + } else if (api_version == "9.0") { + api_version_numeric = 90 + } else if (api_version == "10.0") { + api_version_numeric = 100 + } else if (api_version == "11.0") { + api_version_numeric = 110 + } + + defines += [ "TIZEN_API_VERSION_NUM=$api_version_numeric" ] + defines += invoker.defines defines += [ "FLUTTER_ENGINE_NO_PROTOTYPES" ] diff --git a/flutter/shell/platform/tizen/flutter_tizen_nui.cc b/flutter/shell/platform/tizen/flutter_tizen_nui.cc index 32787e08..c975849d 100644 --- a/flutter/shell/platform/tizen/flutter_tizen_nui.cc +++ b/flutter/shell/platform/tizen/flutter_tizen_nui.cc @@ -5,7 +5,11 @@ #include "public/flutter_tizen.h" #include +#if TIZEN_API_VERSION_NUM >= 110 +#include +#else #include +#endif #include @@ -36,7 +40,11 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView( std::make_unique( view_properties.width, view_properties.height, reinterpret_cast(image_view), +#if TIZEN_API_VERSION_NUM >= 110 + reinterpret_cast(native_image_queue), +#else reinterpret_cast(native_image_queue), +#endif default_window_id); auto view = std::make_unique( diff --git a/flutter/shell/platform/tizen/tizen_renderer_egl.cc b/flutter/shell/platform/tizen/tizen_renderer_egl.cc index 258ddd09..d528fa86 100644 --- a/flutter/shell/platform/tizen/tizen_renderer_egl.cc +++ b/flutter/shell/platform/tizen/tizen_renderer_egl.cc @@ -9,8 +9,12 @@ #include #include #ifdef NUI_SUPPORT +#if TIZEN_API_VERSION_NUM >= 110 +#include +#else #include #endif +#endif #include #include #include @@ -94,22 +98,29 @@ bool TizenRendererEgl::CreateSurface(void* render_target, const EGLint attribs[] = {EGL_NONE}; if (render_target_display) { - auto* egl_window = - static_cast(ecore_wl2_egl_window_native_get( - static_cast(render_target))); - egl_surface_ = eglCreateWindowSurface(egl_display_, egl_config_, - egl_window, attribs); + const auto egl_window = ecore_wl2_egl_window_native_get( + static_cast(render_target)); + egl_surface_ = eglCreateWindowSurface( + egl_display_, egl_config_, + reinterpret_cast(egl_window), attribs); } else { #ifdef NUI_SUPPORT +#if TIZEN_API_VERSION_NUM >= 110 + Dali::NativeImageQueuePtr dali_native_image_queue = + static_cast(render_target); + tbm_surface_queue_h tbm_surface_queue_ = + Dali::AnyCast( + dali_native_image_queue->GetNativeImageQueue()); +#else Dali::NativeImageSourceQueuePtr dali_native_image_queue = static_cast(render_target); tbm_surface_queue_h tbm_surface_queue_ = Dali::AnyCast( dali_native_image_queue->GetNativeImageSourceQueue()); - auto* egl_window = - reinterpret_cast(tbm_surface_queue_); - egl_surface_ = eglCreateWindowSurface(egl_display_, egl_config_, - egl_window, attribs); +#endif + egl_surface_ = eglCreateWindowSurface( + egl_display_, egl_config_, + reinterpret_cast(tbm_surface_queue_), attribs); #endif } diff --git a/flutter/shell/platform/tizen/tizen_view_nui.cc b/flutter/shell/platform/tizen/tizen_view_nui.cc index f3b93477..fe880180 100644 --- a/flutter/shell/platform/tizen/tizen_view_nui.cc +++ b/flutter/shell/platform/tizen/tizen_view_nui.cc @@ -16,7 +16,11 @@ namespace flutter { TizenViewNui::TizenViewNui(int32_t width, int32_t height, Dali::Toolkit::ImageView* image_view, +#if TIZEN_API_VERSION_NUM >= 110 + Dali::NativeImageQueuePtr native_image_queue, +#else Dali::NativeImageSourceQueuePtr native_image_queue, +#endif int32_t default_window_id) : TizenView(width, height), image_view_(image_view), diff --git a/flutter/shell/platform/tizen/tizen_view_nui.h b/flutter/shell/platform/tizen/tizen_view_nui.h index 8efc9606..cbd0c468 100644 --- a/flutter/shell/platform/tizen/tizen_view_nui.h +++ b/flutter/shell/platform/tizen/tizen_view_nui.h @@ -7,7 +7,11 @@ #include #include +#if TIZEN_API_VERSION_NUM >= 110 +#include +#else #include +#endif #include #include @@ -21,7 +25,11 @@ class TizenViewNui : public TizenView { TizenViewNui(int32_t width, int32_t height, Dali::Toolkit::ImageView* image_view, +#if TIZEN_API_VERSION_NUM >= 110 + Dali::NativeImageQueuePtr native_image_queue, +#else Dali::NativeImageSourceQueuePtr native_image_queue, +#endif int32_t default_window_id); ~TizenViewNui(); @@ -67,7 +75,11 @@ class TizenViewNui : public TizenView { void RenderOnce(); Dali::Toolkit::ImageView* image_view_ = nullptr; +#if TIZEN_API_VERSION_NUM >= 110 + Dali::NativeImageQueuePtr native_image_queue_; +#else Dali::NativeImageSourceQueuePtr native_image_queue_; +#endif int32_t default_window_id_; std::unique_ptr rendering_callback_; }; diff --git a/tools/generate_sysroot.py b/tools/generate_sysroot.py index d160a266..2d66def1 100755 --- a/tools/generate_sysroot.py +++ b/tools/generate_sysroot.py @@ -105,6 +105,11 @@ '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' @@ -122,7 +127,7 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): else: sys.exit('Unknown arch: ' + arch) - if api_version >= 10.0: + if api_version >= 11.0: base_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Base/reference/repos/standard/packages' unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen/Tizen-Unified/reference/repos/{}/packages'.format( target) @@ -150,6 +155,8 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False): packages = base_packages + unified_packages if api_version >= 6.5: packages += dali_packages + if api_version >= 11.0: + packages += dali_integration_devel_packages for package in packages: quoted = urllib.parse.quote(package)