Skip to content

Commit

Permalink
[iOS] Remove deprecated metal texture cache and commandqueue (flutter…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw authored Jul 19, 2022
1 parent 54d0d94 commit 500fecb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions shell/platform/darwin/ios/ios_context_metal_skia.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
19 changes: 0 additions & 19 deletions shell/platform/darwin/ios/ios_context_metal_skia.mm
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,6 @@
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;
Expand Down

0 comments on commit 500fecb

Please sign in to comment.