Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate builds for profiles #67

Merged

Conversation

swift-kim
Copy link
Member

@swift-kim swift-kim commented Apr 19, 2021

  • Re-write the build script for Tizen (tizen/BUILD.gn)
    • Learn GN first if you want to fully understand the script - it's not that difficult!
    • Generates 4 outputs:
      • libflutter_tizen_mobile.so (Ecore Wl2)
      • libflutter_tizen_wearable.so (Evas GL)
      • libflutter_tizen_tv.so (Ecore Wl2)
      • libflutter_tizen_common.so (Ecore Wl2)
  • Use __dlog_print() only on TV and use dlog_print() on other profiles
  • Cherry-pick "Enable Evas GL direct mode (Enable Evas GL direct mode #54)" (+ build fix)
  • Unsupport the ecore_wl renderer (no more separate build for Tizen 4.0 because Evas GL supports Tizen 4.0)
  • Update azure-pipelines.yml accordingly

This change requires https://github.com/flutter-tizen/tizen_tools/pull/9.

Contributes to flutter-tizen/flutter-tizen#86 and flutter-tizen/flutter-tizen#21.

More testing, improvements, and clean-ups are needed (I tested only on a few devices).

shell/common/animator.cc Outdated Show resolved Hide resolved
shell/platform/tizen/tizen_renderer_evas_gl.cc Outdated Show resolved Hide resolved
@swift-kim swift-kim marked this pull request as ready for review April 22, 2021 03:39
@swift-kim swift-kim requested a review from a team April 22, 2021 05:28
@swift-kim
Copy link
Member Author

I tested on

  • Tizen 4.0 wearable emulator
  • Tizen 5.5 wearable emulator
  • Tizen 6.0 mobile emulator
  • Tizen 6.0 TV emulator
  • Tizen 5.5 watch
  • Tizen 6.0 watch
  • Tizen 6.0 rpi4 (arm64)

jsonexample and gallery worked fine on every device. (I didn't measure performance but there was no obvious regression.) Currently the video_player plugin doesn't work properly in Evas GL mode (watch) - this will be addressed later.

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

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

Generally, LGTM
However, I would like other reviewers to review Evas GL related things (loop, render and etc), because there were no reviewers other than those who participated in the PoC at that time

shell/platform/tizen/tizen_renderer_evas_gl.h Outdated Show resolved Hide resolved
shell/platform/tizen/tizen_event_loop.h Outdated Show resolved Hide resolved
@swift-kim
Copy link
Member Author

Resolved a conflict with #69.

Comment on lines +107 to +110
for (const auto& task : expired_tasks_) {
on_task_expired_(&task);
}
expired_tasks_.clear();

Choose a reason for hiding this comment

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

Shouldn't we lock expired_tasks_mutex_ here?

Copy link

Choose a reason for hiding this comment

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

I designed to lock the mutex in the caller of OnTaskExpired if necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

@bbrto21 Apparently the caller (ExcuteTaskEvents) of OnTaskExpired doesn't hold the lock and the TizenRenderEventLoop::OnTaskExpired() implementation uses the lock. I'm not still sure what you intended.

Copy link

Choose a reason for hiding this comment

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

@swift-kim Well, now that I've reviewed it again.... I think that it looks good to lock the mutex here too. It's been so long since I implemented this part, so I can't remember exactly what I was thinking then. 😁 😁 😁

Copy link

@bbrto21 bbrto21 left a comment

Choose a reason for hiding this comment

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

LGTM

@bbrto21 bbrto21 merged commit 52704ae into flutter-tizen:flutter-2.0.1-tizen Apr 27, 2021
}

shared_library("flutter_tizen_${target_name}") {

Choose a reason for hiding this comment

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

I've found something confusing (at least for gn novice): the value of target_name within the body of shared_library, i.e. between lines 85 and 164, is changed from mobile/werable/tv/common to flutter_tizen_mobile/flutter_tizen_werable/flutter_tizen_tv/flutter_tizen_common respectively.

I'm not sure, if it's an issue, but it causes "undefined reference" errors when using code similar to the one from the diff from this comment #65 (comment) to extend libs, i.e.:

+    if (target_name == "mobile") { # should be target_name == "flutter_tizen_mobile"
+      libs += [ "cbhm" ]
+    }

I've printed the target_name values before, within and after shared_library() call (using this code: pwasowski2@0a41130) and here's what gn uses as target_names:

target_name before 'shared_library()': mobile
target_name in 'shared_library()': flutter_tizen_mobile
target_name == "mobile" is FALSE
target_name == "flutter_tizen_mobile" is TRUE
target_name after 'shared_library()': mobile
...

@swift-kim, is this change of target_name value desired?

Copy link
Member Author

Choose a reason for hiding this comment

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

@pwasowski2 You're right. My comment was misleading because I didn't test the change suggested in the comment.

You can either:

  • Use invoker.target_name (instead of target_name) inside shared_library()
  • Define a new variable (e.g. profile = target_name) outside shared_library() and use that inside shared_library()

Actually there is a caveat about this in the GN documentation: https://gn.googlesource.com/gn/+/master/docs/reference.md#var_target_name

Choose a reason for hiding this comment

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

Thanks for the explanation :)

swift-kim added a commit that referenced this pull request Jun 7, 2021
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

- Cherry-pick the commit from flutter-2.0.1-tizen-dev
- Rename FLUTTER_TIZEN_EVASGL with TIZEN_RENDERER_EVAS_GL
- Add missing switches and fix build errors

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Sep 27, 2021
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

- Cherry-pick the commit from flutter-2.0.1-tizen-dev
- Rename FLUTTER_TIZEN_EVASGL with TIZEN_RENDERER_EVAS_GL
- Add missing switches and fix build errors

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Nov 14, 2021
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

- Cherry-pick the commit from flutter-2.0.1-tizen-dev
- Rename FLUTTER_TIZEN_EVASGL with TIZEN_RENDERER_EVAS_GL
- Add missing switches and fix build errors

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Dec 9, 2021
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

- Cherry-pick the commit from flutter-2.0.1-tizen-dev
- Rename FLUTTER_TIZEN_EVASGL with TIZEN_RENDERER_EVAS_GL
- Add missing switches and fix build errors

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Dec 17, 2021
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Feb 7, 2022
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Feb 11, 2022
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request May 12, 2022
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim added a commit that referenced this pull request Aug 5, 2022
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@samsung.com>
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
swift-kim added a commit that referenced this pull request Sep 1, 2022
* Separate binaries

* Clean up the build script

* Use templates

* Use __dlog_print() only on TV

* Copy headers and icudata

* Partially update azure-pipelines.yml

* Temporarily unsupport Tizen 4.0 and use only ecore_wl2

* Cherry-pick "Enable Evas GL direct mode (#54)"

* Fix CI build

* Disable Evas GL direct mode and remove use of elm_win_aux_hint_add

* Simplify the CI job

* A workaround for isIME in Evas GL mode

* Refactor: Clean up tizen_renderer.h and re-order functions

* Refactor: Rename GetEcoreWindowId and change its return type to uintptr_t

* Refactor: Make GetImageHandle() Evas GL-only

* Refactor: Additional clean ups

* Initialize members properly

* Get window id from evas_window_

* Re-format code

Co-authored-by: Boram Bae <boram21.bae@samsung.com>
Co-authored-by: MuHong Byun <mh.byun@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.

4 participants