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

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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants