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

[impeller] Wire up the OpenGL ES Backend. #33405

Merged
merged 1 commit into from May 17, 2022

Conversation

chinmaygarde
Copy link
Member

@chinmaygarde chinmaygarde commented May 16, 2022

This is still work in progress but basic rendering is functional. There are issues around context access from multiple threads that I am going to address in a subsequent patch. This also brings in the binary cost overhead of using Impeller on Android.
screen

std::optional<bool> DetermineIfES(const std::string& version) {
if (HasPrefix(version, "OpenGL ES")) {
return true;
} else if (HasPrefix(version, "OpenGL")) {
Copy link
Member

Choose a reason for hiding this comment

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

This case looks redundant with the else {} case.

Copy link
Member Author

Choose a reason for hiding this comment

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

So, I am not actually sure if the OpenGL prefix is required. I seemed to think it was. But the Mac desktop implementation does not seem to have it. The else below this was supposed to be std::nullopt. Notice how the bool is optional but a value is always returned. I am going to assume the Mac desktop behavior is correct and return a non-optional for now.

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.

}
}

static std::optional<Version> DetermineVersion(std::string version) {
Copy link
Member

Choose a reason for hiding this comment

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

Can this have some unit tests? String parsing without unit tests makes me very nervous.

Copy link
Contributor

Choose a reason for hiding this comment

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

(seconded)

Copy link
Member Author

Choose a reason for hiding this comment

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

Adding this in a followup patch along with other fixes.

@chinmaygarde chinmaygarde force-pushed the android_impeller branch 2 times, most recently from d8ab012 to 4c77bb9 Compare May 17, 2022 00:48
"gpu_surface_gl_skia.cc",
"gpu_surface_gl_skia.h",
Copy link
Contributor

Choose a reason for hiding this comment

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

not a problem but will require compensating changes for the roll.

Copy link
Contributor

@dnfield dnfield left a comment

Choose a reason for hiding this comment

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

I didn't give this whole patch a close look, but from what I've spot checked it looks good enough to land for experimentation.

@zanderso
Copy link
Member

https://flutter-review.googlesource.com/c/recipes/+/30204 will be needed to clear up the "Linux clang-tidy" presubmit.

@zanderso
Copy link
Member

@jonahwilliams for advice on 'fractional' build failure. Maybe just needs a rebase?

@jonahwilliams
Copy link
Member

You might just need 9867003

@chinmaygarde chinmaygarde merged commit 01a129b into flutter:main May 17, 2022
@chinmaygarde chinmaygarde deleted the android_impeller branch May 17, 2022 20:16
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 17, 2022
CaseyHillers added a commit that referenced this pull request May 19, 2022
houhuayong pushed a commit to houhuayong/engine that referenced this pull request Jun 21, 2022
pbo-linaro pushed a commit to pbo-linaro/flutter-recipes that referenced this pull request Nov 24, 2022
For flutter/engine#33405

led run: https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/zra_google.com/42f90b28a0d3e5058eaf5d82962f3a876a0631d843452ba011dbe1c0cb9d4ce6/+/build.proto?server=chromium-swarm.appspot.com

Change-Id: Ied1019884e4687d1c15448fb700f3d5d1a42d58c
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/30204
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Godofredo Contreras <godofredoc@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants