Skip to content

Conversation

@JSUYA
Copy link
Member

@JSUYA JSUYA commented Aug 16, 2022

This is a View Class that supports NUI UIFW that inherits TizenView.
NUI is a UIFW based on the C# language that wrapping Dali UIFW.

The mouse and the keyboard event callback handling for NUI is handled in embedding(C#).
The embedder handles events related to event delivery and rendering.
Basically draw a flutter on a NativeImageQueue created from embedding.
This corresponds to tbm_surface_queue_h and is rendered flutter view using egl.
(When taking tbm_surface_queue_h from NativeImageQueue, typeid() is used inside dali,
so -rtti flag is absolutely necessary.)

@JSUYA JSUYA marked this pull request as draft August 16, 2022 05:56
@JSUYA JSUYA force-pushed the dev/tizenviewnui branch 3 times, most recently from 5bbdf4a to 103c2d7 Compare August 16, 2022 09:18
@JSUYA JSUYA changed the title (draft)Introduce TizenViewNui Introduce TizenViewNui Aug 16, 2022
@JSUYA JSUYA force-pushed the dev/tizenviewnui branch from 103c2d7 to d53c128 Compare August 18, 2022 01:43
Comment on lines 94 to 95
configs -= [ "//build/config/compiler:no_rtti" ]
configs += [ "//build/config/compiler:rtti" ]
Copy link
Member Author

Choose a reason for hiding this comment

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

enable_nui_support variable information set in shell/platform/tizen/BUILD.gn cannot be imported into this context.
If you know how to pass nui support info to this file and the gn file of accessibility, please let me know.

@JSUYA
Copy link
Member Author

JSUYA commented Aug 19, 2022

Hi @swift-kim I think the PR is roughly ready. Please review this pr.

+)

Since dali is a package compiled with rtti, the no_rtti config must be removed.
I wanted to remove the code that excludes no_rtti from shell/platform/common/BUILD.gn and third_party/accessibility/ax/BUILD.gn but couldn't find a way.

If we remove the code that exclude the no_rtti

obj/flutter/shell/platform/tizen/libflutter_tizen_mobile_nui.flutter_platform_node_delegate_tizen.o:(.data.rel.ro._ZTIN7flutter32FlutterPlatformNodeDelegateTizenE+0x8): undefined reference to `typeinfo for flutter::FlutterPlatformNodeDelegate'
obj/flutter/shell/platform/tizen/libflutter_tizen_mobile_nui.flutter_platform_node_delegate_tizen.o:(.data.rel.ro._ZTIN7flutter34FlutterPlatformWindowDelegateTizenE+0x8): undefined reference to `typeinfo for ui::AXPlatformNodeDelegateBase'
obj/flutter/shell/platform/tizen/libflutter_tizen_mobile_nui.flutter_platform_node_delegate_tizen.o:(.data.rel.ro._ZTIN7flutter31FlutterPlatformAppDelegateTizenE+0x8): undefined reference to `typeinfo for ui::AXPlatformNodeDelegateBase'

This link error occurs.

Since we don't use dynamic_cast or typeid, I thought we could solve this problem.
and I thought there was a problem with the implementation of flutter_platform_node_delegate_tizen.h and the FlutterPlatformNodeDelegateTizen class defined in the header.
(Probably not implementing parent's virtual function enough)
I've been looking for unimplemented method in this class, but haven't found any particular problems.
(@bbrto21 also said that he did research similar to mine to minimize rtti option changes, but couldn't find a way.)

For now, I think it's okay to leave the build config removing no_rtti as it is, unless it's a problem.(it may have a slight impact on the size or performance of the result.)

If you have any good workarounds or ideas, please share me.

@JSUYA JSUYA marked this pull request as ready for review August 19, 2022 04:30
public_configs =
[ "//flutter/third_party/accessibility:accessibility_config" ]

configs -= [ "//build/config/compiler:no_rtti" ]
Copy link
Member

Choose a reason for hiding this comment

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

I couldn't find a way to skip this part either. Actually I don't understand why the "undefined reference" error occurs for accessibility-related classes only.

Comment on lines +206 to +210
FLUTTER_EXPORT void FlutterDesktopViewOnPointerEvent(
FlutterDesktopViewRef view,
FlutterDesktopPointerEventType type,
double x,
double y,
size_t timestamp,
int32_t device_id);
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't NUI support scroll events?

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't checked dali's scroll event yet.
I want to work on this in another PR if you are ok.

#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali/devel-api/adaptor-framework/event-thread-callback.h>
#include <dali/devel-api/adaptor-framework/native-image-source-queue.h>
#include <dali/devel-api/common/stage.h>
Copy link
Member

Choose a reason for hiding this comment

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

Does devel-api mean that the APIs are not finalized and subject to change in the future?

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I know the devel-api is for inhouse app developers. it didn't ACR.
The APIs we use are open as DALI_ADAPTOR_API.

subject to change in the future?

It could change, but I think it's unlikely.

Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

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

Many thanks!

JSUYA and others added 13 commits August 30, 2022 15:12
This is a View Class that supports NUI UIFW that inherits TizenView.
NUI is a UIFW based on the C# language that wrapping Dali UIFW.
The mouse and the keyboard event callback handling for NUI is handled in embedding(C#).
The embedder handles events related to event delivery and rendering.
Basically draw a flutter on a NativeImageQueue created from embedding.
This corresponds to tbm_surface_queue_h and is rendered flutter view using egl.
(When taking tbm_surface_queue_h from NativeImageQueue, typeid() is used inside dali,
so -rtti flag is absolutely necessary.)
Currently, when I resize FlutterView, there is a problem
that render sync does not match.
The last updated flutterview is not drawn to the target.
onMakeCurrent and onPresent are called every frame update.
Because onPresent is called later than onMakeCurrent,
it can temporarily solve the current problem.
@JSUYA JSUYA force-pushed the dev/tizenviewnui branch from 69d4618 to 7bfd4ea Compare August 30, 2022 07:49
@JSUYA JSUYA merged commit e75d0ec into flutter-tizen:flutter-3.0.5-tizen Aug 31, 2022
swift-kim added a commit that referenced this pull request Sep 1, 2022
This is a View Class that supports NUI UIFW that inherits TizenView.
NUI is a UIFW based on the C# language that wrapping Dali UIFW.
The mouse and the keyboard event callback handling for NUI is handled in embedding(C#).
The embedder handles events related to event delivery and rendering.
Basically draw a flutter on a NativeImageQueue created from embedding.
This corresponds to tbm_surface_queue_h and is rendered flutter view using egl.
(When taking tbm_surface_queue_h from NativeImageQueue, typeid() is used inside dali,
so -rtti flag is absolutely necessary.)

Co-authored-by: Swift Kim <swift.kim@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants