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

Commit 6671f9b

Browse files
committed
[Impeller] Fix Impeller Metal wide gamut
1 parent f7d2571 commit 6671f9b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shell/platform/darwin/ios/ios_surface_metal_impeller.mm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
if (!impeller_context_) {
2929
return;
3030
}
31-
is_valid_ = impeller_context_->UpdateOffscreenLayerPixelFormat(
32-
InferOffscreenLayerPixelFormat(impeller::FromMTLPixelFormat(layer_.get().pixelFormat)));
31+
is_valid_ = true;
3332
}
3433

3534
// |IOSSurface|
@@ -47,6 +46,8 @@
4746

4847
// |IOSSurface|
4948
std::unique_ptr<Surface> IOSSurfaceMetalImpeller::CreateGPUSurface(GrDirectContext*) {
49+
impeller_context_->UpdateOffscreenLayerPixelFormat(
50+
InferOffscreenLayerPixelFormat(impeller::FromMTLPixelFormat(layer_.get().pixelFormat)));
5051
return std::make_unique<GPUSurfaceMetalImpeller>(this, //
5152
impeller_context_ //
5253
);

0 commit comments

Comments
 (0)