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

Commit a42cc1a

Browse files
committed
cf_audited_transfer
1 parent f3dfcc4 commit a42cc1a

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

shell/platform/darwin/ios/ios_surface_metal_impeller.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,19 @@ class SK_API_AVAILABLE_CA_METAL_LAYER IOSSurfaceMetalImpeller final
4242
std::unique_ptr<Surface> CreateGPUSurface(GrDirectContext* gr_context) override;
4343

4444
// |GPUSurfaceMetalDelegate|
45-
GPUCAMetalLayerHandle GetCAMetalLayer(const SkISize& frame_info) const override;
45+
GPUCAMetalLayerHandle GetCAMetalLayer(const SkISize& frame_info) const override
46+
__attribute__((cf_audited_transfer));
4647

4748
// |GPUSurfaceMetalDelegate|
48-
bool PresentDrawable(GrMTLHandle drawable) const override;
49+
bool PresentDrawable(GrMTLHandle drawable) const override __attribute__((cf_audited_transfer));
4950

5051
// |GPUSurfaceMetalDelegate|
51-
GPUMTLTextureInfo GetMTLTexture(const SkISize& frame_info) const override;
52+
GPUMTLTextureInfo GetMTLTexture(const SkISize& frame_info) const override
53+
__attribute__((cf_audited_transfer));
5254

5355
// |GPUSurfaceMetalDelegate|
54-
bool PresentTexture(GPUMTLTextureInfo texture) const override;
56+
bool PresentTexture(GPUMTLTextureInfo texture) const override
57+
__attribute__((cf_audited_transfer));
5558

5659
// |GPUSurfaceMetalDelegate|
5760
bool AllowsDrawingWhenGpuDisabled() const override;

shell/platform/darwin/ios/ios_surface_metal_skia.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,19 @@ class SK_API_AVAILABLE_CA_METAL_LAYER IOSSurfaceMetalSkia final : public IOSSurf
3939
std::unique_ptr<Surface> CreateGPUSurface(GrDirectContext* gr_context) override;
4040

4141
// |GPUSurfaceMetalDelegate|
42-
GPUCAMetalLayerHandle GetCAMetalLayer(const SkISize& frame_info) const override;
42+
GPUCAMetalLayerHandle GetCAMetalLayer(const SkISize& frame_info) const override
43+
__attribute__((cf_audited_transfer));
4344

4445
// |GPUSurfaceMetalDelegate|
45-
bool PresentDrawable(GrMTLHandle drawable) const override;
46+
bool PresentDrawable(GrMTLHandle drawable) const override __attribute__((cf_audited_transfer));
4647

4748
// |GPUSurfaceMetalDelegate|
48-
GPUMTLTextureInfo GetMTLTexture(const SkISize& frame_info) const override;
49+
GPUMTLTextureInfo GetMTLTexture(const SkISize& frame_info) const override
50+
__attribute__((cf_audited_transfer));
4951

5052
// |GPUSurfaceMetalDelegate|
51-
bool PresentTexture(GPUMTLTextureInfo texture) const override;
53+
bool PresentTexture(GPUMTLTextureInfo texture) const override
54+
__attribute__((cf_audited_transfer));
5255

5356
// |GPUSurfaceMetalDelegate|
5457
bool AllowsDrawingWhenGpuDisabled() const override;

shell/platform/darwin/ios/ios_surface_metal_skia.mm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ - (void)flutterPrepareForPresent:(nonnull id<MTLCommandBuffer>)commandBuffer;
1616

1717
namespace flutter {
1818

19-
static IOSContextMetalSkia* CastToMetalContext(const std::shared_ptr<IOSContext>& context) {
19+
static IOSContextMetalSkia* CastToMetalContext(const std::shared_ptr<IOSContext>& context)
20+
__attribute__((cf_audited_transfer)) {
2021
return (IOSContextMetalSkia*)context.get();
2122
}
2223

0 commit comments

Comments
 (0)