This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[macOS] Merge FlutterSurfaceManager classes #37701
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously,
FlutterSurfaceManager
was a protocol with two concrete implementations:FlutterGLSurfaceManager
andFlutterMetalSurfaceManager
. Most of the implementation was in a shared superclass,FlutterIOSurfaceManager
, which called into the OpenGL or Metal-specific subclass when backend-specific operations (such as allocating textures) was required. It did so via a delegate pattern, wherein the subclasses both implemented theFlutterIOSurfaceManagerDelegate
protocol that exposed the backend-specific functionality.Now that only the Metal implementation remains, the delegate code can be inlined into the calling functions, and the class hierarchy can be squashed into a single concrete implementation class,
FlutterSurfaceManager
, similar to how it was originally implemented in #21525 before we had two backends.Issue: flutter/flutter#108304
Issue: flutter/flutter#114445
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.