diff --git a/testing/BUILD.gn b/testing/BUILD.gn index 52032e0cdaee6c32bce6a2df300aa40cf4481da8..a1028b0f18952cd486df816c1b7b8bf6e63bf45f 100644 --- a/testing/BUILD.gn +++ b/testing/BUILD.gn @@ -81,12 +81,12 @@ if (current_toolchain == host_toolchain) { ] } - # All targets on all platforms should be able to the Metal utilities. On - # platforms where Metal in not available, the tests must be skipped or + # All targets on all platforms should be able to use the Metal utilities. On + # platforms where Metal is not available, the tests must be skipped or # implemented to use another available client rendering API. This is usually # either OpenGL which is portably implemented via SwiftShader or the software # backend. This way, all tests compile on all platforms but the Metal backend - # exercised on platforms where Metal itself is available. + # is exercised on platforms where Metal itself is available. source_set("metal") { testonly = true @@ -107,28 +107,28 @@ if (current_toolchain == host_toolchain) { "$flutter_root/fml", ] } -} -test_fixtures("testing_fixtures") { - fixtures = [] -} + test_fixtures("testing_fixtures") { + fixtures = [] + } -# The //flutter/testing library provides utility methods to other test targets. -# This test target tests the testing utilities. -executable("testing_unittests") { - testonly = true + # The //flutter/testing library provides utility methods to other test targets. + # This test target tests the testing utilities. + executable("testing_unittests") { + testonly = true - sources = [ - "$flutter_root/testing/test_metal_surface_unittests.cc", - ] + sources = [ + "$flutter_root/testing/test_metal_surface_unittests.cc", + ] - deps = [ - ":dart", - ":metal", - ":opengl", - ":skia", - ":testing", - ":testing_fixtures", - ":testing_lib", - ] + deps = [ + ":dart", + ":metal", + ":opengl", + ":skia", + ":testing", + ":testing_fixtures", + ":testing_lib", + ] + } } diff --git a/testing/test_metal_surface_impl.mm b/testing/test_metal_surface_impl.mm index 679a4c0fa36f07b61441ec3412b0b7f1ec125291..9f34530e0ab5963161f7f4ac7cb6774c64d2ab14 100644 --- a/testing/test_metal_surface_impl.mm +++ b/testing/test_metal_surface_impl.mm @@ -30,14 +30,14 @@ TestMetalSurfaceImpl::TestMetalSurfaceImpl(SkISize surface_size) { return; } - auto texture_descriptor = fml::scoped_nsobject{[[MTLTextureDescriptor - texture2DDescriptorWithPixelFormat:MTLPixelFormatBGRA8Unorm - width:surface_size.width() - height:surface_size.height() - mipmapped:NO] retain]}; + 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 wrote to the + // 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; @@ -46,8 +46,8 @@ TestMetalSurfaceImpl::TestMetalSurfaceImpl(SkISize surface_size) { return; } - auto texture = fml::scoped_nsobject{ - [device.get() newTextureWithDescriptor:texture_descriptor.get()]}; + auto texture = + fml::scoped_nsobject{[device.get() newTextureWithDescriptor:texture_descriptor.get()]}; if (!texture) { FML_LOG(ERROR) << "Could not create texture from texture descriptor."; @@ -85,8 +85,8 @@ TestMetalSurfaceImpl::TestMetalSurfaceImpl(SkISize surface_size) { kBGRA_8888_SkColorType, // color type nullptr, // color space nullptr, // surface properties - nullptr, // release proc (texture is already ref counted in sk_cf_obj) - nullptr // release context + nullptr, // release proc (texture is already ref counted in sk_cf_obj) + nullptr // release context ); if (!surface) {