File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
impeller/renderer/backend/metal Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ namespace impeller {
1414
1515class SurfaceMTL final : public Surface {
1616 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"
1723 // ----------------------------------------------------------------------------
1824 // / @brief Wraps the current drawable of the given Metal layer to create
1925 // / a surface Impeller can render to. The surface must be created
@@ -29,6 +35,7 @@ class SurfaceMTL final : public Surface {
2935 static std::unique_ptr<Surface> WrapCurrentMetalLayerDrawable (
3036 std::shared_ptr<Context> context,
3137 CAMetalLayer* layer);
38+ #pragma GCC diagnostic pop
3239
3340 // |Surface|
3441 ~SurfaceMTL () override ;
Original file line number Diff line number Diff line change 1212
1313namespace impeller {
1414
15+ #pragma GCC diagnostic push
16+ #pragma GCC diagnostic ignored "-Wunguarded-availability-new"
17+
1518std::unique_ptr<Surface> SurfaceMTL::WrapCurrentMetalLayerDrawable (
1619 std::shared_ptr<Context> context,
1720 CAMetalLayer * layer) {
114117 [drawable_ present ];
115118 return true ;
116119}
120+ #pragma GCC diagnostic pop
117121
118122} // namespace impeller
You can’t perform that action at this time.
0 commit comments