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

iOS: Eliminate unnecessary bridged retain casts #56662

Merged
merged 1 commit into from
Nov 17, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,14 @@ @implementation FlutterDarwinExternalTextureSkImageWrapper
return nullptr;
#else // SLIMPELLER
GrMtlTextureInfo ySkiaTextureInfo;
ySkiaTextureInfo.fTexture = sk_cfp<const void*>{(__bridge_retained const void*)yTex};
ySkiaTextureInfo.fTexture.retain((__bridge GrMTLHandle)yTex);

GrBackendTexture skiaBackendTextures[2];
skiaBackendTextures[0] =
GrBackendTextures::MakeMtl(width, height, skgpu::Mipmapped::kNo, ySkiaTextureInfo);

GrMtlTextureInfo uvSkiaTextureInfo;
uvSkiaTextureInfo.fTexture = sk_cfp<const void*>{(__bridge_retained const void*)uvTex};
uvSkiaTextureInfo.fTexture.retain((__bridge GrMTLHandle)uvTex);

skiaBackendTextures[1] =
GrBackendTextures::MakeMtl(width, height, skgpu::Mipmapped::kNo, uvSkiaTextureInfo);
Expand All @@ -308,7 +308,7 @@ GrYUVABackendTextures yuvaBackendTextures(yuvaInfo, skiaBackendTextures,
#else // SLIMPELLER

GrMtlTextureInfo skiaTextureInfo;
skiaTextureInfo.fTexture = sk_cfp<const void*>{(__bridge_retained const void*)rgbaTex};
skiaTextureInfo.fTexture.retain((__bridge GrMTLHandle)rgbaTex);

GrBackendTexture skiaBackendTexture =
GrBackendTextures::MakeMtl(width, height, skgpu::Mipmapped ::kNo, skiaTextureInfo);
Expand Down