-
Notifications
You must be signed in to change notification settings - Fork 6k
Reenable HardwareBuffer backed Android Platform Views on SDK >= 29 #44790
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). 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. |
Tried this PR on a Pixel 3. If I run the https://github.com/flutter/flutter/tree/master/dev/integration_tests/abstract_method_smoke_test test and rotate the screen, then the
|
} | ||
throw new UnsupportedOperationException( | ||
"ImageReaderPlatformViewRenderTarget requires API version 29+"); | ||
} | ||
|
||
public ImageReaderPlatformViewRenderTarget(ImageTextureEntry textureEntry) { | ||
if (Build.VERSION.SDK_INT < 26) { |
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 should be 29, instead of 26.
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.
Good catch. Done.
2d7cb2f
to
2efc833
Compare
@jason-simmons This is ready for review. |
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.
Few nits
FML_LOG(WARNING) | ||
<< "No DlImage available for HardwareBufferExternalTexture to paint."; |
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.
What's the developer action to take here?
If there is none, maybe this should be a DLOG/DCHECK?
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 is useful information for debugging the engine and I'd like to keep it in place for now until this code is more solid.
// to read back texture data. If we don't always want to use it, how do we | ||
// decide when | ||
// to use it or not? Perhaps PlatformViews can indicate if they may contain | ||
// DRM'd content. |
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.
nit: formatting
nit: please link an issue here explaining what has to be done (even if just what investigation is left to do or what resources someone interested in this should read about)
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.
Fixed added more context to the TODO.
@@ -65,7 +65,8 @@ void SurfaceTextureExternalTexture::Paint(PaintContext& context, | |||
flutter::DlCanvas::SrcRectConstraint::kStrict // enforce edges | |||
); | |||
} else { | |||
FML_LOG(WARNING) << "No DlImage available."; | |||
FML_LOG(WARNING) | |||
<< "No DlImage available for SurfaceTextureExternalTexture to paint."; |
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.
Ditto on log message.
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.
Same here.
- Fix a bug in the SDK < 33 ImageReader construction code path. - Fix a bug that resulted in references to Images produced by a closed ImageReader. - Fix an order of operations bug in ImageReaderPlatformViewRenderTarget release/finalizer code path. - Enable HardwareBuffer backed Android Platform Views on SDK >= 29
2efc833
to
1a7eee1
Compare
LGTM |
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.
RSLGTM
…132812) flutter/engine@5019d6d...866b43f 2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from 1bec2899ace8 to 1e62a2d4c429 (1 revision) (flutter/engine#44829) 2023-08-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 7e4e5796ee99 to 7101eb7569ac (2 revisions) (flutter/engine#44828) 2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from e4be2cab442f to 1bec2899ace8 (1 revision) (flutter/engine#44826) 2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from bfd45173e5e3 to e4be2cab442f (3 revisions) (flutter/engine#44824) 2023-08-17 gspencergoog@users.noreply.github.com Add Doxygen doc generation for iOS, macOS, Linux, Windows, and Impeller (flutter/engine#43915) 2023-08-17 skia-flutter-autoroll@skia.org Roll Fuchsia Mac SDK from VW7WAVPT3Cj5erlae... to Tnp43n_nAR2N0l_gY... (flutter/engine#44823) 2023-08-17 jason-simmons@users.noreply.github.com Fix FlutterInjectorTest assumptions about how the executor service assigns tasks to threads (flutter/engine#44775) 2023-08-17 john@johnmccutchan.com Reenable HardwareBuffer backed Android Platform Views on SDK >= 29 (flutter/engine#44790) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from VW7WAVPT3Cj5 to Tnp43n_nAR2N 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 jsimmons@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
…lutter#44790) - Fix a bug in the SDK < 33 ImageReader construction code path. - Fix a bug that resulted in references to Images produced by a closed ImageReader. - Fix an order of operations bug in ImageReaderPlatformViewRenderTarget release/finalizer code path. - Enable HardwareBuffer backed Android Platform Views on SDK >= 29 Manually tested on device rotating and shutting down the app.
…>= 29 (flutter#44790)" This reverts commit d259a52.
…>= 29 (flutter#44790)" This reverts commit d259a52.
Manually tested on device rotating and shutting down the app.