-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Impeller] Disable the render target cache when creating a snapshot in DlImageImpeller::MakeFromYUVTextures #174912
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
|
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. |
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.
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
c30751e to
7d4b6b8
Compare
…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
…snapshot in DlImageImpeller::MakeFromYUVTextures (flutter/flutter#174912)
…snapshot in DlImageImpeller::MakeFromYUVTextures (flutter/flutter#174912)
…snapshot in DlImageImpeller::MakeFromYUVTextures (flutter/flutter#174912)
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
…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
…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
…snapshot in DlImageImpeller::MakeFromYUVTextures (flutter/flutter#174912)
…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
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