Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions shell/platform/darwin/ios/framework/Source/FlutterView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,7 @@ - (void)layoutSubviews {
CGColorSpaceRef srgb = CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB);
layer.colorspace = srgb;
CFRelease(srgb);
if (self.opaque) {
layer.pixelFormat = MTLPixelFormatBGR10_XR;
} else {
layer.pixelFormat = MTLPixelFormatBGRA10_XR;
}
layer.pixelFormat = MTLPixelFormatBGRA10_XR;
}
}

Expand Down
11 changes: 1 addition & 10 deletions shell/platform/darwin/ios/ios_surface_metal_impeller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@

namespace flutter {

static impeller::PixelFormat InferOffscreenLayerPixelFormat(impeller::PixelFormat pixel_format) {
switch (pixel_format) {
case impeller::PixelFormat::kB10G10R10XR:
return impeller::PixelFormat::kB10G10R10A10XR;
default:
return pixel_format;
}
}

IOSSurfaceMetalImpeller::IOSSurfaceMetalImpeller(const fml::scoped_nsobject<CAMetalLayer>& layer,
const std::shared_ptr<IOSContext>& context)
: IOSSurface(context),
Expand Down Expand Up @@ -47,7 +38,7 @@
// |IOSSurface|
std::unique_ptr<Surface> IOSSurfaceMetalImpeller::CreateGPUSurface(GrDirectContext*) {
impeller_context_->UpdateOffscreenLayerPixelFormat(
InferOffscreenLayerPixelFormat(impeller::FromMTLPixelFormat(layer_.get().pixelFormat)));
impeller::FromMTLPixelFormat(layer_.get().pixelFormat));
return std::make_unique<GPUSurfaceMetalImpeller>(this, //
impeller_context_ //
);
Expand Down