Ios CVMetalTextureCache创建参数

Ios CVMetalTextureCache创建参数,ios,metal,core-video,Ios,Metal,Core Video,有人知道什么理由吗?可接受的键和值?在头文件CVMetalTextureCache.h中,在定义缓存属性(如kCVMetalTextureCacheMaximumTextureAgeKey的位置附近,有以下注释: // textureAttributes - reserved for future use 这里没有任何定义。因此,显然没有可接受的键或值 KCVMetalTextureCamaximumTextureAgeKey 默认情况下,纹理会在一秒钟后从缓存中老化。要完全禁用老化机制,请将

有人知道什么理由吗?可接受的键和值?

在头文件CVMetalTextureCache.h中,在定义缓存属性(如
kCVMetalTextureCacheMaximumTextureAgeKey
的位置附近,有以下注释:

// textureAttributes - reserved for future use
这里没有任何定义。因此,显然没有可接受的键或值

KCVMetalTextureCamaximumTextureAgeKey 默认情况下,纹理会在一秒钟后从缓存中老化。要完全禁用老化机制,请将最大纹理老化设置为零

用法示例:

NSDictionary *cacheAttributes = @{
                                      (NSString*)kCVMetalTextureCacheMaximumTextureAgeKey: @(0),
                                      };