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

Conversation

@johnmccutchan
Copy link
Contributor

  • Introduce AndroidHardwareBufferTextureSourceVK.
  • Enable the necessary Vulkan extensions to support AndroidHardwareBufferTextureSourceVK.
  • Refactor HardwareBufferExternalTextureGL into a base class and a GL and VK specializations.
  • Switch ImageReaderPlatformView to use the PRIVATE image format (enables DRM'd content to be captured in the texture).
  • Add a AHardwareBuffer_describe to NDKHelpers.
  • Misc cleanups.

@flutter-dashboard
Copy link

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.

desc.storage_mode = impeller::StorageMode::kDevicePrivate;
desc.size = {static_cast<int>(bounds.width()),
static_cast<int>(bounds.height())};
desc.format = impeller::PixelFormat::kR8G8B8A8UNormInt;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to worry about checking the pixel format at runtime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we do, I'm going to leave this as a TODO for now though.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

builder.setMaxImages(2);
// Assume that we will be producing 32-bit RGBA values.
builder.setDefaultHardwareBufferFormat(HardwareBuffer.RGBA_8888);
builder.setMaxImages(3);
Copy link
Contributor

Choose a reason for hiding this comment

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

Are there any downsides to unconditionally requesting private format here? i.e. does it stop us from capturing the bytes via readback on the framework side (Picture/Layer.toImage)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good point, it definitely will stop us from reading it back.

I'm going to leave a TODO here to consider this in the future.

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 with two questions

- Introduce AndroidHardwareBufferTextureSourceVK.
- Enable the necessary Vulkan extensions to support AndroidHardwareBufferTextureSourceVK.
- Refactor HardwareBufferExternalTextureGL into a base class and a GL and VK specializations.
- Switch ImageReaderPlatformView to use the PRIVATE image format (enables DRM'd content to be captured in the texture).
- Add a AHardwareBuffer_describe to NDKHelpers.
- Misc cleanups.
@johnmccutchan johnmccutchan merged commit 6445507 into flutter:main Aug 10, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 10, 2023
…132332)

flutter/engine@a9be77e...16b01b9

2023-08-10 [email protected] Roll Dart SDK from 46da53e7abe2 to a2eac00da6b8 (1 revision) (flutter/engine#44601)
2023-08-10 [email protected] Fix unexpected pointer change issue and Add test case (flutter/engine#43949)
2023-08-10 [email protected] Reland "Android a11y bridge sets importantness" (flutter/engine#44589)
2023-08-10 [email protected] Support for Android Platform Views under Impeller/Vulkan (flutter/engine#44571)
2023-08-10 [email protected] Reintroduce Windows lifecycle with guard for posthumous `OnWindowStateEvent` (flutter/engine#44344)
2023-08-10 [email protected] Roll Skia from 92e6f52b0fa8 to b6492f5ce8c3 (1 revision) (flutter/engine#44597)

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://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
@chinmaygarde chinmaygarde changed the title Support for Android Platform Views under Impeller/Vulkan [Impeller] Support for Android Platform Views under Impeller/Vulkan Aug 21, 2023
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
- Introduce AndroidHardwareBufferTextureSourceVK.
- Enable the necessary Vulkan extensions to support
AndroidHardwareBufferTextureSourceVK.
- Refactor HardwareBufferExternalTextureGL into a base class and a GL
and VK specializations.
- Switch ImageReaderPlatformView to use the PRIVATE image format
(enables DRM'd content to be captured in the texture).
- Add a AHardwareBuffer_describe to NDKHelpers.
- Misc cleanups.
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.

3 participants