Skip to content

Conversation

@jason-simmons
Copy link
Member

Also avoid inserting newly created render targets into the cache if the cache is disabled. (Previously disabling the cache would skip lookups of existing cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not reuse a texture from the cache, and its texture should not be reused by other operations.

Fixes #174794

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added engine flutter/engine related. See also e: labels. e: impeller Impeller rendering backend issues and features requests labels Sep 3, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a mechanism to temporarily disable the render target cache, which is then used when creating an image from YUV textures. This ensures that the resulting texture is not cached and reused, which is the desired behavior for this specific operation. The changes also correct a bug where the render target cache would still add new entries even when disabled. The implementation is robust, using fml::ScopedCleanupClosure to guarantee the cache is re-enabled. The changes in RenderTargetCache are straightforward and correctly prevent caching when disabled. Overall, the changes are correct and well-implemented.

…n DlImageImpeller::MakeFromYUVTextures

Also avoid inserting newly created render targets into the cache if the cache
is disabled.  (Previously disabling the cache would skip lookups of existing
cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not reuse a
texture from the cache, and its texture should not be reused by other
operations.

Fixes flutter#174794
@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 16, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Sep 16, 2025
Merged via the queue into flutter:master with commit db3cbe5 Sep 16, 2025
188 of 189 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 16, 2025
dixita0607 pushed a commit to dixita0607/flutter that referenced this pull request Sep 17, 2025
…n DlImageImpeller::MakeFromYUVTextures (flutter#174912)

Also avoid inserting newly created render targets into the cache if the
cache is disabled. (Previously disabling the cache would skip lookups of
existing cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not
reuse a texture from the cache, and its texture should not be reused by
other operations.

Fixes flutter#174794
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 17, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Sep 17, 2025
flutter/flutter@8d0b31d...8f94cb0

2025-09-17 [email protected] fix typo in comments to mention `settings.gradle/.kts` instead of `build.gradle/.kts` (flutter/flutter#175486)
2025-09-17 [email protected] replace ` Charset.forName("UTF-8")` with `StandardCharsets.UTF_8` to address linter issues (flutter/flutter#175275)
2025-09-17 [email protected] Roll Skia from 283a8ff3bca5 to a5a8f1df14bb (6 revisions) (flutter/flutter#175512)
2025-09-17 [email protected] Roll Dart SDK from 649eef6040a1 to 116f7fe72839 (3 revisions) (flutter/flutter#175474)
2025-09-17 [email protected] Roll Fuchsia Linux SDK from wzk_HjPLGu-mlg5hC... to 0_jKqLGnkILvQ5C8a... (flutter/flutter#175468)
2025-09-16 [email protected] Sync 3.35.3 and 3.35.4 notes from stable to master (flutter/flutter#175461)
2025-09-16 [email protected] Roll Dart SDK from 700de52f29a9 to 649eef6040a1 (4 revisions) (flutter/flutter#175455)
2025-09-16 [email protected] Update gradle_errors.dart to use constants defined in gradle_utils.dart (flutter/flutter#174760)
2025-09-16 [email protected] Update gradle_utils.dart to use `constant` instead of `final` (flutter/flutter#175443)
2025-09-16 [email protected] fix typo in test documentation (flutter/flutter#174292)
2025-09-16 [email protected] [benchmarks] Allow passing --local-web-sdk and --build-mode flags to benchmarks (flutter/flutter#175199)
2025-09-16 [email protected] Roll pub packages and update lockfiles (flutter/flutter#175446)
2025-09-16 [email protected] [docs] Add initial version of Flutter AI rules (flutter/flutter#175011)
2025-09-16 [email protected] Remove  redundant `public` modifier  for interface members in MouseCursorPlugin.java (flutter/flutter#175281)
2025-09-16 [email protected] Remove the unnecessary semicolon at the end of the line in `ProcessTextPlugin.java` (flutter/flutter#175280)
2025-09-16 [email protected] Remove unnecessary `toString()` call in `ImageReaderPlatformViewRenderTarget.java` (flutter/flutter#175286)
2025-09-16 [email protected] Refactor `AccessibilityBridge.java` to address linter issues (flutter/flutter#175277)
2025-09-16 [email protected] Replace `.size() == 0` with `isEmpty()` in `PlatformPlugin.java` (flutter/flutter#175285)
2025-09-16 [email protected] Allow Passing an AnimationController to CircularProgressIndicator and LinearProgressIndicator (flutter/flutter#174605)
2025-09-16 [email protected] Roll Skia from 7d160bbf9403 to 283a8ff3bca5 (11 revisions) (flutter/flutter#175436)
2025-09-16 [email protected] chore: move engine docs out of engine/ and into docs/ (flutter/flutter#175195)
2025-09-16 [email protected] [Impeller] Disable the render target cache when creating a snapshot in DlImageImpeller::MakeFromYUVTextures (flutter/flutter#174912)
2025-09-16 [email protected] Remove redundant public modifier in `PlatformViewRenderTarget.java` (flutter/flutter#175284)
2025-09-16 [email protected] Update NDK to The Latest Stable (flutter/flutter#175365)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…n DlImageImpeller::MakeFromYUVTextures (flutter#174912)

Also avoid inserting newly created render targets into the cache if the
cache is disabled. (Previously disabling the cache would skip lookups of
existing cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not
reuse a texture from the cache, and its texture should not be reused by
other operations.

Fixes flutter#174794
Jaineel-Mamtora pushed a commit to Jaineel-Mamtora/flutter_forked that referenced this pull request Sep 24, 2025
…n DlImageImpeller::MakeFromYUVTextures (flutter#174912)

Also avoid inserting newly created render targets into the cache if the
cache is disabled. (Previously disabling the cache would skip lookups of
existing cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not
reuse a texture from the cache, and its texture should not be reused by
other operations.

Fixes flutter#174794
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…n DlImageImpeller::MakeFromYUVTextures (flutter#174912)

Also avoid inserting newly created render targets into the cache if the
cache is disabled. (Previously disabling the cache would skip lookups of
existing cache entries but would still add new entries to the cache)

The image created by DlImageImpeller::MakeFromYUVTextures should not
reuse a texture from the cache, and its texture should not be reused by
other operations.

Fixes flutter#174794
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e: impeller Impeller rendering backend issues and features requests engine flutter/engine related. See also e: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Texture flickering issue when using external textures for video playback on iOS

2 participants