Skip to content
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

[Flutter GPU] Add support for drawing Flutter GPU textures in the playground. #52352

Merged
merged 5 commits into from
Apr 26, 2024

Conversation

bdero
Copy link
Member

@bdero bdero commented Apr 24, 2024

Part of flutter/flutter#144640.

Adds support for drawing Flutter GPU textures in the RendererDartTest playground harness.

How to use it

  1. Write a Dart function that creates/schedules rendering ops against a texture, and then pass the texture to the harness by calling setDisplayTexture(Texture).
  2. Stub a test that calls RenderDartToPlayground(name). For example:
    TEST_P(RendererDartTest, CanCreateRenderPassAndSubmit) {
      ASSERT_TRUE(RenderDartToPlayground("canCreateRenderPassAndSubmit"));
    }

When the playground is disabled, RenderDartToPlayground falls back to the old behavior and executes the function once to make sure no unhandled exceptions are thrown.

Capture of Play/RendererDartTest.CanCreateRenderPassAndSubmit/Metal:

Screen.Recording.2024-04-23.at.7.06.06.PM.mov

@bdero bdero requested a review from chinmaygarde April 24, 2024 02:13
@bdero bdero self-assigned this Apr 24, 2024
@bdero bdero changed the title [Flutter GPU] Render RendererDartTests to the playground surface. [Flutter GPU] Add support for drawing Flutter GPU textures in the playground. Apr 24, 2024
@bdero bdero merged commit d794580 into flutter:main Apr 26, 2024
26 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 26, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 26, 2024
…147401)

flutter/engine@11a857e...d794580

2024-04-26 bdero@google.com [Flutter GPU] Add support for drawing Flutter GPU textures in the playground. (flutter/engine#52352)

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 jimgraham@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://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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants