From 25992b39b76db5a4a39b74e27eea9e7f98c3398e Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 27 Mar 2023 11:57:27 -0700 Subject: [PATCH] [Impeller] Fix Impeller Metal wide gamut --- shell/platform/darwin/ios/ios_surface_metal_impeller.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shell/platform/darwin/ios/ios_surface_metal_impeller.mm b/shell/platform/darwin/ios/ios_surface_metal_impeller.mm index a74343ba1fe26..15df8b7d510cc 100644 --- a/shell/platform/darwin/ios/ios_surface_metal_impeller.mm +++ b/shell/platform/darwin/ios/ios_surface_metal_impeller.mm @@ -28,8 +28,7 @@ if (!impeller_context_) { return; } - is_valid_ = impeller_context_->UpdateOffscreenLayerPixelFormat( - InferOffscreenLayerPixelFormat(impeller::FromMTLPixelFormat(layer_.get().pixelFormat))); + is_valid_ = true; } // |IOSSurface| @@ -47,6 +46,8 @@ // |IOSSurface| std::unique_ptr IOSSurfaceMetalImpeller::CreateGPUSurface(GrDirectContext*) { + impeller_context_->UpdateOffscreenLayerPixelFormat( + InferOffscreenLayerPixelFormat(impeller::FromMTLPixelFormat(layer_.get().pixelFormat))); return std::make_unique(this, // impeller_context_ // );