20 const fml::scoped_nsobject<CALayer>& layer) {
25 if ([layer.get() isKindOfClass:[CAMetalLayer
class]]) {
26 switch (context->GetBackend()) {
29 return std::make_unique<IOSSurfaceMetalSkia>(
30 fml::scoped_nsobject<CAMetalLayer>((CAMetalLayer*)layer.get()),
34 FML_LOG(FATAL) <<
"Impeller opt-out unavailable.";
39 return std::make_unique<IOSSurfaceMetalImpeller>(
40 fml::scoped_nsobject<CAMetalLayer>((CAMetalLayer*)layer.get()),
47 return std::make_unique<IOSSurfaceNoop>(std::move(context));
50 return std::make_unique<IOSSurfaceSoftware>(layer,
56 : ios_context_(std::move(ios_context)) {
57 FML_DCHECK(ios_context_);