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
15 changes: 8 additions & 7 deletions build/config/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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++" ]
Expand Down
18 changes: 18 additions & 0 deletions flutter/shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

Expand Down
8 changes: 8 additions & 0 deletions flutter/shell/platform/tizen/flutter_tizen_nui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#include "public/flutter_tizen.h"

#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#if TIZEN_API_VERSION_NUM >= 110
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
#else
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
#endif

#include <memory>

Expand Down Expand Up @@ -36,7 +40,11 @@ FlutterDesktopViewRef FlutterDesktopViewCreateFromImageView(
std::make_unique<flutter::TizenViewNui>(
view_properties.width, view_properties.height,
reinterpret_cast<Dali::Toolkit::ImageView*>(image_view),
#if TIZEN_API_VERSION_NUM >= 110
reinterpret_cast<Dali::NativeImageQueue*>(native_image_queue),
#else
reinterpret_cast<Dali::NativeImageSourceQueue*>(native_image_queue),
#endif
default_window_id);

auto view = std::make_unique<flutter::FlutterTizenView>(
Expand Down
29 changes: 20 additions & 9 deletions flutter/shell/platform/tizen/tizen_renderer_egl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#ifdef NUI_SUPPORT
#if TIZEN_API_VERSION_NUM >= 110
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
#else
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
#endif
#endif
#include <tbm_dummy_display.h>
#include <tbm_surface.h>
#include <tbm_surface_queue.h>
Expand Down Expand Up @@ -94,22 +98,29 @@ bool TizenRendererEgl::CreateSurface(void* render_target,
const EGLint attribs[] = {EGL_NONE};

if (render_target_display) {
auto* egl_window =
static_cast<EGLNativeWindowType*>(ecore_wl2_egl_window_native_get(
static_cast<Ecore_Wl2_Egl_Window*>(render_target)));
egl_surface_ = eglCreateWindowSurface(egl_display_, egl_config_,
egl_window, attribs);
const auto egl_window = ecore_wl2_egl_window_native_get(
static_cast<Ecore_Wl2_Egl_Window*>(render_target));
egl_surface_ = eglCreateWindowSurface(
egl_display_, egl_config_,
reinterpret_cast<EGLNativeWindowType>(egl_window), attribs);
} else {
#ifdef NUI_SUPPORT
#if TIZEN_API_VERSION_NUM >= 110
Dali::NativeImageQueuePtr dali_native_image_queue =
static_cast<Dali::NativeImageQueue*>(render_target);
tbm_surface_queue_h tbm_surface_queue_ =
Dali::AnyCast<tbm_surface_queue_h>(
dali_native_image_queue->GetNativeImageQueue());
#else
Dali::NativeImageSourceQueuePtr dali_native_image_queue =
static_cast<Dali::NativeImageSourceQueue*>(render_target);
tbm_surface_queue_h tbm_surface_queue_ =
Dali::AnyCast<tbm_surface_queue_h>(
dali_native_image_queue->GetNativeImageSourceQueue());
auto* egl_window =
reinterpret_cast<EGLNativeWindowType*>(tbm_surface_queue_);
egl_surface_ = eglCreateWindowSurface(egl_display_, egl_config_,
egl_window, attribs);
#endif
egl_surface_ = eglCreateWindowSurface(
egl_display_, egl_config_,
reinterpret_cast<EGLNativeWindowType>(tbm_surface_queue_), attribs);
#endif
}

Expand Down
4 changes: 4 additions & 0 deletions flutter/shell/platform/tizen/tizen_view_nui.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
12 changes: 12 additions & 0 deletions flutter/shell/platform/tizen/tizen_view_nui.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
#if TIZEN_API_VERSION_NUM >= 110
#include <dali/devel-api/adaptor-framework/native-image-queue.h>
#else
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
#endif
#include <dali/devel-api/common/stage.h>

#include <memory>
Expand All @@ -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();
Expand Down Expand Up @@ -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<Dali::EventThreadCallback> rendering_callback_;
};
Expand Down
9 changes: 8 additions & 1 deletion tools/generate_sysroot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading