File tree 2 files changed +11
-0
lines changed
impeller/renderer/backend/metal
2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ namespace impeller {
14
14
15
15
class SurfaceMTL final : public Surface {
16
16
public:
17
+ #pragma GCC diagnostic push
18
+ // Disable the diagnostic for iOS Simulators. Metal without emulation isn't
19
+ // available prior to iOS 13 and that's what the simulator headers say when
20
+ // support for CAMetalLayer begins. CAMetalLayer is available on iOS 8.0 and
21
+ // above which is well below Flutters support level.
22
+ #pragma GCC diagnostic ignored "-Wunguarded-availability-new"
17
23
// ----------------------------------------------------------------------------
18
24
// / @brief Wraps the current drawable of the given Metal layer to create
19
25
// / a surface Impeller can render to. The surface must be created
@@ -29,6 +35,7 @@ class SurfaceMTL final : public Surface {
29
35
static std::unique_ptr<Surface> WrapCurrentMetalLayerDrawable (
30
36
std::shared_ptr<Context> context,
31
37
CAMetalLayer* layer);
38
+ #pragma GCC diagnostic pop
32
39
33
40
// |Surface|
34
41
~SurfaceMTL () override ;
Original file line number Diff line number Diff line change 12
12
13
13
namespace impeller {
14
14
15
+ #pragma GCC diagnostic push
16
+ #pragma GCC diagnostic ignored "-Wunguarded-availability-new"
17
+
15
18
std::unique_ptr<Surface> SurfaceMTL::WrapCurrentMetalLayerDrawable (
16
19
std::shared_ptr<Context> context,
17
20
CAMetalLayer * layer) {
114
117
[drawable_ present ];
115
118
return true ;
116
119
}
120
+ #pragma GCC diagnostic pop
117
121
118
122
} // namespace impeller
You can’t perform that action at this time.
0 commit comments