[iOS] Remove deprecated metal texture cache and commandqueue (flutter/engine#34688)

This commit is contained in:
Wu Zhong
2022-07-19 10:07:47 +08:00
committed by GitHub
parent e63f213a28
commit 309a65a183
2 changed files with 0 additions and 21 deletions

View File

@@ -34,8 +34,6 @@ class IOSContextMetalSkia final : public IOSContext {
private:
fml::scoped_nsobject<FlutterDarwinContextMetal> darwin_context_metal_;
fml::scoped_nsprotocol<id<MTLCommandQueue>> main_command_queue_;
fml::CFRef<CVMetalTextureCacheRef> texture_cache_;
// |IOSContext|
sk_sp<GrDirectContext> CreateResourceContext() override;

View File

@@ -15,25 +15,6 @@ namespace flutter {
IOSContextMetalSkia::IOSContextMetalSkia(MsaaSampleCount msaa_samples) : IOSContext(msaa_samples) {
darwin_context_metal_ = fml::scoped_nsobject<FlutterDarwinContextMetal>{
[[FlutterDarwinContextMetal alloc] initWithDefaultMTLDevice]};
if (!darwin_context_metal_) {
return;
}
main_command_queue_.reset([darwin_context_metal_.get().commandQueue retain]);
CVMetalTextureCacheRef texture_cache_raw = NULL;
auto cv_return = CVMetalTextureCacheCreate(kCFAllocatorDefault, // allocator
NULL, // cache attributes (NULL default)
darwin_context_metal_.get().device, // metal device
NULL, // texture attributes (NULL default)
&texture_cache_raw // [out] cache
);
if (cv_return != kCVReturnSuccess) {
FML_DLOG(ERROR) << "Could not create Metal texture cache.";
return;
}
texture_cache_.Reset(texture_cache_raw);
}
IOSContextMetalSkia::~IOSContextMetalSkia() = default;