-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[iOS] Ensure FlutterMetalLayer has correct backpressure. #50486
[iOS] Ensure FlutterMetalLayer has correct backpressure. #50486
Conversation
@@ -236,4 +236,42 @@ - (void)testLayerLimitsDrawableCount { | |||
[self removeMetalLayer:layer]; | |||
} | |||
|
|||
- (void)testTimeout { |
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.
This needs more thought, I haven't actually looked at how to grab the usage flag in the test yet
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.
The test fails because isInUse=true
doesn't prevent layer from returning the surface.
isInUse=false
: Compositor is definitely not using the surface. This is useful to reuse surface immediately after a dropped frame.
isInUse=true
: Compositor may be using the surface. if there is no surface with isInUse=false
, return one with isUnUse=true
that was presented longest time ago.
The blocking in this PR is performed when front surface command buffer has not been completed. This is different from compositor using the surface. The test will likely need to call flutterPrepareForPresent:
with command buffer and then test if nextSurface
blocks while the command buffer waits for completion.
@jonahwilliams, I added PR for the test in jonahwilliams#1 |
Get testTimeout to work
Thank you! |
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.
Tested this. LGTM!
See also flutter/flutter#140901 . We were not accounting for GPU backpressure in the FML, this applies the patch from @knopp to track this.
2024-02-15 30870216+gaaclarke@users.noreply.github.com Added tool to easily check golden diffs locally. (flutter/engine#50654) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689) 2024-02-15 johnoneil@users.noreply.github.com Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545) 2024-02-15 jonahwilliams@google.com [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686) 2024-02-15 103135467+sealesj@users.noreply.github.com Pin OSV-Scanner reusable workflow (flutter/engine#50649) 2024-02-15 whesse@google.com Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685) 2024-02-15 6718144+renancaraujo@users.noreply.github.com fix: consider array size on canvaskit shader data (flutter/engine#49754) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
2024-02-15 30870216+gaaclarke@users.noreply.github.com Added tool to easily check golden diffs locally. (flutter/engine#50654) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 4bbf2060b008 to 12d0b7fac4c3 (2 revisions) (flutter/engine#50689) 2024-02-15 johnoneil@users.noreply.github.com Provide a matrix inverse shim for GLES 2.0. (flutter/engine#50545) 2024-02-15 jonahwilliams@google.com [iOS] Ensure FlutterMetalLayer has correct backpressure. (flutter/engine#50486) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 682f0e1e7e77 to 4bbf2060b008 (3 revisions) (flutter/engine#50686) 2024-02-15 103135467+sealesj@users.noreply.github.com Pin OSV-Scanner reusable workflow (flutter/engine#50649) 2024-02-15 whesse@google.com Add support for dart_src GN variable to flutter_frontend_server build (flutter/engine#50685) 2024-02-15 6718144+renancaraujo@users.noreply.github.com fix: consider array size on canvaskit shader data (flutter/engine#49754) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 1277910beec9 to 682f0e1e7e77 (1 revision) (flutter/engine#50683) 2024-02-15 skia-flutter-autoroll@skia.org Roll Skia from 85ab600a9519 to 1277910beec9 (2 revisions) (flutter/engine#50682)
See also flutter/flutter#140901 . We were not accounting for GPU backpressure in the FML, this applies the patch from @knopp to track this.