Remove dead code - we don't use this MTLTextureDescriptor we create in TestMetalSurfaceImpl::Init (flutter/engine#30977)

This commit is contained in:
George Wright 2022-01-21 11:57:45 -08:00 committed by GitHub
parent 340d9134de
commit 3ac06a37d4

View File

@ -16,22 +16,6 @@ namespace flutter {
void TestMetalSurfaceImpl::Init(const TestMetalContext::TextureInfo& texture_info,
const SkISize& surface_size) {
auto texture_descriptor = fml::scoped_nsobject{
[[MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm
width:surface_size.width()
height:surface_size.height()
mipmapped:NO] retain]};
// The most pessimistic option and disables all optimizations but allows tests
// the most flexible access to the surface. They may read and write to the
// surface from shaders or use as a pixel view.
texture_descriptor.get().usage = MTLTextureUsageUnknown;
if (!texture_descriptor) {
FML_LOG(ERROR) << "Invalid texture descriptor.";
return;
}
id<MTLTexture> texture = (__bridge id<MTLTexture>)texture_info.texture;
GrMtlTextureInfo skia_texture_info;