-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] Implement, non user-facing, dithering for LinearGradients. #44181
Conversation
jonahwilliams
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.
LGTM with nits
|
auto label is removed for flutter/engine, pr: 44181, due to - The status or check suite Linux Web Framework tests has failed. Please fix the issues identified (or deflake) before re-applying this label.
|
jonahwilliams
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.
Still LGTM
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. |
…131647) flutter/engine@791f505...1433e23 2023-08-01 [email protected] [Impeller] Implement, non user-facing, dithering for LinearGradients. (flutter/engine#44181) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…lutter#131647) flutter/engine@791f505...1433e23 2023-08-01 [email protected] [Impeller] Implement, non user-facing, dithering for LinearGradients. (flutter/engine#44181) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…44331) Partial work towards flutter/flutter#131450 similar to #44181. --- Run the Playground locally: ```bash $ENGINE/out/host_debug_unopt/impeller_unittests \ --enable_playground \ --gtest_filter="*CanRender*GradientWithDithering*" ``` ## Radial ### Before <img width="1014" alt="Screenshot 2023-08-03 at 10 08 53 AM" src="https://github.com/flutter/engine/assets/168174/d53f2c0e-5c48-4ecb-8e67-d4ab28bfe488"> ### After <img width="1018" alt="Screenshot 2023-08-03 at 10 13 57 AM" src="https://github.com/flutter/engine/assets/168174/3b6e6e65-3dd3-4cb3-9950-36e2ba5c1da2"> ## Sweep ### Before <img width="1019" alt="Screenshot 2023-08-03 at 10 27 35 AM" src="https://github.com/flutter/engine/assets/168174/4e3bc82d-c0d5-43dd-952a-c11cb586fb65"> ### After <img width="1018" alt="Screenshot 2023-08-03 at 10 33 11 AM" src="https://github.com/flutter/engine/assets/168174/7e526391-cfd7-4920-89ff-fe26793b24fc" ## Conical ### Before <img width="1019" alt="Screenshot 2023-08-08 at 11 55 43 AM" src="https://github.com/flutter/engine/assets/168174/944709f4-8163-4de3-bfc5-eaf30b978529"> ### After <img width="1016" alt="Screenshot 2023-08-08 at 1 11 40 PM" src="https://github.com/flutter/engine/assets/168174/60ad67a4-b409-4136-a753-b8608f46fbf2">
…flutter#44181) Partial work towards flutter/flutter#131450. --- Run the Playground locally: ```bash $ENGINE/out/host_debug_unopt/impeller_unittests \ --enable_playground \ --gtest_filter="*CanRenderLinearGradientWithDithering*" ``` Summary of changes: - Added a playground/test for dithering disabled and enabled. - Added `bool dither` to Impeller's `Paint`, but `SetDither` (use-facing) is ignored. - Converted [Skia's dithering](https://github.com/google/skia/blob/f9de059517a6f58951510fc7af0cba21e13dd1a8/src/opts/SkRasterPipeline_opts.h#L1717) to GLSL and invoked it when `dither` is set. ## Before  ## After  ## Deleted Scenes <details> <summary>Here are some of my earlier attempts that are fun to share :)</summary>      </details>
…lutter#44331) Partial work towards flutter/flutter#131450 similar to flutter#44181. --- Run the Playground locally: ```bash $ENGINE/out/host_debug_unopt/impeller_unittests \ --enable_playground \ --gtest_filter="*CanRender*GradientWithDithering*" ``` ## Radial ### Before <img width="1014" alt="Screenshot 2023-08-03 at 10 08 53 AM" src="https://github.com/flutter/engine/assets/168174/d53f2c0e-5c48-4ecb-8e67-d4ab28bfe488"> ### After <img width="1018" alt="Screenshot 2023-08-03 at 10 13 57 AM" src="https://github.com/flutter/engine/assets/168174/3b6e6e65-3dd3-4cb3-9950-36e2ba5c1da2"> ## Sweep ### Before <img width="1019" alt="Screenshot 2023-08-03 at 10 27 35 AM" src="https://github.com/flutter/engine/assets/168174/4e3bc82d-c0d5-43dd-952a-c11cb586fb65"> ### After <img width="1018" alt="Screenshot 2023-08-03 at 10 33 11 AM" src="https://github.com/flutter/engine/assets/168174/7e526391-cfd7-4920-89ff-fe26793b24fc" ## Conical ### Before <img width="1019" alt="Screenshot 2023-08-08 at 11 55 43 AM" src="https://github.com/flutter/engine/assets/168174/944709f4-8163-4de3-bfc5-eaf30b978529"> ### After <img width="1016" alt="Screenshot 2023-08-08 at 1 11 40 PM" src="https://github.com/flutter/engine/assets/168174/60ad67a4-b409-4136-a753-b8608f46fbf2">
Partial work towards flutter/flutter#131450.
Run the Playground locally:
Summary of changes:
bool ditherto Impeller'sPaint, butSetDither(use-facing) is ignored.ditheris set.Before
After
Deleted Scenes
Here are some of my earlier attempts that are fun to share :)