Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use builder pattern#124

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
csnewman merged 3 commits intomasterfrombuilder
Feb 10, 2020
Merged

Use builder pattern#124

csnewman merged 3 commits intomasterfrombuilder
Feb 10, 2020

Conversation

csnewman
Copy link
Member

An initial step towards supporting more configuration options.

In the future,handler will be broken down inopengl handler or something of the likes, allowing the engine to be constructed withwith_gl_backend(),with_software_backend() etc.

It also then allows for optional features to be added in the future, such aswith_semantics_handler, orwith_persistent_cache.

Currently,FlutterEngine::new is going to get bloated, one solution is some sort ofFlutterConfig struct for data that doesn't change, then allowingengine.config().assets()

@dvc94ch
Copy link
Member

good idea would be to remove the start-engine entirely and instead take a callback for initializing plugins after engine start. On Android the engine should start/stop on Resume/Paused

@csnewman
Copy link
MemberAuthor

@dvc94ch I have split the engine start and initialisation. However, plugins should be initialised before starting the engine, as there is a possible race condition where flutter sends a message before the corresponding channel has been registered.

@dvc94ch
Copy link
Member

I'm refering to for example sending the locale. Are we talking about the same thing?

@csnewman
Copy link
MemberAuthor

Not sure the relevance of locale sending? These changes only move arguments, what happens with plugins etc is unchanged?

@dvc94ch
Copy link
Member

I'm saying it should be changed, but doesn't necessarily have to be in this PR. So the builder should take awith_after_start<T, F: Fn(engine) -> T>(f: F) -> T, so that we can restart the engine. Currently we havestart_engine andrun, instead we should have just run.

@csnewman
Copy link
MemberAuthor

I feel like engine restarting etc isn't something that should be built intoengine-rs as it's rather use case specific. Also, it makes handling of textures, plugin states etc a big mess.

I can't imagine engine restarting is needed anywhere? (On mobile, there are the plugins for suspending and resuming the app?)

dvc94ch reacted with thumbs up emoji

@dvc94ch
Copy link
Member

Nice, hadn't noticed the lifecycle plugin :)

@dvc94ch
Copy link
Member

can you fix the clippy issues?

@csnewmancsnewman merged commit136bb16 intomasterFeb 10, 2020
@csnewmancsnewman deleted the builder branchFebruary 10, 2020 19:56
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dvc94chdvc94chdvc94ch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@csnewman@dvc94ch

[8]ページ先頭

©2009-2025 Movatter.jp