Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@bdero
Copy link
Member

@bdero bdero commented May 23, 2023

I've been slowly hacking on a prototype alongside a doc (public go link imminent) for a while (the doc has been changing a lot as a result of prototyping) and I think it's time to start landing parts of this prototype/experiment in-tree.

This initial PR just sets up the main context singleton on the UI thread. After this, I'll land the shader management stuff.

I re-used the existing experimental 3D flag for this, since this is meant to replace what can be done with Impeller Scene anyway.

@bdero bdero requested a review from chinmaygarde May 23, 2023 00:30
@bdero bdero self-assigned this May 23, 2023
Copy link
Member

@chinmaygarde chinmaygarde left a comment

Choose a reason for hiding this comment

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

Exciting start!


#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
current_task_runner_ = fml::MessageLoop::GetCurrent().GetTaskRunner();
Copy link
Member

Choose a reason for hiding this comment

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

fml::MessageLoop::GetCurrent is an API only meant to be used on the embedder and we can't know if the call is made on the embedder unless you clarify. You can just define FML_USED_ON_EMBEDDER at the very top of the file and the deprecated declaration warning will go away :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, makes sense. Done.

} // namespace testing
} // namespace impeller

int main(int argc, char** argv) {
Copy link
Member

Choose a reason for hiding this comment

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

Instead of installing your own main, use run_all_unittests.cc from //flutter/testing:testing. It does all the usual setup you want :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh whoops, looks like I pulled in testing_lib instead of testing for some reason. Done.

static std::string InitializeDefault(Dart_Handle wrapper);

private:
std::shared_ptr<impeller::Context> context_;
Copy link
Member

Choose a reason for hiding this comment

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

Disallow copy and assign?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@bdero bdero force-pushed the bdero/dart-gpu branch from e1226fe to 63b7b7c Compare May 24, 2023 03:04
@bdero bdero force-pushed the bdero/dart-gpu branch from 63b7b7c to b8f70b3 Compare May 24, 2023 03:14
@bdero bdero added the autosubmit Merge PR when tree becomes green via auto submit App label May 24, 2023
@auto-submit auto-submit bot merged commit cbfcb77 into flutter:main May 24, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 24, 2023
CaseyHillers added a commit that referenced this pull request May 24, 2023
bdero added a commit to bdero/flutter-engine that referenced this pull request Mar 12, 2024
We moved to lib/gpu some time ago!
(Initially added with flutter#42228)
zijiehe-google-com pushed a commit to zijiehe-google-com/engine that referenced this pull request Mar 12, 2024
We moved to lib/gpu some time ago!
(Initially added with flutter#42228)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App e: impeller

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants