diff --git a/engine/src/flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm b/engine/src/flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm index 5618f75a416..c789b1f3225 100644 --- a/engine/src/flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm +++ b/engine/src/flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.mm @@ -230,7 +230,7 @@ FLUTTER_ASSERT_ARC width:(size_t)width height:(size_t)height { GrMtlTextureInfo ySkiaTextureInfo; - ySkiaTextureInfo.fTexture = sk_cf_obj{(__bridge_retained const void*)yTex}; + ySkiaTextureInfo.fTexture = sk_cfp{(__bridge_retained const void*)yTex}; GrBackendTexture skiaBackendTextures[2]; skiaBackendTextures[0] = GrBackendTexture(/*width=*/width, @@ -239,7 +239,7 @@ FLUTTER_ASSERT_ARC /*textureInfo=*/ySkiaTextureInfo); GrMtlTextureInfo uvSkiaTextureInfo; - uvSkiaTextureInfo.fTexture = sk_cf_obj{(__bridge_retained const void*)uvTex}; + uvSkiaTextureInfo.fTexture = sk_cfp{(__bridge_retained const void*)uvTex}; skiaBackendTextures[1] = GrBackendTexture(/*width=*/width, /*height=*/height, @@ -259,7 +259,7 @@ FLUTTER_ASSERT_ARC width:(size_t)width height:(size_t)height { GrMtlTextureInfo skiaTextureInfo; - skiaTextureInfo.fTexture = sk_cf_obj{(__bridge_retained const void*)rgbaTex}; + skiaTextureInfo.fTexture = sk_cfp{(__bridge_retained const void*)rgbaTex}; GrBackendTexture skiaBackendTexture(/*width=*/width, /*height=*/height, diff --git a/engine/src/flutter/shell/platform/embedder/embedder.cc b/engine/src/flutter/shell/platform/embedder/embedder.cc index f8496ffc0b0..761db7a2de6 100644 --- a/engine/src/flutter/shell/platform/embedder/embedder.cc +++ b/engine/src/flutter/shell/platform/embedder/embedder.cc @@ -589,7 +589,7 @@ static sk_sp MakeSkSurfaceFromBackingStore( FML_LOG(ERROR) << "Embedder supplied null Metal texture."; return nullptr; } - sk_cf_obj mtl_texture; + sk_cfp mtl_texture; mtl_texture.retain(metal->texture.texture); texture_info.fTexture = mtl_texture; GrBackendTexture backend_texture(config.size.width, // diff --git a/engine/src/flutter/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc b/engine/src/flutter/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc index 0e1936b95ed..e0c584aa6bf 100644 --- a/engine/src/flutter/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc +++ b/engine/src/flutter/shell/platform/embedder/tests/embedder_test_backingstore_producer.cc @@ -197,7 +197,7 @@ bool EmbedderTestBackingStoreProducer::CreateMTLTexture( // own MTLTexture and wrapping it. auto surface_size = SkISize::Make(config->size.width, config->size.height); auto texture_info = test_metal_context_->CreateMetalTexture(surface_size); - sk_cf_obj texture; + sk_cfp texture; texture.retain(texture_info.texture); GrMtlTextureInfo skia_texture_info; diff --git a/engine/src/flutter/testing/test_metal_context.h b/engine/src/flutter/testing/test_metal_context.h index 936f66fcb2f..167bdf35ec5 100644 --- a/engine/src/flutter/testing/test_metal_context.h +++ b/engine/src/flutter/testing/test_metal_context.h @@ -42,8 +42,8 @@ class TestMetalContext { void* command_queue_; sk_sp skia_context_; std::mutex textures_mutex; - int64_t texture_id_ctr_ = 1; // guarded by textures_mutex - std::map> textures_; // guarded by textures_mutex + int64_t texture_id_ctr_ = 1; // guarded by textures_mutex + std::map> textures_; // guarded by textures_mutex }; } // namespace flutter diff --git a/engine/src/flutter/testing/test_metal_context.mm b/engine/src/flutter/testing/test_metal_context.mm index 417372f0065..d2ea2cb3d1b 100644 --- a/engine/src/flutter/testing/test_metal_context.mm +++ b/engine/src/flutter/testing/test_metal_context.mm @@ -82,8 +82,8 @@ TestMetalContext::TextureInfo TestMetalContext::CreateMetalTexture(const SkISize } id device = (__bridge id)GetMetalDevice(); - sk_cf_obj texture = - sk_cf_obj{[[device newTextureWithDescriptor:texture_descriptor.get()] retain]}; + sk_cfp texture = + sk_cfp{[[device newTextureWithDescriptor:texture_descriptor.get()] retain]}; if (!texture) { FML_CHECK(false) << "Could not create texture from texture descriptor.";