IWYU: add some missing includes failing with libstdc++13/14 (#56822)
Fixes builds of engine with libstdc++13 and libstdc++14.
*List which issues are fixed by this PR. You must list at least one issue.*
closes https://github.com/flutter/flutter/issues/159513
*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
diff --git a/flow/paint_region.h b/flow/paint_region.h
index 52f2976..34b7ac1 100644
--- a/flow/paint_region.h
+++ b/flow/paint_region.h
@@ -5,6 +5,7 @@
#ifndef FLUTTER_FLOW_PAINT_REGION_H_
#define FLUTTER_FLOW_PAINT_REGION_H_
+#include <memory>
#include <utility>
#include <vector>
#include "flutter/fml/logging.h"
diff --git a/fml/cpu_affinity.cc b/fml/cpu_affinity.cc
index 0342c85..a580c9d 100644
--- a/fml/cpu_affinity.cc
+++ b/fml/cpu_affinity.cc
@@ -5,6 +5,7 @@
#include "flutter/fml/cpu_affinity.h"
#include "flutter/fml/build_config.h"
+#include <cstdint>
#include <fstream>
#include <optional>
#include <string>
diff --git a/fml/cpu_affinity.h b/fml/cpu_affinity.h
index c1d8498..c644472 100644
--- a/fml/cpu_affinity.h
+++ b/fml/cpu_affinity.h
@@ -5,6 +5,7 @@
#ifndef FLUTTER_FML_CPU_AFFINITY_H_
#define FLUTTER_FML_CPU_AFFINITY_H_
+#include <cstdint>
#include <optional>
#include <string>
#include <vector>
diff --git a/fml/synchronization/sync_switch.cc b/fml/synchronization/sync_switch.cc
index 463b6a0..9421e30 100644
--- a/fml/synchronization/sync_switch.cc
+++ b/fml/synchronization/sync_switch.cc
@@ -5,6 +5,7 @@
#include "flutter/fml/synchronization/sync_switch.h"
#include <algorithm>
+#include <mutex>
namespace fml {
diff --git a/impeller/core/runtime_types.h b/impeller/core/runtime_types.h
index b38d61b..1d8ca60 100644
--- a/impeller/core/runtime_types.h
+++ b/impeller/core/runtime_types.h
@@ -6,6 +6,7 @@
#define FLUTTER_IMPELLER_CORE_RUNTIME_TYPES_H_
#include <cstddef>
+#include <cstdint>
#include <optional>
#include <string>
#include <vector>
diff --git a/impeller/geometry/path.h b/impeller/geometry/path.h
index d81b3cb..86263aa 100644
--- a/impeller/geometry/path.h
+++ b/impeller/geometry/path.h
@@ -6,6 +6,7 @@
#define FLUTTER_IMPELLER_GEOMETRY_PATH_H_
#include <functional>
+#include <memory>
#include <optional>
#include <tuple>
#include <vector>
diff --git a/impeller/geometry/size.h b/impeller/geometry/size.h
index b31970f..2c609cd 100644
--- a/impeller/geometry/size.h
+++ b/impeller/geometry/size.h
@@ -7,6 +7,7 @@
#include <algorithm>
#include <cmath>
+#include <cstdint>
#include <limits>
#include <ostream>
#include <string>
diff --git a/impeller/typographer/rectangle_packer.cc b/impeller/typographer/rectangle_packer.cc
index 3ec7464..f9a7be8 100644
--- a/impeller/typographer/rectangle_packer.cc
+++ b/impeller/typographer/rectangle_packer.cc
@@ -5,6 +5,7 @@
#include "impeller/typographer/rectangle_packer.h"
#include <algorithm>
+#include <memory>
#include <vector>
#include "flutter/fml/logging.h"
diff --git a/impeller/typographer/rectangle_packer.h b/impeller/typographer/rectangle_packer.h
index 817bc66..d8b1e1c 100644
--- a/impeller/typographer/rectangle_packer.h
+++ b/impeller/typographer/rectangle_packer.h
@@ -9,6 +9,7 @@
#include "impeller/geometry/scalar.h"
#include <cstdint>
+#include <memory>
namespace impeller {
diff --git a/runtime/dart_service_isolate.h b/runtime/dart_service_isolate.h
index a6fc32d..439b49c 100644
--- a/runtime/dart_service_isolate.h
+++ b/runtime/dart_service_isolate.h
@@ -6,6 +6,7 @@
#define FLUTTER_RUNTIME_DART_SERVICE_ISOLATE_H_
#include <functional>
+#include <memory>
#include <mutex>
#include <set>
#include <string>
diff --git a/shell/platform/glfw/flutter_glfw.cc b/shell/platform/glfw/flutter_glfw.cc
index b00bab8..b2cdd11 100644
--- a/shell/platform/glfw/flutter_glfw.cc
+++ b/shell/platform/glfw/flutter_glfw.cc
@@ -7,6 +7,7 @@
#include <GLFW/glfw3.h>
#include <algorithm>
+#include <atomic>
#include <cassert>
#include <chrono>
#include <cstdlib>
diff --git a/third_party/tonic/filesystem/filesystem/file.h b/third_party/tonic/filesystem/filesystem/file.h
index be83b0f..0e1aece 100644
--- a/third_party/tonic/filesystem/filesystem/file.h
+++ b/third_party/tonic/filesystem/filesystem/file.h
@@ -5,6 +5,7 @@
#ifndef FILESYSTEM_FILE_H_
#define FILESYSTEM_FILE_H_
+#include <cstdint>
#include <string>
#include <vector>
diff --git a/vulkan/vulkan_surface.h b/vulkan/vulkan_surface.h
index 3455425..fafd90a 100644
--- a/vulkan/vulkan_surface.h
+++ b/vulkan/vulkan_surface.h
@@ -5,6 +5,8 @@
#ifndef FLUTTER_VULKAN_VULKAN_SURFACE_H_
#define FLUTTER_VULKAN_VULKAN_SURFACE_H_
+#include <memory>
+
#include "flutter/fml/macros.h"
#include "flutter/vulkan/procs/vulkan_handle.h"
#include "third_party/skia/include/core/SkSize.h"