Flutter iOS Embedder
rendering_api_selection.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_
7 
8 #include <objc/runtime.h>
9 
10 #include "flutter/fml/macros.h"
11 
12 namespace flutter {
13 
14 // Returns the CoreAnimation layer class to back a Flutter view. Fails fast if
15 // no Metal device is available.
17 
18 } // namespace flutter
19 
20 // Flutter supports Metal on all devices with Apple A7 SoC or above that have
21 // been updated to or past iOS 10.0. The processor was selected as it is the
22 // first version at which Metal was supported. The iOS version floor was
23 // selected due to the availability of features used by Skia.
24 // Support for Metal on simulators was added by Apple in the SDK for iOS 13.
25 #if TARGET_OS_SIMULATOR
26 #define METAL_IOS_VERSION_BASELINE 13.0
27 #else
28 #define METAL_IOS_VERSION_BASELINE 10.0
29 #endif // TARGET_OS_SIMULATOR
30 
31 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_
Class GetCoreAnimationLayerClass()