-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Start of Dart GPU prototype #42228
Conversation
chinmaygarde
left a comment
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallow copy and assign?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
This reverts commit cbfcb77.
We moved to lib/gpu some time ago! (Initially added with flutter#42228)
We moved to lib/gpu some time ago! (Initially added with flutter#42228)
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.