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

Conversation

@jason-simmons
Copy link
Member

If all previous elements were skipped due to clear color optimization, then the clear color must be rendered as an input to the advanced blend if framebuffer fetch is not available.

// for blending (otherwise the blend pass will end up executing before
// all the previous commands in the active pass).

// If all previous elements were skipped due to clear color optimization
Copy link
Contributor

Choose a reason for hiding this comment

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

If we applied the clear color, that means we have a single color/rectangle as a dst input. Rather than rendering the element and allocating the render target to do this, we could instead create a 1x1 host uploaded texture with the color already set - that would be much faster.

The ColorFilterContents::MakeBlend also has the option of specifying a "foreground" color, which I believe applies to the destination - the same place you'd use this texture. If this works all you need to do is conditionally pass the clear color instead of another texture which should be much simpler.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed this to pass the clear color as the foreground color for ColorFilterContents::MakeBlend

@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 #48646 at sha 10cd24a

@jason-simmons jason-simmons force-pushed the iplr_adv_blend_clear_color branch from 10cd24a to 80a01d8 Compare December 5, 2023 00:31
@jason-simmons jason-simmons changed the title [Impeller] Render the clear color if needed before an advanced blend [Impeller] Provide the clear color to an advanced blend if it was optimized out Dec 5, 2023
Copy link
Contributor

@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!

@jonahwilliams
Copy link
Contributor

It looks like the clear color optimization is applying to AdvancedBlendCoverageHintIsNotResetByEntityPass, so to fix that test you'd likely need to modify the drawing commands so at least one entity was drawn.

@jason-simmons jason-simmons force-pushed the iplr_adv_blend_clear_color branch from 80a01d8 to 988117f Compare December 5, 2023 23:15
@flutter-dashboard
Copy link

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

Changes reported for pull request #48646 at sha 988117f

…imized out

If all previous elements were skipped due to clear color optimization,
then the clear color must be provided as the foreground to the advanced
blend if framebuffer fetch is not available.
@jason-simmons jason-simmons force-pushed the iplr_adv_blend_clear_color branch from 988117f to 939a6a4 Compare December 6, 2023 16:39
@flutter-dashboard
Copy link

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

Changes reported for pull request #48646 at sha 939a6a4

@jason-simmons jason-simmons merged commit c32eb04 into flutter:main Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 6, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 7, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Dec 7, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Dec 7, 2023
…139716)

flutter/engine@347f506...82de334

2023-12-07 [email protected] Revert "Replace use of Fontmgr::RefDefault with explicit creation calls" (flutter/engine#48755)
2023-12-07 [email protected] Roll Skia from 2abb01e18ab3 to 8ebf43ba1c09 (1 revision) (flutter/engine#48761)
2023-12-07 [email protected] Roll Dart SDK from dbfe4e3f867e to be8a95b6717d (1 revision) (flutter/engine#48757)
2023-12-06 [email protected] Remove obsolete properties. (flutter/engine#48753)
2023-12-06 [email protected] Roll Skia from 7ff0103760d0 to 2abb01e18ab3 (1 revision) (flutter/engine#48751)
2023-12-06 [email protected] Roll Skia from 570103e08087 to 7ff0103760d0 (1 revision) (flutter/engine#48748)
2023-12-06 [email protected] Roll Skia from 326bdc97ac40 to 570103e08087 (1 revision) (flutter/engine#48746)
2023-12-06 [email protected] Roll Dart SDK from 6eb13603c212 to dbfe4e3f867e (1 revision) (flutter/engine#48745)
2023-12-06 [email protected] [Impeller] Store Buffer/Texture bindings in vector instead of map. (flutter/engine#48719)
2023-12-06 [email protected] Roll Skia from 33cba437bf70 to 326bdc97ac40 (2 revisions) (flutter/engine#48743)
2023-12-06 [email protected] [Impeller] Provide the clear color to an advanced blend if it was optimized out (flutter/engine#48646)
2023-12-06 [email protected] [Windows] Set swap interval on raster thread after startup (flutter/engine#47787)
2023-12-06 [email protected] Roll Skia from 384d14063dc1 to 33cba437bf70 (3 revisions) (flutter/engine#48740)
2023-12-06 [email protected] [Windows] Refactor the GLES proc table (flutter/engine#48688)
2023-12-06 [email protected] Replace use of Fontmgr::RefDefault with explicit creation calls (flutter/engine#48571)
2023-12-06 [email protected] [Impeller] disable entity culling by default. (flutter/engine#48717)
2023-12-06 [email protected] Roll Skia from 23e1cb20a6b5 to 384d14063dc1 (1 revision) (flutter/engine#48738)

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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.

2 participants