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

[Impeller] Add gradient dithering for Radial/Sweep/Conical gradients #44331

Merged
merged 8 commits into from
Aug 8, 2023

Conversation

matanlurey
Copy link
Contributor

@matanlurey matanlurey commented Aug 3, 2023

Partial work towards flutter/flutter#131450 similar to #44181.


Run the Playground locally:

$ENGINE/out/host_debug_unopt/impeller_unittests \
  --enable_playground \
  --gtest_filter="*CanRender*GradientWithDithering*"

Radial

Before

Screenshot 2023-08-03 at 10 08 53 AM

After

Screenshot 2023-08-03 at 10 13 57 AM

Sweep

Before

Screenshot 2023-08-03 at 10 27 35 AM

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

Screenshot 2023-08-08 at 11 55 43 AM

After

Screenshot 2023-08-08 at 1 11 40 PM

@matanlurey matanlurey self-assigned this Aug 3, 2023
@flutter-dashboard
Copy link

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.

Changes reported for pull request #44331 at sha b25efd3

@jonahwilliams
Copy link
Member

I think we have a mysterious 4th gradient type, but maybe that is combined into the radial gradient? The two point conical gradient.

@jonahwilliams
Copy link
Member

@matanlurey
Copy link
Contributor Author

I think we have a mysterious 4th gradient type, but maybe that is combined into the radial gradient? The two point conical gradient.

Thanks! Added.

Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Aug 8, 2023

auto label is removed for flutter/engine/44331, due to - The status or check suite Linux linux_clang_tidy has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2023
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

There was a compiler error: Unsigned integers are not supported on legacy ESSL.

Huh

@@ -45,4 +47,8 @@ void main() {
frag_info.tile_mode, //
frag_info.decal_border_color);
frag_color = IPPremultiply(frag_color) * frag_info.alpha;

if (frag_info.dither) {
Copy link
Member

Choose a reason for hiding this comment

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

This should be in the _ssbo varaint

@matanlurey matanlurey added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Aug 8, 2023

auto label is removed for flutter/engine/44331, due to - The status or check suite Linux linux_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #44331 at sha 40cfa90

@matanlurey matanlurey changed the title [Impeller] Add gradient dithering for Radial and Sweep gradients [Impeller] Add gradient dithering for Radial/Sweep/Conical gradients Aug 8, 2023
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

Changes reported for pull request #44331 at sha 8bda08a

@matanlurey matanlurey merged commit 29b117a into flutter:main Aug 8, 2023
@matanlurey matanlurey deleted the impeller-gradient-dithering branch August 8, 2023 23:23
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 9, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 9, 2023
…132179)

flutter/engine@82292b8...29b117a

2023-08-08 matanlurey@users.noreply.github.com [Impeller] Add gradient dithering for Radial/Sweep/Conical gradients (flutter/engine#44331)
2023-08-08 skia-flutter-autoroll@skia.org Roll Skia from 68b80f663be6 to 1fbe521b2c56 (2 revisions) (flutter/engine#44518)
2023-08-08 chris@bracken.jp [macOS] Improve engine retain cycle testing (flutter/engine#44509)
2023-08-08 34871572+gmackall@users.noreply.github.com Fix name in description of 'create_cipd_packages.sh' (flutter/engine#44513)
2023-08-08 30870216+gaaclarke@users.noreply.github.com [Impeller] started std::moving `Command`s instead of copying (flutter/engine#44508)

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 chinmaygarde@google.com,rmistry@google.com,zra@google.com 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
@reidbaker reidbaker mentioned this pull request Aug 15, 2023
14 tasks
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…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">
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants