Skip to content

Refactor EmbedderTests to separate graphics backends #158998

@cbracken

Description

@cbracken

Currently EmbedderConfigBuilder, EmbedderTest, EmbedderTestCompositor, EmbedderTestBackingStoreProducer, etc. handle software, OpenGL, Metal, and Vulkan all together in the same implementation, which allows for several nonsensical operations such as creating a EmbedderTestContext with a Metal compositor then calling SetRenderTargetType(RenderTargetType::kVulkan) on it.

Further, this mixing prevents us from using Objective-C types in Metal-related headers, since they're included in translation units that need to be pure C++ since they need to compile for all backends on all platforms. This then requires a lot of manual ARC bridging for memory management of Objective-C types.

Almost all of the backend-specific code is easily separable into separate implementations. We should do that.

Metadata

Metadata

Assignees

Labels

a: tests"flutter test", flutter_test, or one of our testsc: contributor-productivityTeam-specific productivity, code health, technical debt.e: embedderUsers of the Embedder APIengineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions