-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Split up the conical gradient fragment shader #164058
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
Conversation
|
I asked Jason to test the constants change. He reported there is linking errors still with this change. |
|
Jason was able to confirm that this works with nexus 5 now. |
| #include <impeller/texture.glsl> | ||
| #include <impeller/types.glsl> | ||
|
|
||
| layout(constant_id = 0) const float kind = 3.0; |
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.
This isn't strictly necessary to fix this issue but I did it as part of my experiments and kept it since it should make the conical shader faster.
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.
seems like a good idea!
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.
dumb question though. we support spec constants via GLSL ifdefs in GLES. If the shader doesnt' crash the parser with IFDEFS instead of separate shaders, it might be a slightly better approach as it reduces the shader count.
On the other hand, 🤷♂️ and it might still crash
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.
Yea, that was the first thing I tried. It still crashed so I had to go back and split them up into separate files =T.
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.
alas....
| LinearGradientFillFragmentShader>; | ||
| using SolidFillPipeline = | ||
| RenderPipelineHandle<SolidFillVertexShader, SolidFillFragmentShader>; | ||
| using RadialGradientFillPipeline = |
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.
I think its about time to macro up this file....
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.
Ugh yea. We might be able to get rid of a bit with macros. I'll poke around a bit in a different pr.
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.
I have a draft PR that cuts the size of this file in about half: https://github.com/flutter/flutter/blob/664ac83be9185d9b3773a46549bb40b6a71cb1c2/engine/src/flutter/impeller/entity/contents/content_context.h
We could do a bit more to clean it up but that's probably good for now.
Roll Flutter from 2e570ca to 842db35 (59 revisions) flutter/flutter@2e570ca...842db35 2025-03-02 engine-flutter-autoroll@skia.org Roll Skia from ad64415050aa to 101eee8fce59 (1 revision) (flutter/flutter#164449) 2025-03-02 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ln3joxJfRN2XGhvCv... to AO1KirSDI7-MVYNPN... (flutter/flutter#164440) 2025-03-02 chris@bracken.jp android: Clean up gen_snapshot artifact build (flutter/flutter#164418) 2025-03-02 matanlurey@users.noreply.github.com Start using `bin/cache/engine.{stamp|realm}` instead of `bin/internal/engine.{realm|version}`. (flutter/flutter#164352) 2025-03-01 chris@bracken.jp Add macos/android_debug_unopt to local_engine.json (flutter/flutter#164410) 2025-03-01 chris@bracken.jp Delete unused build archive targets (flutter/flutter#164414) 2025-03-01 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QMun2itYrV_zUYrvW... to ln3joxJfRN2XGhvCv... (flutter/flutter#164423) 2025-03-01 engine-flutter-autoroll@skia.org Roll Skia from ac14158663ea to ad64415050aa (1 revision) (flutter/flutter#164413) 2025-03-01 eric@shorebird.dev Update linux_host_engine.json ci/host_release description (flutter/flutter#164402) 2025-03-01 jason-simmons@users.noreply.github.com In update_engine_version_test.dart, do not populate the test environment with the host platform environment (flutter/flutter#164395) 2025-03-01 matanlurey@users.noreply.github.com Roll-forward #164317: Use `bin/cache/engine.stamp` (flutter/flutter#164401) 2025-02-28 ybz975218925@gmail.com Make pressing and moving on CupertinoButton closer to native behavior. (flutter/flutter#161731) 2025-02-28 engine-flutter-autoroll@skia.org Roll Skia from 4005ba3ca7b6 to ac14158663ea (7 revisions) (flutter/flutter#164404) 2025-02-28 matej.knopp@gmail.com [macOS] Prepare FlutterKeyboardManager for multi-view (flutter/flutter#163962) 2025-02-28 matej.knopp@gmail.com Add PlatformDispatcher.engineId (flutter/flutter#163476) 2025-02-28 matanlurey@users.noreply.github.com Move `integration_test.FlutterDeviceScreenshotTest` to the framework slow shard (flutter/flutter#164398) 2025-02-28 34465683+rkishan516@users.noreply.github.com Fix: Update DelegatedTransition animation parameter correctly (flutter/flutter#163853) 2025-02-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Write an identical value to `bin/cache/engine.stamp` to prepare for migration (#164317)" (flutter/flutter#164396) 2025-02-28 47989573+Hannnes1@users.noreply.github.com Add action for configuring default action of EditableText.onTapUpOutside (flutter/flutter#162575) 2025-02-28 reidbaker@google.com Align jvmTarget usages across codebase, while editing build.gradle files align them with android version documentation (flutter/flutter#164200) 2025-02-28 engine-flutter-autoroll@skia.org Roll Packages from 01d3d5c to 70b41e1 (5 revisions) (flutter/flutter#164380) 2025-02-28 51940183+Sameri11@users.noreply.github.com [tool] Allow using archiveName in android bundle build (flutter/flutter#162390) 2025-02-28 ueman@users.noreply.github.com Fix incorrectly checking for invalid environment variables in the tool (flutter/flutter#164101) 2025-02-28 robert.ancell@canonical.com Support forward and back buttons (flutter/flutter#164356) 2025-02-28 robert.ancell@canonical.com Fix window creation callback for multi-window (flutter/flutter#164353) 2025-02-28 robert.ancell@canonical.com Fix flutter doctor usage of eglinfo in failure cases. (flutter/flutter#164334) 2025-02-28 sigurdm@google.com Refactor writing of package config in tests (flutter/flutter#163734) 2025-02-28 ybz975218925@gmail.com Fixed the issue that Slider's secondaryTrackValue is not updated. (flutter/flutter#163996) 2025-02-28 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#164357) 2025-02-28 codefu@google.com Remove `Mac mac_unopt` presubmit retry count (flutter/flutter#164350) 2025-02-28 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1elkOxihZuTEiTXzY... to QMun2itYrV_zUYrvW... (flutter/flutter#164351) 2025-02-28 ybz975218925@gmail.com Drag handles only need to be tested on mobile platforms. (flutter/flutter#163723) 2025-02-28 jonahwilliams@google.com [Android] Use java for looking up Android API level. (flutter/flutter#163558) 2025-02-28 matanlurey@users.noreply.github.com Write an identical value to `bin/cache/engine.stamp` to prepare for migration (flutter/flutter#164317) 2025-02-27 47866232+chunhtai@users.noreply.github.com Wires up expanded state in web engine (flutter/flutter#164048) 2025-02-27 matanlurey@users.noreply.github.com Remove Cheserton's File (flutter/flutter#164340) 2025-02-27 robert.ancell@canonical.com Replace update semantics handler with signal. (flutter/flutter#163583) 2025-02-27 30870216+gaaclarke@users.noreply.github.com Split up the conical gradient fragment shader (flutter/flutter#164058) 2025-02-27 engine-flutter-autoroll@skia.org Roll Skia from c16b145749d4 to 4005ba3ca7b6 (3 revisions) (flutter/flutter#164339) 2025-02-27 matanlurey@users.noreply.github.com Delete and update stale documentation regarding engine/engine hash. (flutter/flutter#164324) 2025-02-27 matanlurey@users.noreply.github.com Document how `engine.version` (is/will be) computed (flutter/flutter#164335) 2025-02-27 christopherfujino@gmail.com Update conductor to write engine.version file (flutter/flutter#163350) 2025-02-27 reidbaker@google.com remove last usages of min/compile/target SdkVersion, align sourceCompatibility across repo and update android version documentation (flutter/flutter#164198) 2025-02-27 matanlurey@users.noreply.github.com Update links to the `flutter/engine` repository for the monorepo. (flutter/flutter#164328) 2025-02-27 34871572+gmackall@users.noreply.github.com Add empty `io.flutter.app.FlutterApplication` to give deprecation notice, and un-break projects that have not migrated (flutter/flutter#164233) 2025-02-27 aam@google.com Revert dart sdks that were causing dartaotruntime issues in g3 (flutter/flutter#164307) ...
cleanup followup to #164058 This is just a refactor that makes content_context.h more manageable. ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
Roll Flutter from 2e570ca to 842db35 (59 revisions) flutter/flutter@2e570ca...842db35 2025-03-02 engine-flutter-autoroll@skia.org Roll Skia from ad64415050aa to 101eee8fce59 (1 revision) (flutter/flutter#164449) 2025-03-02 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ln3joxJfRN2XGhvCv... to AO1KirSDI7-MVYNPN... (flutter/flutter#164440) 2025-03-02 chris@bracken.jp android: Clean up gen_snapshot artifact build (flutter/flutter#164418) 2025-03-02 matanlurey@users.noreply.github.com Start using `bin/cache/engine.{stamp|realm}` instead of `bin/internal/engine.{realm|version}`. (flutter/flutter#164352) 2025-03-01 chris@bracken.jp Add macos/android_debug_unopt to local_engine.json (flutter/flutter#164410) 2025-03-01 chris@bracken.jp Delete unused build archive targets (flutter/flutter#164414) 2025-03-01 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QMun2itYrV_zUYrvW... to ln3joxJfRN2XGhvCv... (flutter/flutter#164423) 2025-03-01 engine-flutter-autoroll@skia.org Roll Skia from ac14158663ea to ad64415050aa (1 revision) (flutter/flutter#164413) 2025-03-01 eric@shorebird.dev Update linux_host_engine.json ci/host_release description (flutter/flutter#164402) 2025-03-01 jason-simmons@users.noreply.github.com In update_engine_version_test.dart, do not populate the test environment with the host platform environment (flutter/flutter#164395) 2025-03-01 matanlurey@users.noreply.github.com Roll-forward #164317: Use `bin/cache/engine.stamp` (flutter/flutter#164401) 2025-02-28 ybz975218925@gmail.com Make pressing and moving on CupertinoButton closer to native behavior. (flutter/flutter#161731) 2025-02-28 engine-flutter-autoroll@skia.org Roll Skia from 4005ba3ca7b6 to ac14158663ea (7 revisions) (flutter/flutter#164404) 2025-02-28 matej.knopp@gmail.com [macOS] Prepare FlutterKeyboardManager for multi-view (flutter/flutter#163962) 2025-02-28 matej.knopp@gmail.com Add PlatformDispatcher.engineId (flutter/flutter#163476) 2025-02-28 matanlurey@users.noreply.github.com Move `integration_test.FlutterDeviceScreenshotTest` to the framework slow shard (flutter/flutter#164398) 2025-02-28 34465683+rkishan516@users.noreply.github.com Fix: Update DelegatedTransition animation parameter correctly (flutter/flutter#163853) 2025-02-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Write an identical value to `bin/cache/engine.stamp` to prepare for migration (#164317)" (flutter/flutter#164396) 2025-02-28 47989573+Hannnes1@users.noreply.github.com Add action for configuring default action of EditableText.onTapUpOutside (flutter/flutter#162575) 2025-02-28 reidbaker@google.com Align jvmTarget usages across codebase, while editing build.gradle files align them with android version documentation (flutter/flutter#164200) 2025-02-28 engine-flutter-autoroll@skia.org Roll Packages from 01d3d5c to 70b41e1 (5 revisions) (flutter/flutter#164380) 2025-02-28 51940183+Sameri11@users.noreply.github.com [tool] Allow using archiveName in android bundle build (flutter/flutter#162390) 2025-02-28 ueman@users.noreply.github.com Fix incorrectly checking for invalid environment variables in the tool (flutter/flutter#164101) 2025-02-28 robert.ancell@canonical.com Support forward and back buttons (flutter/flutter#164356) 2025-02-28 robert.ancell@canonical.com Fix window creation callback for multi-window (flutter/flutter#164353) 2025-02-28 robert.ancell@canonical.com Fix flutter doctor usage of eglinfo in failure cases. (flutter/flutter#164334) 2025-02-28 sigurdm@google.com Refactor writing of package config in tests (flutter/flutter#163734) 2025-02-28 ybz975218925@gmail.com Fixed the issue that Slider's secondaryTrackValue is not updated. (flutter/flutter#163996) 2025-02-28 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#164357) 2025-02-28 codefu@google.com Remove `Mac mac_unopt` presubmit retry count (flutter/flutter#164350) 2025-02-28 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1elkOxihZuTEiTXzY... to QMun2itYrV_zUYrvW... (flutter/flutter#164351) 2025-02-28 ybz975218925@gmail.com Drag handles only need to be tested on mobile platforms. (flutter/flutter#163723) 2025-02-28 jonahwilliams@google.com [Android] Use java for looking up Android API level. (flutter/flutter#163558) 2025-02-28 matanlurey@users.noreply.github.com Write an identical value to `bin/cache/engine.stamp` to prepare for migration (flutter/flutter#164317) 2025-02-27 47866232+chunhtai@users.noreply.github.com Wires up expanded state in web engine (flutter/flutter#164048) 2025-02-27 matanlurey@users.noreply.github.com Remove Cheserton's File (flutter/flutter#164340) 2025-02-27 robert.ancell@canonical.com Replace update semantics handler with signal. (flutter/flutter#163583) 2025-02-27 30870216+gaaclarke@users.noreply.github.com Split up the conical gradient fragment shader (flutter/flutter#164058) 2025-02-27 engine-flutter-autoroll@skia.org Roll Skia from c16b145749d4 to 4005ba3ca7b6 (3 revisions) (flutter/flutter#164339) 2025-02-27 matanlurey@users.noreply.github.com Delete and update stale documentation regarding engine/engine hash. (flutter/flutter#164324) 2025-02-27 matanlurey@users.noreply.github.com Document how `engine.version` (is/will be) computed (flutter/flutter#164335) 2025-02-27 christopherfujino@gmail.com Update conductor to write engine.version file (flutter/flutter#163350) 2025-02-27 reidbaker@google.com remove last usages of min/compile/target SdkVersion, align sourceCompatibility across repo and update android version documentation (flutter/flutter#164198) 2025-02-27 matanlurey@users.noreply.github.com Update links to the `flutter/engine` repository for the monorepo. (flutter/flutter#164328) 2025-02-27 34871572+gmackall@users.noreply.github.com Add empty `io.flutter.app.FlutterApplication` to give deprecation notice, and un-break projects that have not migrated (flutter/flutter#164233) 2025-02-27 aam@google.com Revert dart sdks that were causing dartaotruntime issues in g3 (flutter/flutter#164307) ...
Roll Flutter from 2e570ca to 842db35 (59 revisions) flutter/flutter@2e570ca...842db35 2025-03-02 engine-flutter-autoroll@skia.org Roll Skia from ad64415050aa to 101eee8fce59 (1 revision) (flutter/flutter#164449) 2025-03-02 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from ln3joxJfRN2XGhvCv... to AO1KirSDI7-MVYNPN... (flutter/flutter#164440) 2025-03-02 chris@bracken.jp android: Clean up gen_snapshot artifact build (flutter/flutter#164418) 2025-03-02 matanlurey@users.noreply.github.com Start using `bin/cache/engine.{stamp|realm}` instead of `bin/internal/engine.{realm|version}`. (flutter/flutter#164352) 2025-03-01 chris@bracken.jp Add macos/android_debug_unopt to local_engine.json (flutter/flutter#164410) 2025-03-01 chris@bracken.jp Delete unused build archive targets (flutter/flutter#164414) 2025-03-01 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from QMun2itYrV_zUYrvW... to ln3joxJfRN2XGhvCv... (flutter/flutter#164423) 2025-03-01 engine-flutter-autoroll@skia.org Roll Skia from ac14158663ea to ad64415050aa (1 revision) (flutter/flutter#164413) 2025-03-01 eric@shorebird.dev Update linux_host_engine.json ci/host_release description (flutter/flutter#164402) 2025-03-01 jason-simmons@users.noreply.github.com In update_engine_version_test.dart, do not populate the test environment with the host platform environment (flutter/flutter#164395) 2025-03-01 matanlurey@users.noreply.github.com Roll-forward #164317: Use `bin/cache/engine.stamp` (flutter/flutter#164401) 2025-02-28 ybz975218925@gmail.com Make pressing and moving on CupertinoButton closer to native behavior. (flutter/flutter#161731) 2025-02-28 engine-flutter-autoroll@skia.org Roll Skia from 4005ba3ca7b6 to ac14158663ea (7 revisions) (flutter/flutter#164404) 2025-02-28 matej.knopp@gmail.com [macOS] Prepare FlutterKeyboardManager for multi-view (flutter/flutter#163962) 2025-02-28 matej.knopp@gmail.com Add PlatformDispatcher.engineId (flutter/flutter#163476) 2025-02-28 matanlurey@users.noreply.github.com Move `integration_test.FlutterDeviceScreenshotTest` to the framework slow shard (flutter/flutter#164398) 2025-02-28 34465683+rkishan516@users.noreply.github.com Fix: Update DelegatedTransition animation parameter correctly (flutter/flutter#163853) 2025-02-28 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Write an identical value to `bin/cache/engine.stamp` to prepare for migration (#164317)" (flutter/flutter#164396) 2025-02-28 47989573+Hannnes1@users.noreply.github.com Add action for configuring default action of EditableText.onTapUpOutside (flutter/flutter#162575) 2025-02-28 reidbaker@google.com Align jvmTarget usages across codebase, while editing build.gradle files align them with android version documentation (flutter/flutter#164200) 2025-02-28 engine-flutter-autoroll@skia.org Roll Packages from 01d3d5c to 70b41e1 (5 revisions) (flutter/flutter#164380) 2025-02-28 51940183+Sameri11@users.noreply.github.com [tool] Allow using archiveName in android bundle build (flutter/flutter#162390) 2025-02-28 ueman@users.noreply.github.com Fix incorrectly checking for invalid environment variables in the tool (flutter/flutter#164101) 2025-02-28 robert.ancell@canonical.com Support forward and back buttons (flutter/flutter#164356) 2025-02-28 robert.ancell@canonical.com Fix window creation callback for multi-window (flutter/flutter#164353) 2025-02-28 robert.ancell@canonical.com Fix flutter doctor usage of eglinfo in failure cases. (flutter/flutter#164334) 2025-02-28 sigurdm@google.com Refactor writing of package config in tests (flutter/flutter#163734) 2025-02-28 ybz975218925@gmail.com Fixed the issue that Slider's secondaryTrackValue is not updated. (flutter/flutter#163996) 2025-02-28 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#164357) 2025-02-28 codefu@google.com Remove `Mac mac_unopt` presubmit retry count (flutter/flutter#164350) 2025-02-28 engine-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from 1elkOxihZuTEiTXzY... to QMun2itYrV_zUYrvW... (flutter/flutter#164351) 2025-02-28 ybz975218925@gmail.com Drag handles only need to be tested on mobile platforms. (flutter/flutter#163723) 2025-02-28 jonahwilliams@google.com [Android] Use java for looking up Android API level. (flutter/flutter#163558) 2025-02-28 matanlurey@users.noreply.github.com Write an identical value to `bin/cache/engine.stamp` to prepare for migration (flutter/flutter#164317) 2025-02-27 47866232+chunhtai@users.noreply.github.com Wires up expanded state in web engine (flutter/flutter#164048) 2025-02-27 matanlurey@users.noreply.github.com Remove Cheserton's File (flutter/flutter#164340) 2025-02-27 robert.ancell@canonical.com Replace update semantics handler with signal. (flutter/flutter#163583) 2025-02-27 30870216+gaaclarke@users.noreply.github.com Split up the conical gradient fragment shader (flutter/flutter#164058) 2025-02-27 engine-flutter-autoroll@skia.org Roll Skia from c16b145749d4 to 4005ba3ca7b6 (3 revisions) (flutter/flutter#164339) 2025-02-27 matanlurey@users.noreply.github.com Delete and update stale documentation regarding engine/engine hash. (flutter/flutter#164324) 2025-02-27 matanlurey@users.noreply.github.com Document how `engine.version` (is/will be) computed (flutter/flutter#164335) 2025-02-27 christopherfujino@gmail.com Update conductor to write engine.version file (flutter/flutter#163350) 2025-02-27 reidbaker@google.com remove last usages of min/compile/target SdkVersion, align sourceCompatibility across repo and update android version documentation (flutter/flutter#164198) 2025-02-27 matanlurey@users.noreply.github.com Update links to the `flutter/engine` repository for the monorepo. (flutter/flutter#164328) 2025-02-27 34871572+gmackall@users.noreply.github.com Add empty `io.flutter.app.FlutterApplication` to give deprecation notice, and un-break projects that have not migrated (flutter/flutter#164233) 2025-02-27 aam@google.com Revert dart sdks that were causing dartaotruntime issues in g3 (flutter/flutter#164307) ...
fixes: #163580
testing: There are existing tests (AiksTest.CanRenderConicalGradient). The compilation failure of the nexus 5 cannot be reproduced locally so we can't assert this fixes the problem in a test.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.