[includes] Fix includes on tests/

Not included tests/graphite and tests/sksl

Most of these changes are mechanical, except for:
 - include/gpu/dawn/GrDawnTypes.h to mark Dawn headers as exported
   (seems like the intent).
 - tests/DeferredDisplayListTest.cpp absorbing tests from
   tests/VkProtectedContextTest.cpp to avoid two test files from
   having a dependency on one another.

The follow-on CL enforces IWYU on these files.

Change-Id: I09138827001f28cbe0a9e52ac1025d4e547be644
Bug: skia:13052
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/589402
Reviewed-by: Ben Wagner <[email protected]>
Owners-Override: Kevin Lubick <[email protected]>
diff --git a/include/gpu/dawn/GrDawnTypes.h b/include/gpu/dawn/GrDawnTypes.h
index 70a2f9f..be48a7e 100644
--- a/include/gpu/dawn/GrDawnTypes.h
+++ b/include/gpu/dawn/GrDawnTypes.h
@@ -22,7 +22,7 @@
 #undef None
 static constexpr int None = 0L;
 #endif
-#include "webgpu/webgpu_cpp.h"
+#include "webgpu/webgpu_cpp.h" // IWYU pragma: export
 
 struct GrDawnTextureInfo {
     wgpu::Texture       fTexture;
diff --git a/src/codec/SkAndroidCodec.cpp b/src/codec/SkAndroidCodec.cpp
index 5fc6764..494b173 100644
--- a/src/codec/SkAndroidCodec.cpp
+++ b/src/codec/SkAndroidCodec.cpp
@@ -13,10 +13,14 @@
 #include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
 #include "modules/skcms/skcms.h"
-#include "src/codec/SkAndroidCodecAdapter.h"
 #include "src/codec/SkCodecPriv.h"
 #include "src/codec/SkSampledCodec.h"
 
+#if defined(SK_CODEC_DECODES_WEBP) || defined(SK_CODEC_DECODES_RAW) || \
+        defined(SK_HAS_WUFFS_LIBRARY) || defined(SK_CODEC_DECODES_AVIF)
+#include "src/codec/SkAndroidCodecAdapter.h"
+#endif
+
 #include <algorithm>
 #include <cstdint>
 #include <utility>
diff --git a/src/images/SkImageEncoder.cpp b/src/images/SkImageEncoder.cpp
index 91ef92a..ebc5233 100644
--- a/src/images/SkImageEncoder.cpp
+++ b/src/images/SkImageEncoder.cpp
@@ -22,21 +22,25 @@
 #include "src/images/SkImageEncoderPriv.h"
 #endif
 
-#ifndef SK_ENCODE_JPEG
+#if !defined(SK_ENCODE_JPEG)|| !defined(SK_ENCODE_PNG) || !defined(SK_ENCODE_WEBP)
+#include <memory>
+#endif
+
+#if !defined(SK_ENCODE_JPEG)
 bool SkJpegEncoder::Encode(SkWStream*, const SkPixmap&, const Options&) { return false; }
 std::unique_ptr<SkEncoder> SkJpegEncoder::Make(SkWStream*, const SkPixmap&, const Options&) {
     return nullptr;
 }
 #endif
 
-#ifndef SK_ENCODE_PNG
+#if !defined(SK_ENCODE_PNG)
 bool SkPngEncoder::Encode(SkWStream*, const SkPixmap&, const Options&) { return false; }
 std::unique_ptr<SkEncoder> SkPngEncoder::Make(SkWStream*, const SkPixmap&, const Options&) {
     return nullptr;
 }
 #endif
 
-#ifndef SK_ENCODE_WEBP
+#if !defined(SK_ENCODE_WEBP)
 bool SkWebpEncoder::Encode(SkWStream*, const SkPixmap&, const Options&) { return false; }
 #endif
 
diff --git a/tests/AAClipTest.cpp b/tests/AAClipTest.cpp
index 350b631..ae6e79d 100644
--- a/tests/AAClipTest.cpp
+++ b/tests/AAClipTest.cpp
@@ -5,9 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkClipOp.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
@@ -23,7 +26,10 @@
 #include "src/core/SkRasterClip.h"
 #include "tests/Test.h"
 
-#include <string.h>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <string>
 
 static bool operator==(const SkMask& a, const SkMask& b) {
     if (a.fFormat != b.fFormat || a.fBounds != b.fBounds) {
diff --git a/tests/AdvancedBlendTest.cpp b/tests/AdvancedBlendTest.cpp
index 0e275a7..8000ddd 100644
--- a/tests/AdvancedBlendTest.cpp
+++ b/tests/AdvancedBlendTest.cpp
@@ -18,11 +18,13 @@
 #include "src/gpu/ganesh/GrUserStencilSettings.h"
 #include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/effects/GrCustomXfermode.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <utility>
 
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(AdvancedBlendTest,
                                        reporter,
                                        ctxInfo,
diff --git a/tests/AndroidCodecTest.cpp b/tests/AndroidCodecTest.cpp
index 10b3116..12dac84 100644
--- a/tests/AndroidCodecTest.cpp
+++ b/tests/AndroidCodecTest.cpp
@@ -7,24 +7,20 @@
 
 #include "include/codec/SkAndroidCodec.h"
 #include "include/codec/SkCodec.h"
-#include "include/core/SkBitmap.h"
-#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
 #include "include/core/SkData.h"
 #include "include/core/SkEncodedImageFormat.h"
-#include "include/core/SkImageGenerator.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
 #include "modules/skcms/skcms.h"
-#include "src/codec/SkCodecImageGenerator.h"
-#include "src/core/SkPixmapPriv.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
-#include <string.h>
+#include <string>
+#include <cstdint>
 #include <initializer_list>
 #include <memory>
 #include <utility>
diff --git a/tests/AnimatedImageTest.cpp b/tests/AnimatedImageTest.cpp
index 707e0e7..05217de 100644
--- a/tests/AnimatedImageTest.cpp
+++ b/tests/AnimatedImageTest.cpp
@@ -8,12 +8,14 @@
 #include "include/android/SkAnimatedImage.h"
 #include "include/codec/SkAndroidCodec.h"
 #include "include/codec/SkCodec.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkData.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPicture.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkString.h"
@@ -24,6 +26,7 @@
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <cstddef>
 #include <initializer_list>
 #include <memory>
 #include <utility>
diff --git a/tests/AnnotationTest.cpp b/tests/AnnotationTest.cpp
index e4bd821..acb68da 100644
--- a/tests/AnnotationTest.cpp
+++ b/tests/AnnotationTest.cpp
@@ -20,8 +20,8 @@
 #include "include/docs/SkPDFDocument.h"
 #include "tests/Test.h"
 
-#include <string.h>
-#include <memory>
+#include <string>
+#include <cstddef>
 
 /** Returns true if data (may contain null characters) contains needle (null
  *  terminated). */
diff --git a/tests/ApplyGammaTest.cpp b/tests/ApplyGammaTest.cpp
index fd154df..223228f 100644
--- a/tests/ApplyGammaTest.cpp
+++ b/tests/ApplyGammaTest.cpp
@@ -14,22 +14,28 @@
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/private/SkTemplates.h"
-#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkOpts.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrShaderCaps.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
-#include <math.h>
+#include <algorithm>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
 
+struct GrContextOptions;
+
 /** convert 0..1 linear value to 0..1 srgb */
 static float linear_to_srgb(float linear) {
     if (linear <= 0.0031308) {
diff --git a/tests/ArenaAllocTest.cpp b/tests/ArenaAllocTest.cpp
index ff59ea1..138ea8d 100644
--- a/tests/ArenaAllocTest.cpp
+++ b/tests/ArenaAllocTest.cpp
@@ -5,14 +5,15 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkRefCnt.h"
 #include "include/core/SkTypes.h"
 #include "src/core/SkArenaAlloc.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <limits>
 #include <memory>
 #include <new>
-#include <type_traits>
 
 DEF_TEST(ArenaAlloc, r) {
     static int created = 0,
diff --git a/tests/AvifTest.cpp b/tests/AvifTest.cpp
index d674e61..74df643 100644
--- a/tests/AvifTest.cpp
+++ b/tests/AvifTest.cpp
@@ -5,14 +5,15 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkTypes.h"
+
+#ifdef SK_CODEC_DECODES_AVIF
 #include "include/codec/SkCodec.h"
 #include "include/core/SkBitmap.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
-#ifdef SK_CODEC_DECODES_AVIF
-
 struct AvifTestCase {
     const char* path;
     int imageWidth;
diff --git a/tests/BackendAllocationTest.cpp b/tests/BackendAllocationTest.cpp
index 6e9dc28..fbbcc4a 100644
--- a/tests/BackendAllocationTest.cpp
+++ b/tests/BackendAllocationTest.cpp
@@ -5,39 +5,86 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkCanvas.h"
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
-#include "include/core/SkSurfaceCharacterization.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
+#include "src/gpu/RefCntedCallback.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorInfo.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
+#include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrResourceCache.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
-#include "src/gpu/ganesh/effects/GrBlendFragmentProcessor.h"
 #include "src/gpu/ganesh/effects/GrTextureEffect.h"
-#include "src/image/SkImage_Base.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 #include "tools/ToolUtils.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
 
-#ifdef SK_GL
-#include "src/gpu/ganesh/gl/GrGLCaps.h"
-#include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
-#include "src/gpu/ganesh/gl/GrGLGpu.h"
-#include "src/gpu/ganesh/gl/GrGLUtil.h"
+#include <array>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+#if defined(SK_DAWN)
+#include <dawn/webgpu_cpp.h>
 #endif
 
-#ifdef SK_METAL
+#if defined(SK_GL)
+#include "include/gpu/gl/GrGLInterface.h"
+#include "include/gpu/gl/GrGLTypes.h"
+#include "src/gpu/ganesh/gl/GrGLCaps.h"
+#include "src/gpu/ganesh/gl/GrGLContext.h"
+#include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
+#include "src/gpu/ganesh/gl/GrGLGpu.h"
+#include "tools/gpu/gl/GLTestContext.h"
+#endif
+
+#if defined(SK_METAL)
 #include "include/gpu/mtl/GrMtlTypes.h"
 #include "src/gpu/ganesh/mtl/GrMtlCppUtil.h"
 #endif
 
-#ifdef SK_DIRECT3D
+#if defined(SK_DIRECT3D)
 #include "include/private/gpu/ganesh/GrD3DTypesMinimal.h"
 #endif
 
+#if defined(SK_VULKAN)
+#include "include/gpu/vk/GrVkTypes.h"
+#include "src/gpu/ganesh/vk/GrVkCaps.h"
+#include <vulkan/vulkan_core.h>
+#endif
+
 using sk_gpu_test::ManagedBackendTexture;
 
 // Test wrapping of GrBackendObjects in SkSurfaces and SkImages (non-static since used in Mtl test)
@@ -887,8 +934,6 @@
 
 #ifdef SK_VULKAN
 
-#include "src/gpu/ganesh/vk/GrVkCaps.h"
-
 DEF_GANESH_TEST_FOR_VULKAN_CONTEXT(VkBackendAllocationTest,
                                    reporter,
                                    ctxInfo,
diff --git a/tests/BackendSurfaceMutableStateTest.cpp b/tests/BackendSurfaceMutableStateTest.cpp
index a7e4fdd..3a66788 100644
--- a/tests/BackendSurfaceMutableStateTest.cpp
+++ b/tests/BackendSurfaceMutableStateTest.cpp
@@ -9,19 +9,33 @@
 #include "tests/Test.h"
 
 #ifdef SK_VULKAN
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkRefCnt.h"
+#include "include/gpu/GpuTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/MutableTextureState.h"
 #include "include/gpu/vk/GrVkTypes.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/vk/GrVkCaps.h"
 #include "src/gpu/ganesh/vk/GrVkGpu.h"
+#include "src/gpu/ganesh/vk/GrVkImage.h"
 #include "src/gpu/ganesh/vk/GrVkTexture.h"
-#include "src/image/SkImage_Base.h"
+#include "tests/CtsEnforcement.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <vulkan/vulkan_core.h>
+#include <cstdint>
+
+class GrTexture;
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_VULKAN_CONTEXT(VkBackendSurfaceMutableStateTest,
                                    reporter,
                                    ctxInfo,
diff --git a/tests/BadIcoTest.cpp b/tests/BadIcoTest.cpp
index 41aaa3e..74c39eb 100644
--- a/tests/BadIcoTest.cpp
+++ b/tests/BadIcoTest.cpp
@@ -14,6 +14,8 @@
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <array>
+#include <cstddef>
 #include <memory>
 #include <utility>
 
diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp
index 5996277..e03546d 100644
--- a/tests/BitmapCopyTest.cpp
+++ b/tests/BitmapCopyTest.cpp
@@ -5,9 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorPriv.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
@@ -18,6 +21,9 @@
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <array>
+#include <cstddef>
+
 static void init_src(const SkBitmap& bitmap) {
     if (bitmap.getPixels()) {
         bitmap.eraseColor(SK_ColorWHITE);
@@ -125,9 +131,6 @@
     }
 }
 
-#include "include/core/SkColorPriv.h"
-#include "src/core/SkUtils.h"
-
 /**
  *  Construct 4x4 pixels where we can look at a color and determine where it should be in the grid.
  *  alpha = 0xFF, blue = 0x80, red = x, green = y
diff --git a/tests/BitmapGetColorTest.cpp b/tests/BitmapGetColorTest.cpp
index 64885e2..ec33059 100644
--- a/tests/BitmapGetColorTest.cpp
+++ b/tests/BitmapGetColorTest.cpp
@@ -5,13 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkTypes.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
 DEF_TEST(GetColor, reporter) {
     static const struct Rec {
         SkColorType fColorType;
diff --git a/tests/BitmapTest.cpp b/tests/BitmapTest.cpp
index 9d33bd4..bccbed0 100644
--- a/tests/BitmapTest.cpp
+++ b/tests/BitmapTest.cpp
@@ -5,9 +5,11 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMallocPixelRef.h"
 #include "include/core/SkPixelRef.h"
@@ -16,10 +18,12 @@
 #include "include/core/SkScalar.h"
 #include "include/core/SkTypes.h"
 #include "include/private/SkFloatingPoint.h"
+#include "include/private/SkMalloc.h"
 #include "include/utils/SkRandom.h"
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <cstddef>
 #include <initializer_list>
 
 static void test_peekpixels(skiatest::Reporter* reporter) {
diff --git a/tests/BlendTest.cpp b/tests/BlendTest.cpp
index 970587e..3a18841 100644
--- a/tests/BlendTest.cpp
+++ b/tests/BlendTest.cpp
@@ -5,25 +5,29 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
-#include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
 
 #include <initializer_list>
 #include <vector>
 
+struct GrContextOptions;
 struct Results { int diffs, diffs_0x00, diffs_0xff, diffs_by_1; };
 
 static bool acceptable(const Results& r) {
diff --git a/tests/BlitMaskClip.cpp b/tests/BlitMaskClip.cpp
index 967b1b4..8c4b1d4 100644
--- a/tests/BlitMaskClip.cpp
+++ b/tests/BlitMaskClip.cpp
@@ -12,7 +12,8 @@
 #include "src/core/SkMask.h"
 #include "tests/Test.h"
 
-#include <string.h>
+#include <cstdint>
+#include <string>
 
 class TestBlitter : public SkBlitter {
 public:
diff --git a/tests/BlurTest.cpp b/tests/BlurTest.cpp
index f641b77..6e5bfa6 100644
--- a/tests/BlurTest.cpp
+++ b/tests/BlurTest.cpp
@@ -5,15 +5,15 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
-#include "include/core/SkBlendMode.h"
 #include "include/core/SkBlurTypes.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorPriv.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMaskFilter.h"
-#include "include/core/SkMath.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
 #include "include/core/SkPixmap.h"
@@ -22,7 +22,6 @@
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkScalar.h"
-#include "include/core/SkShader.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
@@ -36,14 +35,18 @@
 #include "src/core/SkMaskFilterBase.h"
 #include "src/core/SkMathPriv.h"
 #include "src/effects/SkEmbossMaskFilter.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <math.h>
 #include <string.h>
+#include <array>
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
-#include <utility>
+
+struct GrContextOptions;
 
 #define WRITE_CSV 0
 
diff --git a/tests/BulkRectTest.cpp b/tests/BulkRectTest.cpp
index 22ec3cb..c50634c 100644
--- a/tests/BulkRectTest.cpp
+++ b/tests/BulkRectTest.cpp
@@ -5,18 +5,51 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkCanvas.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkBlendModePriv.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorSpaceXform.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrOpsTypes.h"
+#include "src/gpu/ganesh/GrPaint.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
+#include "src/gpu/ganesh/geometry/GrQuad.h"
 #include "src/gpu/ganesh/ops/FillRectOp.h"
+#include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "src/gpu/ganesh/ops/OpsTask.h"
 #include "src/gpu/ganesh/ops/TextureOp.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
+
 using namespace skgpu::ganesh;
 
 static std::unique_ptr<skgpu::v1::SurfaceDrawContext> new_SDC(GrRecordingContext* rContext) {
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index c666368..46b3c4d 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -5,9 +5,11 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
 #include "include/core/SkImageGenerator.h"
 #include "include/core/SkImageInfo.h"
@@ -18,6 +20,10 @@
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <memory>
 #include <utility>
 
 class TestImageGenerator : public SkImageGenerator {
diff --git a/tests/CanvasStateHelpers.h b/tests/CanvasStateHelpers.h
index 709d445..3058b3b 100644
--- a/tests/CanvasStateHelpers.h
+++ b/tests/CanvasStateHelpers.h
@@ -10,6 +10,8 @@
 
 #include "include/core/SkTypes.h"
 
+#include <cstdint>
+
 // See CanvasStateTest. These functions are either linked in to 'dm' directly (when this flag is
 // not defined), or built in a shared library that is dlopened by the test. In that case, they
 // should not be visible in 'dm', but the shared library will not have this flag set and compiles
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 936805f..0a4d16e 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -5,25 +5,33 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkClipOp.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPixmap.h"
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
 #include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
 #include "include/private/SkTDArray.h"
 #include "include/utils/SkCanvasStateUtils.h"
-#include "src/core/SkCanvasPriv.h"
 #include "src/core/SkTLazy.h"
 #include "tests/Test.h"
-#include "tools/flags/CommandLineFlags.h"
 
+#include <array>
+#include <cstdint>
 #include <cstring>
 
 class SkCanvasState;
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index b39eb8a..4ad19d0 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -10,6 +10,7 @@
 #include "include/core/SkCanvas.h"
 #include "include/core/SkClipOp.h"
 #include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkDocument.h"
 #include "include/core/SkFlattenable.h"
 #include "include/core/SkImageFilter.h"
@@ -23,11 +24,11 @@
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
-#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
 #include "include/core/SkVertices.h"
@@ -39,10 +40,19 @@
 #include "src/core/SkBigPicture.h"
 #include "src/core/SkImageFilter_Base.h"
 #include "src/core/SkRecord.h"
+#include "src/core/SkRecords.h"
 #include "src/core/SkSpecialImage.h"
 #include "src/utils/SkCanvasStack.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+class SkPicture;
+class SkReadBuffer;
+
 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
 #include "include/core/SkColorSpace.h"
 #include "include/private/SkColorData.h"
@@ -52,11 +62,6 @@
 #include "include/docs/SkPDFDocument.h"
 #endif
 
-#include <memory>
-#include <utility>
-
-class SkReadBuffer;
-
 struct ClipRectVisitor {
     skiatest::Reporter* r;
 
diff --git a/tests/ChecksumTest.cpp b/tests/ChecksumTest.cpp
index 30c5c6b..2017d40 100644
--- a/tests/ChecksumTest.cpp
+++ b/tests/ChecksumTest.cpp
@@ -5,12 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
 #include "include/private/SkChecksum.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkOpts.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <string>
+#include <string_view>
+
 DEF_TEST(Checksum, r) {
     // Put 128 random bytes into two identical buffers.  Any multiple of 4 will do.
     const size_t kBytes = SkAlign4(128);
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index 8ea1464..5ff2c6a 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -5,32 +5,40 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/private/SkColorData.h"
 #include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrColor.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/ops/ClearOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "src/gpu/ganesh/ops/OpsTask.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
+#include <array>
 #include <cstdint>
 #include <memory>
 
+class GrRecordingContext;
+
 using SurfaceDrawContext = skgpu::v1::SurfaceDrawContext;
 using ClearOp = skgpu::v1::ClearOp;
 
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index fda6024..6f8093b 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -5,30 +5,21 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkCanvas.h"
 #include "include/core/SkClipOp.h"
-#include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
-#include "include/core/SkPoint.h"
+#include "include/core/SkPathTypes.h"
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
-#include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
 #include "include/core/SkScalar.h"
-#include "include/core/SkSize.h"
-#include "include/core/SkString.h"
-#include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
-#include "include/effects/SkGradientShader.h"
-#include "include/private/SkTemplates.h"
-#include "include/utils/SkRandom.h"
 #include "src/core/SkClipStack.h"
 #include "tests/Test.h"
 
+#include <array>
 #include <cstring>
 #include <initializer_list>
-#include <new>
 
 static void test_assign_and_comparison(skiatest::Reporter* reporter) {
     SkClipStack s;
diff --git a/tests/ClipperTest.cpp b/tests/ClipperTest.cpp
index 1771821..a0cf589 100644
--- a/tests/ClipperTest.cpp
+++ b/tests/ClipperTest.cpp
@@ -17,6 +17,7 @@
 #include "src/core/SkLineClipper.h"
 #include "tests/Test.h"
 
+#include <array>
 #include <cstring>
 
 static void test_hairclipping(skiatest::Reporter* reporter) {
diff --git a/tests/CodecAnimTest.cpp b/tests/CodecAnimTest.cpp
index 8498d88..e3bd650 100644
--- a/tests/CodecAnimTest.cpp
+++ b/tests/CodecAnimTest.cpp
@@ -8,10 +8,14 @@
 #include "include/codec/SkAndroidCodec.h"
 #include "include/codec/SkCodec.h"
 #include "include/codec/SkCodecAnimation.h"
+#include "include/codec/SkEncodedOrigin.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkImage.h"
 #include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSize.h"
@@ -23,7 +27,7 @@
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
-#include <stdio.h>
+#include <cstdint>
 #include <cstring>
 #include <initializer_list>
 #include <memory>
diff --git a/tests/CodecExactReadTest.cpp b/tests/CodecExactReadTest.cpp
index d0bf695..d470f22 100644
--- a/tests/CodecExactReadTest.cpp
+++ b/tests/CodecExactReadTest.cpp
@@ -7,6 +7,7 @@
 
 #include "include/codec/SkCodec.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkRefCnt.h"
diff --git a/tests/CodecPartialTest.cpp b/tests/CodecPartialTest.cpp
index e27b4e2..ceb9cbe 100644
--- a/tests/CodecPartialTest.cpp
+++ b/tests/CodecPartialTest.cpp
@@ -18,6 +18,8 @@
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <algorithm>
+#include <cstddef>
 #include <cstring>
 #include <initializer_list>
 #include <memory>
diff --git a/tests/CodecRecommendedTypeTest.cpp b/tests/CodecRecommendedTypeTest.cpp
index e041c7e..9a2a06d 100644
--- a/tests/CodecRecommendedTypeTest.cpp
+++ b/tests/CodecRecommendedTypeTest.cpp
@@ -6,9 +6,11 @@
  */
 
 #include "include/codec/SkAndroidCodec.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkEncodedImageFormat.h"
 #include "include/core/SkImageEncoder.h"
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index 7be297c..a028c56 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -5,18 +5,14 @@
  * found in the LICENSE file.
  */
 
-// Make sure SkUserConfig.h is included so #defines are available on
-// Android.
-#include "include/core/SkTypes.h"
-#ifdef SK_ENABLE_ANDROID_UTILS
-#include "client_utils/android/FrontBufferedStream.h"
-#endif
 #include "include/codec/SkAndroidCodec.h"
 #include "include/codec/SkCodec.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkEncodedImageFormat.h"
 #include "include/core/SkImage.h"
@@ -31,7 +27,6 @@
 #include "include/core/SkStream.h"
 #include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
-#include "include/core/SkUnPreMultiply.h"
 #include "include/encode/SkJpegEncoder.h"
 #include "include/encode/SkPngEncoder.h"
 #include "include/encode/SkWebpEncoder.h"
@@ -49,9 +44,16 @@
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
-#include <png.h>
+#ifdef SK_ENABLE_ANDROID_UTILS
+#include "client_utils/android/FrontBufferedStream.h"
+#endif
 
+#include <png.h>
+#include <pngconf.h>
 #include <setjmp.h>
+
+#include <algorithm>
+#include <cstdint>
 #include <cstring>
 #include <initializer_list>
 #include <memory>
diff --git a/tests/ColorFilterTest.cpp b/tests/ColorFilterTest.cpp
index a0a4171..e250ef3 100644
--- a/tests/ColorFilterTest.cpp
+++ b/tests/ColorFilterTest.cpp
@@ -5,24 +5,39 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkFlattenable.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
 #include "include/core/SkTypes.h"
-#include "include/effects/SkColorMatrix.h"
+#include "include/effects/SkColorMatrix.h" // IWYU pragma: keep
 #include "include/effects/SkGradientShader.h"
+#include "include/gpu/GrDirectContext.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkAutoMalloc.h"
+#include "src/core/SkColorFilterBase.h"
 #include "src/core/SkColorFilterPriv.h"
 #include "src/core/SkReadBuffer.h"
+#include "src/core/SkVM.h"
 #include "src/core/SkWriteBuffer.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-class SkFlattenable;
+#include <cstddef>
+#include <utility>
+
+class SkArenaAlloc;
+struct GrContextOptions;
+struct SkStageRec;
 
 static sk_sp<SkColorFilter> reincarnate_colorfilter(SkFlattenable* obj) {
     SkBinaryWriteBuffer wb;
diff --git a/tests/ColorMatrixTest.cpp b/tests/ColorMatrixTest.cpp
index 50ad724..9312659 100644
--- a/tests/ColorMatrixTest.cpp
+++ b/tests/ColorMatrixTest.cpp
@@ -14,7 +14,6 @@
 #include "tests/Test.h"
 
 #include <cmath>
-#include <cstdlib>
 
 static inline void assert_color(skiatest::Reporter* reporter,
                                 SkColor expected, SkColor actual, int tolerance) {
diff --git a/tests/ColorPrivTest.cpp b/tests/ColorPrivTest.cpp
index 89f8d99..c69ded8 100644
--- a/tests/ColorPrivTest.cpp
+++ b/tests/ColorPrivTest.cpp
@@ -11,6 +11,8 @@
 #include "include/private/SkColorData.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 #define ASSERT(expr) REPORTER_ASSERT(r, expr)
 
 DEF_TEST(Splay, r) {
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp
index 4ca1df0..15adccf 100644
--- a/tests/ColorSpaceTest.cpp
+++ b/tests/ColorSpaceTest.cpp
@@ -12,17 +12,20 @@
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkTypes.h"
+#include "include/private/SkFloatingPoint.h"
 #include "modules/skcms/skcms.h"
 #include "src/core/SkColorSpacePriv.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
-#include <png.h>
-
-#include <string.h>
+#include <climits>
+#include <cstddef>
 #include <memory>
+#include <string>
 #include <utility>
 
+#include <png.h>
+
 static bool almost_equal(float a, float b) {
     return SkTAbs(a - b) < 0.001f;
 }
diff --git a/tests/CompressedBackendAllocationTest.cpp b/tests/CompressedBackendAllocationTest.cpp
index 2431a92..164db24 100644
--- a/tests/CompressedBackendAllocationTest.cpp
+++ b/tests/CompressedBackendAllocationTest.cpp
@@ -5,20 +5,48 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
-#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkCompressedDataUtils.h"
 #include "src/core/SkMipmap.h"
-#include "src/core/SkPaintPriv.h"
 #include "src/gpu/ganesh/GrBackendUtils.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/image/SkImage_Base.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
-#include "tools/ToolUtils.h"
+
+#include <algorithm>
+#include <cstddef>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+class GrRecordingContext;
+class SkPixmap;
+struct GrContextOptions;
 
 // Just verify that 'actual' is entirely 'expected'
 static void check_solid_pixmap(skiatest::Reporter* reporter,
diff --git a/tests/CopySurfaceTest.cpp b/tests/CopySurfaceTest.cpp
index d4b4ff0..27cbd97 100644
--- a/tests/CopySurfaceTest.cpp
+++ b/tests/CopySurfaceTest.cpp
@@ -5,30 +5,35 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
-#include "include/core/SkRefCnt.h"
 #include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrTypes.h"
 #include "include/private/SkTemplates.h"
-#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkOpts.h"
-#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/GrSurfaceProxy.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
+#include <memory>
 #include <utility>
 
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(CopySurface,
                                        reporter,
                                        ctxInfo,
diff --git a/tests/CubicMapTest.cpp b/tests/CubicMapTest.cpp
index a85f73b..e8fa0aa 100644
--- a/tests/CubicMapTest.cpp
+++ b/tests/CubicMapTest.cpp
@@ -9,6 +9,7 @@
 #include "include/core/SkPoint.h"
 #include "include/core/SkScalar.h"
 #include "include/core/SkTypes.h"
+#include "include/private/SkVx.h"
 #include "src/core/SkGeometry.h"
 #include "src/pathops/SkPathOpsCubic.h"
 #include "tests/Test.h"
diff --git a/tests/CullTestTest.cpp b/tests/CullTestTest.cpp
index b737463..879e2da 100644
--- a/tests/CullTestTest.cpp
+++ b/tests/CullTestTest.cpp
@@ -5,10 +5,15 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/gpu/tessellate/CullTest.h"
+#include "tests/Test.h"
+
+#include <initializer_list>
 
 namespace skgpu::tess {
 
diff --git a/tests/DMSAATest.cpp b/tests/DMSAATest.cpp
index 44aafd3..49cab50 100644
--- a/tests/DMSAATest.cpp
+++ b/tests/DMSAATest.cpp
@@ -5,16 +5,44 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/core/SkVertices.h"
+#include "include/gpu/GrContextOptions.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkBlendModePriv.h"
 #include "src/core/SkMatrixProvider.h"
-#include "src/core/SkSurfacePriv.h"
-#include "src/gpu/ganesh/GrStyle.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrPixmap.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <cstdint>
+#include <memory>
+#include <string>
+#include <utility>
 
 namespace {
 
diff --git a/tests/DashPathEffectTest.cpp b/tests/DashPathEffectTest.cpp
index 045a9dc..531c659 100644
--- a/tests/DashPathEffectTest.cpp
+++ b/tests/DashPathEffectTest.cpp
@@ -22,6 +22,8 @@
 #include "src/core/SkPathEffectBase.h"
 #include "tests/Test.h"
 
+#include <array>
+
 // crbug.com/348821 was rooted in SkDashPathEffect refusing to flatten and unflatten itself when
 // the effect is nonsense.  Here we test that it fails when passed nonsense parameters.
 
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index ba9c4be..92e8849 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -11,16 +11,14 @@
 #include "include/core/SkStream.h"
 #include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
-#include "include/private/SkTArray.h"
-#include "include/private/SkTemplates.h"
+#include "include/private/SkMalloc.h"
 #include "src/core/SkOSFile.h"
-#include "src/core/SkTaskGroup.h"
 #include "src/utils/SkOSPath.h"
 #include "tests/Test.h"
 
+#include <array>
 #include <cstdio>
 #include <cstring>
-#include <memory>
 
 static void test_is_equal(skiatest::Reporter* reporter,
                           const SkDataTable* a, const SkDataTable* b) {
diff --git a/tests/DebugLayerManagerTest.cpp b/tests/DebugLayerManagerTest.cpp
index ad65411..4f08955 100644
--- a/tests/DebugLayerManagerTest.cpp
+++ b/tests/DebugLayerManagerTest.cpp
@@ -5,14 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
 #include "include/core/SkPixmap.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "tests/Test.h"
 #include "tools/debugger/DebugLayerManager.h"
 
+#include <vector>
+
 // Adds one full update, one partial update, and requests one image a few frames later.
 static void test_basic(skiatest::Reporter* reporter) {
   // prepare supporting objects
diff --git a/tests/DefaultPathRendererTest.cpp b/tests/DefaultPathRendererTest.cpp
index 6de080f..a63b17a 100644
--- a/tests/DefaultPathRendererTest.cpp
+++ b/tests/DefaultPathRendererTest.cpp
@@ -11,27 +11,24 @@
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
 #include "include/core/SkRect.h"
-#include "include/core/SkRefCnt.h"
 #include "include/core/SkStrokeRec.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTypes.h"
-#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
-#include "include/gpu/GrTypes.h"
 #include "include/private/SkColorData.h"
 #include "include/private/gpu/ganesh/GrTypesPriv.h"
-#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrFragmentProcessor.h"
-#include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/GrPaint.h"
 #include "src/gpu/ganesh/GrStyle.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
+#include <memory>
 #include <utility>
 
 static void only_allow_default(GrContextOptions* options) {
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp
index bae78a3..9f5b33a 100644
--- a/tests/DeferredDisplayListTest.cpp
+++ b/tests/DeferredDisplayListTest.cpp
@@ -5,10 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkDeferredDisplayList.h"
 #include "include/core/SkDeferredDisplayListRecorder.h"
 #include "include/core/SkImage.h"
@@ -17,6 +19,7 @@
 #include "include/core/SkPromiseImageTexture.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkSurfaceCharacterization.h"
 #include "include/core/SkSurfaceProps.h"
@@ -26,35 +29,35 @@
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrRecordingContext.h"
 #include "include/gpu/GrTypes.h"
-#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkDeferredDisplayListPriv.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
-#include "src/gpu/ganesh/GrRenderTargetProxy.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/image/SkImage_GpuBase.h"
-#include "src/image/SkSurface_Gpu.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tests/TestUtils.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <cstddef>
 #include <initializer_list>
 #include <memory>
 #include <utility>
 
+struct GrContextOptions;
+
 #ifdef SK_GL
 #include "include/gpu/gl/GrGLTypes.h"
 #include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
 #endif
 
 #ifdef SK_VULKAN
+#include "include/gpu/vk/GrVkTypes.h"
 #include "src/gpu/ganesh/vk/GrVkCaps.h"
 #include "src/gpu/ganesh/vk/GrVkSecondaryCBDrawContext_impl.h"
+#include "tools/gpu/vk/VkTestHelper.h"
+#include <vulkan/vulkan_core.h>
 #endif
 
 class SurfaceParameters {
@@ -726,6 +729,21 @@
     DDLSurfaceCharacterizationTestImpl(context, reporter);
 }
 
+#if defined(SK_VULKAN)
+DEF_GANESH_TEST(VkProtectedContext_DDLSurfaceCharacterizationTest,
+                reporter,
+                ctxInfo,
+                CtsEnforcement::kNever) {
+    auto protectedTestHelper = std::make_unique<VkTestHelper>(true);
+    if (!protectedTestHelper->init()) {
+        return;
+    }
+    REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr);
+
+    DDLSurfaceCharacterizationTestImpl(protectedTestHelper->directContext(), reporter);
+}
+#endif
+
 // Test that a DDL created w/o textureability can be replayed into both a textureable and
 // non-textureable destination. Note that DDLSurfaceCharacterizationTest tests that a
 // textureable DDL cannot be played into a non-textureable destination but can be replayed
@@ -848,6 +866,22 @@
     DDLMakeRenderTargetTestImpl(context, reporter);
 }
 
+#if defined(SK_VULKAN)
+
+DEF_GANESH_TEST(VkProtectedContext_DDLMakeRenderTargetTest,
+                reporter,
+                ctxInfo,
+                CtsEnforcement::kNever) {
+    auto protectedTestHelper = std::make_unique<VkTestHelper>(true);
+    if (!protectedTestHelper->init()) {
+        return;
+    }
+    REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr);
+
+    DDLMakeRenderTargetTestImpl(protectedTestHelper->directContext(), reporter);
+}
+#endif
+
 ////////////////////////////////////////////////////////////////////////////////
 static constexpr int kSize = 8;
 
diff --git a/tests/DescriptorTest.cpp b/tests/DescriptorTest.cpp
index b220270..bed0c92 100644
--- a/tests/DescriptorTest.cpp
+++ b/tests/DescriptorTest.cpp
@@ -5,16 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkData.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkTypes.h"
-#include "include/private/chromium/SkChromeRemoteGlyphCache.h"
 #include "src/core/SkDescriptor.h"
-#include "src/core/SkFontPriv.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkScalerContext.h"
 #include "src/core/SkWriteBuffer.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
 #include <memory>
+#include <optional>
+#include <type_traits>
 
 class SkDescriptorTestHelper {
 public:
diff --git a/tests/DeviceTest.cpp b/tests/DeviceTest.cpp
index b513539..dd9dbb2 100644
--- a/tests/DeviceTest.cpp
+++ b/tests/DeviceTest.cpp
@@ -10,16 +10,18 @@
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrTypes.h"
 #include "src/core/SkDevice.h"
 #include "src/core/SkSpecialImage.h"
+#include "src/gpu/ganesh/Device_v1.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
-class SkColorSpace;
+struct GrContextOptions;
 
 class DeviceTestingAccess {
 public:
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp
index c489dbf..3dda6fa 100644
--- a/tests/DrawBitmapRectTest.cpp
+++ b/tests/DrawBitmapRectTest.cpp
@@ -8,13 +8,12 @@
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
-#include "include/core/SkImage.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkScalar.h"
-#include "include/core/SkShader.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkTileMode.h"
 #include "include/core/SkTypes.h"
@@ -22,6 +21,10 @@
 #include "src/core/SkMatrixUtils.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
 ///////////////////////////////////////////////////////////////////////////////
 
 static void rand_matrix(SkMatrix* mat, SkRandom& rand, unsigned mask) {
diff --git a/tests/DrawOpAtlasTest.cpp b/tests/DrawOpAtlasTest.cpp
index 56b1c21..d5afe4c 100644
--- a/tests/DrawOpAtlasTest.cpp
+++ b/tests/DrawOpAtlasTest.cpp
@@ -12,40 +12,42 @@
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
-#include "include/core/SkPoint.h"
-#include "include/core/SkRefCnt.h"
 #include "include/core/SkSize.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/private/gpu/ganesh/GrTypesPriv.h"
-#include "src/core/SkIPoint16.h"
+#include "src/core/SkMatrixProvider.h"
+#include "src/gpu/AtlasTypes.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDeferredUpload.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrDrawOpAtlas.h"
-#include "src/gpu/ganesh/GrDrawingManager.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
+#include "src/gpu/ganesh/GrDstProxyView.h"
 #include "src/gpu/ganesh/GrOnFlushResourceProvider.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/ops/AtlasTextOp.h"
-#include "src/gpu/ganesh/ops/GrDrawOp.h"
 #include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/text/GrAtlasManager.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
+#include <cstddef>
+#include <cstdint>
 #include <memory>
-#include <utility>
+
+class GrResourceProvider;
+struct GrContextOptions;
 
 using namespace skgpu::ganesh;
 using MaskFormat = skgpu::MaskFormat;
 
-class GrResourceProvider;
-
 static const int kNumPlots = 2;
 static const int kPlotSize = 32;
 static const int kAtlasSize = kNumPlots * kPlotSize;
diff --git a/tests/DrawPathTest.cpp b/tests/DrawPathTest.cpp
index 3f572df..58073f8 100644
--- a/tests/DrawPathTest.cpp
+++ b/tests/DrawPathTest.cpp
@@ -13,6 +13,7 @@
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
 #include "include/core/SkPathEffect.h"
+#include "include/core/SkPathTypes.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
@@ -24,6 +25,8 @@
 #include "include/effects/SkDashPathEffect.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 // test that we can draw an aa-rect at coordinates > 32K (bigger than fixedpoint)
 static void test_big_aa_rect(skiatest::Reporter* reporter) {
     SkBitmap output;
diff --git a/tests/DrawTextTest.cpp b/tests/DrawTextTest.cpp
index 4ce283f..d352bce 100644
--- a/tests/DrawTextTest.cpp
+++ b/tests/DrawTextTest.cpp
@@ -11,7 +11,7 @@
 #include "include/core/SkFont.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
-#include "include/core/SkPathEffect.h"
+#include "include/core/SkPathEffect.h" // IWYU pragma: keep
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
@@ -24,6 +24,7 @@
 #include "tests/Test.h"
 
 #include <cmath>
+#include <string>
 
 static const SkColor bgColor = SK_ColorWHITE;
 
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp
index 8740b02..8831653 100644
--- a/tests/EGLImageTest.cpp
+++ b/tests/EGLImageTest.cpp
@@ -10,21 +10,47 @@
 
 
 #ifdef SK_GL
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/gl/GrGLFunctions.h"
+#include "include/gpu/gl/GrGLInterface.h"
+#include "include/gpu/gl/GrGLTypes.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/RefCntedCallback.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorInfo.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrShaderCaps.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/GrTextureProxyPriv.h"
-#include "src/gpu/ganesh/SurfaceFillContext.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
+#include "src/gpu/ganesh/SurfaceFillContext.h" // IWYU pragma: keep
+#include "src/gpu/ganesh/gl/GrGLCaps.h"
+#include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
 #include "src/gpu/ganesh/gl/GrGLGpu.h"
 #include "src/gpu/ganesh/gl/GrGLUtil.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/TestUtils.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/gl/GLTestContext.h"
 
+#include <cstdint>
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
+
 using sk_gpu_test::GLTestContext;
 
 static void cleanup(GLTestContext* glctx0,
diff --git a/tests/EmptyPathTest.cpp b/tests/EmptyPathTest.cpp
index e3c2f26..7532795 100644
--- a/tests/EmptyPathTest.cpp
+++ b/tests/EmptyPathTest.cpp
@@ -7,9 +7,17 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 #define DIMENSION   32
 
 static void drawAndTest(skiatest::Reporter* reporter, const SkPath& path,
diff --git a/tests/EncodeTest.cpp b/tests/EncodeTest.cpp
index bb214b8..6752b6d 100644
--- a/tests/EncodeTest.cpp
+++ b/tests/EncodeTest.cpp
@@ -5,27 +5,40 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-#include "tools/Resources.h"
-
 #include "include/codec/SkCodec.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorPriv.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkDataTable.h"
 #include "include/core/SkEncodedImageFormat.h"
 #include "include/core/SkImage.h"
 #include "include/core/SkImageEncoder.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/encode/SkEncoder.h"
 #include "include/encode/SkJpegEncoder.h"
 #include "include/encode/SkPngEncoder.h"
 #include "include/encode/SkWebpEncoder.h"
 #include "include/private/SkImageInfoPriv.h"
+#include "include/private/SkMalloc.h"
+#include "tests/Test.h"
+#include "tools/Resources.h"
 
 #include <png.h>
 #include <webp/decode.h>
 
 #include <algorithm>
+#include <cstddef>
+#include <initializer_list>
+#include <memory>
 #include <string>
 #include <vector>
 
diff --git a/tests/EncodedInfoTest.cpp b/tests/EncodedInfoTest.cpp
index 16535ed..a421b80 100644
--- a/tests/EncodedInfoTest.cpp
+++ b/tests/EncodedInfoTest.cpp
@@ -5,16 +5,21 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-#include "tools/Resources.h"
-#include "tools/ToolUtils.h"
-
 #include "include/codec/SkCodec.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkEncodedImageFormat.h"
 #include "include/core/SkImageEncoder.h"
 #include "include/core/SkImageInfo.h"
+#include "include/core/SkStream.h"
+#include "tests/Test.h"
+#include "tools/Resources.h"
+#include "tools/ToolUtils.h"
+
+#include <memory>
+#include <utility>
 
 DEF_TEST(AlphaEncodedInfo, r) {
     auto codec = SkCodec::MakeFromStream(GetResourceAsStream("images/grayscale.jpg"));
diff --git a/tests/ExifTest.cpp b/tests/ExifTest.cpp
index 20adce4..9c31c25 100644
--- a/tests/ExifTest.cpp
+++ b/tests/ExifTest.cpp
@@ -6,10 +6,14 @@
  */
 
 #include "include/codec/SkCodec.h"
+#include "include/codec/SkEncodedOrigin.h"
 #include "include/core/SkStream.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <memory>
+#include <utility>
+
 DEF_TEST(ExifOrientation, r) {
     std::unique_ptr<SkStream> stream(GetResourceAsStream("images/exif-orientation-2-ur.jpg"));
     REPORTER_ASSERT(r, nullptr != stream);
diff --git a/tests/ExtendedSkColorTypeTests.cpp b/tests/ExtendedSkColorTypeTests.cpp
index c653fa0..89b1ba2 100644
--- a/tests/ExtendedSkColorTypeTests.cpp
+++ b/tests/ExtendedSkColorTypeTests.cpp
@@ -5,18 +5,35 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkImageInfoPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
-#include "src/gpu/ganesh/GrPixmap.h"
-
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 #include "tools/ToolUtils.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
+
+class SkPixmap;
+struct GrContextOptions;
+
 static constexpr int kSize = 32;
 
 static SkColor4f get_trans_black_expected_color(SkColorChannelFlag channels) {
diff --git a/tests/F16StagesTest.cpp b/tests/F16StagesTest.cpp
index b9cb5a1..8d17529 100644
--- a/tests/F16StagesTest.cpp
+++ b/tests/F16StagesTest.cpp
@@ -8,6 +8,8 @@
 #include "src/core/SkRasterPipeline.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 DEF_TEST(F16Stages, r) {
     // Make sure SkRasterPipeline::load_f16 and store_f16 can handle a range of
     // ordinary (0<=x<=1) and interesting (x<0, x>1) values.
diff --git a/tests/FCITest.cpp b/tests/FCITest.cpp
index 95b1b72..9e21eef 100644
--- a/tests/FCITest.cpp
+++ b/tests/FCITest.cpp
@@ -5,17 +5,23 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkBitmap.h"
-#include "include/core/SkCanvas.h"
-#include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
 #include "include/core/SkFontMgr.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
-#include "include/ports/SkFontMgr_FontConfigInterface.h"
+#include "include/core/SkTypes.h"
+#include "include/ports/SkFontConfigInterface.h"
 #include "src/ports/SkFontConfigInterface_direct.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
 #include <fontconfig/fontconfig.h>
+#include <memory>
+#include <utility>
+#include <vector>
 
 namespace {
 
diff --git a/tests/FillPathTest.cpp b/tests/FillPathTest.cpp
index 04bcb01..917805d 100644
--- a/tests/FillPathTest.cpp
+++ b/tests/FillPathTest.cpp
@@ -5,12 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkColor.h"
 #include "include/core/SkPath.h"
-#include "include/core/SkRegion.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkBlitter.h"
 #include "src/core/SkScan.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 struct FakeBlitter : public SkBlitter {
     FakeBlitter()
         : m_blitCount(0) { }
diff --git a/tests/FindCubicConvex180ChopsTest.cpp b/tests/FindCubicConvex180ChopsTest.cpp
index b2cbe08..ca942cd 100644
--- a/tests/FindCubicConvex180ChopsTest.cpp
+++ b/tests/FindCubicConvex180ChopsTest.cpp
@@ -5,11 +5,17 @@
  * found in the LICENSE file.
  */
 
-#include "include/utils/SkRandom.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkGeometry.h"
 #include "src/gpu/tessellate/Tessellation.h"
 #include "tests/Test.h"
 
+#include <cmath>
+#include <cstdint>
+#include <string>
+
 namespace skgpu::tess {
 
 static bool is_linear(SkPoint p0, SkPoint p1, SkPoint p2) {
diff --git a/tests/FitsInTest.cpp b/tests/FitsInTest.cpp
index 42a0bad..553528b 100644
--- a/tests/FitsInTest.cpp
+++ b/tests/FitsInTest.cpp
@@ -9,6 +9,7 @@
 #include "include/private/SkTFitsIn.h"
 #include "tests/Test.h"
 
+#include <cstdint>
 #include <limits>
 
 #define TEST(S, s, D, expected) REPORTER_ASSERT(reporter, (SkTFitsIn<D>((S)(s)) == (expected)))
diff --git a/tests/FlattenDrawableTest.cpp b/tests/FlattenDrawableTest.cpp
index 0d164aa..d2a4863 100644
--- a/tests/FlattenDrawableTest.cpp
+++ b/tests/FlattenDrawableTest.cpp
@@ -6,16 +6,28 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
 #include "include/core/SkDrawable.h"
+#include "include/core/SkFlattenable.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkMaskFilter.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPictureRecorder.h"
 #include "include/core/SkRect.h"
-#include "include/core/SkStream.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
+#include "src/core/SkColorFilterBase.h"
 #include "src/core/SkPathEffectBase.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkWriteBuffer.h"
+#include "src/shaders/SkShaderBase.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <string>
+
 class IntDrawable : public SkDrawable {
 public:
     IntDrawable(uint32_t a, uint32_t b, uint32_t c, uint32_t d)
diff --git a/tests/FlattenableFactoryToName.cpp b/tests/FlattenableFactoryToName.cpp
index 45b0fbd..87d7c97 100644
--- a/tests/FlattenableFactoryToName.cpp
+++ b/tests/FlattenableFactoryToName.cpp
@@ -6,8 +6,15 @@
  */
 
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkFlattenable.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkShader.h"
 #include "include/effects/SkImageFilters.h"
 #include "tests/Test.h"
 
diff --git a/tests/Float16Test.cpp b/tests/Float16Test.cpp
index 362bae1..64b3327 100644
--- a/tests/Float16Test.cpp
+++ b/tests/Float16Test.cpp
@@ -5,16 +5,14 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkColor.h"
-#include "include/core/SkPixmap.h"
 #include "include/private/SkHalf.h"
-#include "include/private/SkTo.h"
+#include "include/private/SkVx.h"
 #include "include/utils/SkRandom.h"
-#include "src/core/SkAutoPixmapStorage.h"
-#include "src/core/SkOpts.h"
 #include "tests/Test.h"
 
 #include <cmath>
+#include <cstdint>
+#include <string>
 
 static bool is_denorm(uint16_t h) {
     return (h & 0x7fff) < 0x0400;
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index aca695f..acec7b4 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -12,19 +12,30 @@
  * have been selected to require 32 bits of precision and full IEEE conformance
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/private/SkHalf.h"
+#include "include/private/SkTDArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/SurfaceContext.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/gpu/ProxyUtils.h"
 
-#include <float.h>
+#include <string.h>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
 
 static const int DEV_W = 100, DEV_H = 100;
 
diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp
index a03fcce..0262cf2 100644
--- a/tests/FontHostStreamTest.cpp
+++ b/tests/FontHostStreamTest.cpp
@@ -9,17 +9,21 @@
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColor.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
 #include "include/core/SkGraphics.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkTypeface.h"
 #include "include/core/SkTypes.h"
 #include "src/core/SkFontDescriptor.h"
-#include "src/core/SkFontPriv.h"
 #include "tests/Test.h"
 
+#include <memory>
+#include <utility>
+
 static const SkColor bgColor = SK_ColorWHITE;
 
 static void create(SkBitmap* bm, SkIRect bound) {
diff --git a/tests/FontHostTest.cpp b/tests/FontHostTest.cpp
index c8d1d89..238e177 100644
--- a/tests/FontHostTest.cpp
+++ b/tests/FontHostTest.cpp
@@ -5,17 +5,28 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkData.h"
 #include "include/core/SkFont.h"
-#include "include/core/SkPaint.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTemplates.h"
 #include "src/core/SkAutoMalloc.h"
 #include "src/core/SkEndian.h"
 #include "src/core/SkFontStream.h"
-#include "src/core/SkOSFile.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <memory>
+#include <string>
+
 //#define DUMP_TABLES
 //#define DUMP_TTC_TABLES
 
diff --git a/tests/FontMgrAndroidParserTest.cpp b/tests/FontMgrAndroidParserTest.cpp
index 2f236ac..d9c8dd9 100644
--- a/tests/FontMgrAndroidParserTest.cpp
+++ b/tests/FontMgrAndroidParserTest.cpp
@@ -5,22 +5,40 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
+#include "include/core/SkFontMgr.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "include/ports/SkFontMgr_android.h"
 #include "include/private/SkFixed.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTDArray.h"
+#include "include/private/SkTHash.h"
 #include "src/core/SkOSFile.h"
 #include "src/ports/SkFontMgr_android_parser.h"
+#include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/flags/CommandLineFlags.h"
 
+#include <algorithm>
+#include <climits>
 #include <cmath>
+#include <cstdint>
 #include <cstdio>
+#include <memory>
+#include <string>
+#include <tuple>
 
 DECLARE_bool(verboseFontMgr);
 
diff --git a/tests/FontMgrFontConfigTest.cpp b/tests/FontMgrFontConfigTest.cpp
index 81848ad..c53bfb4 100644
--- a/tests/FontMgrFontConfigTest.cpp
+++ b/tests/FontMgrFontConfigTest.cpp
@@ -7,16 +7,28 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
 #include "include/core/SkFontMgr.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "include/ports/SkFontMgr_fontconfig.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
 #include <fontconfig/fontconfig.h>
 
+#include <array>
+#include <memory>
+
 namespace {
 
 bool bitmap_compare(const SkBitmap& ref, const SkBitmap& test) {
diff --git a/tests/FontMgrTest.cpp b/tests/FontMgrTest.cpp
index 8c9e3c2..4a502d4 100644
--- a/tests/FontMgrTest.cpp
+++ b/tests/FontMgrTest.cpp
@@ -6,19 +6,31 @@
  */
 
 #include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
 #include "include/core/SkFontMgr.h"
-#include "include/core/SkPaint.h"
+#include "include/core/SkFontParameters.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
-#include "src/core/SkAdvancedTypefaceMetrics.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkMalloc.h"
+#include "src/core/SkAdvancedTypefaceMetrics.h" // IWYU pragma: keep
 #include "src/core/SkScalerContext.h"
 #include "tests/Test.h"
 #include "tools/flags/CommandLineFlags.h"
 
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
-#include <limits>
+#include <memory>
 #include <vector>
 
+class SkDescriptor;
+class SkFontDescriptor;
+
 DECLARE_bool(verboseFontMgr);
 
 DEF_TEST(FontMgr_Font, reporter) {
diff --git a/tests/FontNamesTest.cpp b/tests/FontNamesTest.cpp
index 7645c15..df1cb06 100644
--- a/tests/FontNamesTest.cpp
+++ b/tests/FontNamesTest.cpp
@@ -6,12 +6,21 @@
  */
 
 #include "include/core/SkFontMgr.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTemplates.h"
+#include "src/core/SkEndian.h"
 #include "src/sfnt/SkOTTable_name.h"
 #include "tests/Test.h"
 #include "tools/flags/CommandLineFlags.h"
 
-#include <stddef.h>
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <cstring>
 
 namespace {
 
diff --git a/tests/FontTest.cpp b/tests/FontTest.cpp
index 0e2ea54..2353569 100644
--- a/tests/FontTest.cpp
+++ b/tests/FontTest.cpp
@@ -6,7 +6,10 @@
  */
 
 #include "include/core/SkFont.h"
-#include "include/utils/SkCustomTypeface.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkAutoMalloc.h"
 #include "src/core/SkFontPriv.h"
 #include "src/core/SkPtrRecorder.h"
@@ -15,6 +18,8 @@
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <cstddef>
+
 static SkFont serialize_deserialize(const SkFont& font, skiatest::Reporter* reporter) {
     sk_sp<SkRefCntSet> typefaces = sk_make_sp<SkRefCntSet>();
     SkBinaryWriteBuffer wb;
diff --git a/tests/GLBackendSurfaceTest.cpp b/tests/GLBackendSurfaceTest.cpp
index dff4a88..b1a4f5d 100644
--- a/tests/GLBackendSurfaceTest.cpp
+++ b/tests/GLBackendSurfaceTest.cpp
@@ -9,22 +9,30 @@
 
 #ifdef SK_GL
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/gpu/gl/GrGLTypes.h"
 #include "include/private/gpu/ganesh/GrGLTypesPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/gl/GrGLCaps.h"
 #include "src/gpu/ganesh/gl/GrGLTexture.h"
-#include "src/image/SkImage_Base.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/gpu/ProxyUtils.h"
+struct GrContextOptions;
 
 static bool sampler_params_invalid(const GrGLTextureParameters& parameters) {
     return SkScalarIsNaN(parameters.samplerOverriddenState().fMaxLOD);
diff --git a/tests/GeometryTest.cpp b/tests/GeometryTest.cpp
index 0ffa292..221e937 100644
--- a/tests/GeometryTest.cpp
+++ b/tests/GeometryTest.cpp
@@ -5,13 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkGeometry.h"
 #include "src/core/SkPointPriv.h"
 #include "tests/Test.h"
 
 #include <array>
-#include <numeric>
+#include <cmath>
+#include <cstdlib>
+#include <limits>
 
 static bool nearly_equal(const SkPoint& a, const SkPoint& b) {
     return SkScalarNearlyEqual(a.fX, b.fX) && SkScalarNearlyEqual(a.fY, b.fY);
diff --git a/tests/GifTest.cpp b/tests/GifTest.cpp
index 50c0016..c777400 100644
--- a/tests/GifTest.cpp
+++ b/tests/GifTest.cpp
@@ -6,17 +6,29 @@
  */
 
 #include "include/codec/SkAndroidCodec.h"
+#include "include/codec/SkCodec.h"
 #include "include/core/SkBitmap.h"
-#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
 #include "include/core/SkUnPreMultiply.h"
 #include "tests/CodecPriv.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <cstring>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+#include <vector>
+
 static unsigned char gGIFData[] = {
   0x47, 0x49, 0x46, 0x38, 0x37, 0x61, 0x03, 0x00, 0x03, 0x00, 0xe3, 0x08,
   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x00,
diff --git a/tests/GlyphRunTest.cpp b/tests/GlyphRunTest.cpp
index 9bf37d3..ce4e238 100644
--- a/tests/GlyphRunTest.cpp
+++ b/tests/GlyphRunTest.cpp
@@ -5,6 +5,7 @@
  * found in the LICENSE file.
  */
 
+#if 0   // should we revitalize this by consing up a device for drawTextBlob() ?
 #include "src/text/GlyphRun.h"
 
 #include "include/core/SkTextBlob.h"
@@ -13,8 +14,6 @@
 #include <algorithm>
 #include <memory>
 
-
-#if 0   // should we revitalize this by consing up a device for drawTextBlob() ?
 DEF_TEST(GlyphRunBlob, reporter) {
     constexpr uint16_t count = 5;
     constexpr int runCount = 2;
diff --git a/tests/GpuRectanizerTest.cpp b/tests/GpuRectanizerTest.cpp
index 15cb9d3..5cc9441 100644
--- a/tests/GpuRectanizerTest.cpp
+++ b/tests/GpuRectanizerTest.cpp
@@ -8,10 +8,15 @@
 #include "include/core/SkSize.h"
 #include "include/private/SkTDArray.h"
 #include "include/utils/SkRandom.h"
+#include "src/core/SkIPoint16.h"
+#include "src/gpu/Rectanizer.h"
 #include "src/gpu/RectanizerPow2.h"
 #include "src/gpu/RectanizerSkyline.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+struct GrContextOptions;
+
 using namespace skgpu;
 
 static const int kWidth = 1024;
diff --git a/tests/GrClipStackTest.cpp b/tests/GrClipStackTest.cpp
index c1a5356..e678799 100644
--- a/tests/GrClipStackTest.cpp
+++ b/tests/GrClipStackTest.cpp
@@ -6,28 +6,62 @@
  * found in the LICENSE file.
  */
 
-#include "src/gpu/ganesh/ClipStack.h"
-#include "tests/Test.h"
-
+#include "include/core/SkClipOp.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
+#include "include/core/SkString.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/mock/GrMockTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkMatrixProvider.h"
 #include "src/core/SkRRectPriv.h"
-#include "src/core/SkRectPriv.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/ClipStack.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrClip.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrResourceCache.h"
+#include "src/gpu/ganesh/GrScissorState.h"
+#include "src/gpu/ganesh/GrWindowRectsState.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
+#include "src/gpu/ganesh/geometry/GrShape.h"
 #include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <initializer_list>
+#include <memory>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+class GrDstProxyView;
+class GrOpFlushState;
+class GrRecordingContext;
+class GrSurfaceProxyView;
 
 namespace {
 
 class TestCaseBuilder;
-class ElementsBuilder;
 
 enum class SavePolicy {
     kNever,
diff --git a/tests/GrContextAbandonTest.cpp b/tests/GrContextAbandonTest.cpp
index 219942c..0aac2ee 100644
--- a/tests/GrContextAbandonTest.cpp
+++ b/tests/GrContextAbandonTest.cpp
@@ -6,10 +6,12 @@
  */
 
 #include "include/core/SkTypes.h"
-
 #include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+#include "tools/gpu/FenceSync.h"
+
+struct GrContextOptions;
 
 using namespace sk_gpu_test;
 
diff --git a/tests/GrContextFactoryTest.cpp b/tests/GrContextFactoryTest.cpp
index 0e116bd..85ca362 100644
--- a/tests/GrContextFactoryTest.cpp
+++ b/tests/GrContextFactoryTest.cpp
@@ -5,14 +5,16 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkTypes.h"
-
 #include "include/core/SkExecutor.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
-#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+#include "tools/gpu/FenceSync.h"
+
+#include <memory>
 
 using namespace sk_gpu_test;
 
diff --git a/tests/GrContextOOM.cpp b/tests/GrContextOOM.cpp
index a7d6f99..c5b3285 100644
--- a/tests/GrContextOOM.cpp
+++ b/tests/GrContextOOM.cpp
@@ -5,12 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
 DEF_GANESH_TEST(GrContext_oomed, reporter, originalOptions, CtsEnforcement::kApiLevel_T) {
diff --git a/tests/GrDDLImageTest.cpp b/tests/GrDDLImageTest.cpp
index 2717629..ec6a6ef 100644
--- a/tests/GrDDLImageTest.cpp
+++ b/tests/GrDDLImageTest.cpp
@@ -5,12 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkSurfaceCharacterization.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+class GrRecordingContext;
+struct GrContextOptions;
+
 DEF_GANESH_TEST(GrDDLImage_MakeSubset, reporter, options, CtsEnforcement::kApiLevel_T) {
     sk_gpu_test::GrContextFactory factory(options);
     for (int ct = 0; ct < sk_gpu_test::GrContextFactory::kContextTypeCnt; ++ct) {
diff --git a/tests/GrFinishedFlushTest.cpp b/tests/GrFinishedFlushTest.cpp
index a8b811c..217f771 100644
--- a/tests/GrFinishedFlushTest.cpp
+++ b/tests/GrFinishedFlushTest.cpp
@@ -5,16 +5,30 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
+#include "tools/gpu/FenceSync.h"
+#include "tools/gpu/ManagedBackendTexture.h"
 
 #include <chrono>
-#include "include/core/SkCanvas.h"
-#include "include/core/SkColorSpace.h"
-#include "include/core/SkSurface.h"
-#include "include/gpu/GrDirectContext.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrGpu.h"
-#include "tools/gpu/ManagedBackendTexture.h"
+#include <memory>
+
+struct GrContextOptions;
 
 using namespace sk_gpu_test;
 
diff --git a/tests/GrGLExtensionsTest.cpp b/tests/GrGLExtensionsTest.cpp
index 9747209..d0f4efe 100644
--- a/tests/GrGLExtensionsTest.cpp
+++ b/tests/GrGLExtensionsTest.cpp
@@ -8,9 +8,9 @@
 #include "tests/Test.h"
 
 #ifdef SK_GL
-
 #include "include/core/SkTypes.h"
 #include "include/gpu/gl/GrGLExtensions.h"
+#include "include/gpu/gl/GrGLTypes.h"
 #include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
 
 const GrGLubyte* simpleGetString(GrGLenum name) {
diff --git a/tests/GrGlyphVectorTest.cpp b/tests/GrGlyphVectorTest.cpp
index c0b9f01..a724036 100644
--- a/tests/GrGlyphVectorTest.cpp
+++ b/tests/GrGlyphVectorTest.cpp
@@ -5,20 +5,30 @@
 * found in the LICENSE file.
  */
 
+#include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSpan.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkDescriptor.h"
 #include "src/core/SkGlyph.h"
-#include "src/gpu/ganesh/GrResourceProvider.h"
-
 #include "src/core/SkGlyphBuffer.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkStrikeCache.h"
 #include "src/core/SkStrikeSpec.h"
 #include "src/core/SkWriteBuffer.h"
+#include "src/core/SkZip.h"
 #include "src/text/StrikeForGPU.h"
 #include "src/text/gpu/GlyphVector.h"
 #include "src/text/gpu/SubRunAllocator.h"
 #include "tests/Test.h"
 
+#include <initializer_list>
+#include <limits.h>
+#include <optional>
+#include <tuple>
+#include <utility>
+
 using GlyphVector = sktext::gpu::GlyphVector;
 using SubRunAllocator = sktext::gpu::SubRunAllocator;
 
diff --git a/tests/GrGpuBufferTest.cpp b/tests/GrGpuBufferTest.cpp
index b65862d..6215f9a 100644
--- a/tests/GrGpuBufferTest.cpp
+++ b/tests/GrGpuBufferTest.cpp
@@ -5,18 +5,65 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkSLTypeShared.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrBuffer.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrDrawingManager.h"
+#include "src/gpu/ganesh/GrGeometryProcessor.h"
 #include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrGpuBuffer.h"
+#include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrMeshDrawTarget.h"
+#include "src/gpu/ganesh/GrOpFlushState.h"
+#include "src/gpu/ganesh/GrPipeline.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorAnalysis.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
+#include "src/gpu/ganesh/GrProgramInfo.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSimpleMesh.h"
+#include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
+#include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
+#include "src/gpu/ganesh/ops/GrDrawOp.h"
 #include "src/gpu/ganesh/ops/GrMeshDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/ops/GrSimpleMeshDrawOpHelper.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+
+#include <algorithm>
+#include <cstring>
+#include <initializer_list>
+#include <memory>
+#include <string_view>
+#include <utility>
+
+class GrDstProxyView;
+class GrGLSLProgramDataManager;
+class GrRecordingContext;
+class GrSurfaceProxyView;
+class SkArenaAlloc;
+namespace skgpu { class KeyBuilder; }
+struct GrContextOptions;
+struct GrShaderCaps;
 
 // Simple op that draws a vertex buffer with float2 positions as green triangles. We use this to
 // draw GrGpuBuffers to test that the buffer contains the expected values as not all contexts will
diff --git a/tests/GrMemoryPoolTest.cpp b/tests/GrMemoryPoolTest.cpp
index a88f299..4c7f35a 100644
--- a/tests/GrMemoryPoolTest.cpp
+++ b/tests/GrMemoryPoolTest.cpp
@@ -7,11 +7,15 @@
 
 #include "include/private/SkTArray.h"
 #include "include/private/SkTDArray.h"
-#include "include/private/SkTemplates.h"
 #include "include/utils/SkRandom.h"
 #include "src/gpu/ganesh/GrMemoryPool.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <memory>
+
 // A is the top of an inheritance tree of classes that overload op new and
 // and delete to use a GrMemoryPool. The objects have values of different types
 // that can be set and checked.
diff --git a/tests/GrMeshTest.cpp b/tests/GrMeshTest.cpp
index de9373c..118e84d 100644
--- a/tests/GrMeshTest.cpp
+++ b/tests/GrMeshTest.cpp
@@ -5,33 +5,72 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
-
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkCanvas.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkOnce.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkArenaAlloc.h"
+#include "src/core/SkSLTypeShared.h"
 #include "src/gpu/KeyBuilder.h"
 #include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/GrBuffer.h"
 #include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColor.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrDrawIndirectCommand.h"
 #include "src/gpu/ganesh/GrGeometryProcessor.h"
-#include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
+#include "src/gpu/ganesh/GrMeshDrawTarget.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
 #include "src/gpu/ganesh/GrOpsRenderPass.h"
+#include "src/gpu/ganesh/GrPipeline.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorAnalysis.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProgramInfo.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrShaderCaps.h"
+#include "src/gpu/ganesh/GrShaderVar.h"
+#include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
 #include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"
+#include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/ops/GrSimpleMeshDrawOpHelper.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 
+#include <algorithm>
 #include <array>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
 #include <memory>
+#include <utility>
 #include <vector>
 
+class GrAppliedClip;
+class GrDstProxyView;
+class GrGLSLProgramDataManager;
+class GrRecordingContext;
+class GrSurfaceProxyView;
+struct GrContextOptions;
+
 #if 0
 #include "tools/ToolUtils.h"
 #define WRITE_PNG_CONTEXT_TYPE kANGLE_D3D11_ES3_ContextType
diff --git a/tests/GrMipMappedTest.cpp b/tests/GrMipMappedTest.cpp
index de1ea25..2e3f273 100644
--- a/tests/GrMipMappedTest.cpp
+++ b/tests/GrMipMappedTest.cpp
@@ -5,36 +5,81 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkTypes.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkPoint.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageGenerator.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
-#ifdef SK_DIRECT3D
-#include "include/gpu/d3d/GrD3DTypes.h"
-#endif
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/mock/GrMockTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/Device_v1.h"
 #include "src/gpu/ganesh/GrBackendTextureImageGenerator.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorSpaceXform.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrDrawingManager.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
 #include "src/gpu/ganesh/GrSemaphore.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrSurfaceProxyPriv.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/SkGr.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
-#include "src/image/SkImage_Base.h"
+#include "src/gpu/ganesh/ops/OpsTask.h"
 #include "src/image/SkSurface_Gpu.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tests/TestUtils.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
 #include "tools/gpu/BackendTextureImageFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+class GrRenderTask;
+
+#if defined(SK_DIRECT3D)
+#include "include/gpu/d3d/GrD3DTypes.h"
+#endif
+
+#if defined(SK_GL)
+#include "include/gpu/gl/GrGLTypes.h"
+#endif
+
+#if defined(SK_VULKAN)
+#include "include/gpu/vk/GrVkTypes.h"
+#endif
+
+#if defined(SK_DAWN)
+#include "include/gpu/dawn/GrDawnTypes.h"
+#include "dawn/webgpu_cpp.h"
+#endif
+
 static constexpr int kSize = 8;
 
 // Test that the correct mip map states are on the GrTextures when wrapping GrBackendTextures in
diff --git a/tests/GrOpListFlushTest.cpp b/tests/GrOpListFlushTest.cpp
index 7fcda88..24d0b9e 100644
--- a/tests/GrOpListFlushTest.cpp
+++ b/tests/GrOpListFlushTest.cpp
@@ -5,14 +5,29 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
+struct GrContextOptions;
+
 static bool check_read(skiatest::Reporter* reporter, const SkBitmap& bitmap) {
     bool result = true;
     for (int x = 0; x < 1000 && result; ++x) {
diff --git a/tests/GrPipelineDynamicStateTest.cpp b/tests/GrPipelineDynamicStateTest.cpp
index c9043bd..3cf83ec 100644
--- a/tests/GrPipelineDynamicStateTest.cpp
+++ b/tests/GrPipelineDynamicStateTest.cpp
@@ -5,27 +5,61 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkTypes.h"
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
-#include "include/gpu/GrRecordingContext.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkTArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkArenaAlloc.h"
+#include "src/core/SkSLTypeShared.h"
+#include "src/gpu/ganesh/GrBuffer.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrColor.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGeometryProcessor.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
-#include "src/gpu/ganesh/GrOpsRenderPass.h"
+#include "src/gpu/ganesh/GrPipeline.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProgramInfo.h"
-#include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrShaderVar.h"
+#include "src/gpu/ganesh/GrSimpleMesh.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
 #include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"
 #include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <array>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+class GrAppliedClip;
+class GrDstProxyView;
+class GrGLSLProgramDataManager;
+class GrRecordingContext;
+namespace skgpu { class KeyBuilder; }
+struct GrContextOptions;
+struct GrShaderCaps;
 
 /**
  * This is a GPU-backend specific test for dynamic pipeline state. It draws boxes using dynamic
diff --git a/tests/GrPorterDuffTest.cpp b/tests/GrPorterDuffTest.cpp
index 9d2066c..07d130c 100644
--- a/tests/GrPorterDuffTest.cpp
+++ b/tests/GrPorterDuffTest.cpp
@@ -5,19 +5,42 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/mock/GrMockTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/Blend.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColor.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrDstProxyView.h"
 #include "src/gpu/ganesh/GrGpu.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrProcessorAnalysis.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrShaderCaps.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrUserStencilSettings.h"
 #include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/effects/GrPorterDuffXferProcessor.h"
-#include "tools/gpu/GrContextFactory.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
+#include <initializer_list>
+#include <utility>
+
+class GrTextureProxy;
+
 ////////////////////////////////////////////////////////////////////////////////
 
 static void test_color_unknown_with_coverage(skiatest::Reporter* reporter, const GrCaps& caps);
diff --git a/tests/GrQuadBufferTest.cpp b/tests/GrQuadBufferTest.cpp
index a3d5628..e81ddf6 100644
--- a/tests/GrQuadBufferTest.cpp
+++ b/tests/GrQuadBufferTest.cpp
@@ -5,10 +5,14 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkTypes.h"
+#include "src/gpu/ganesh/geometry/GrQuad.h"
+#include "src/gpu/ganesh/geometry/GrQuadBuffer.h"
 #include "tests/Test.h"
 
-#include "src/gpu/ganesh/geometry/GrQuadBuffer.h"
-
+#include <utility>
 #include <vector>
 
 #define ASSERT(cond) REPORTER_ASSERT(r, cond)
diff --git a/tests/GrQuadCropTest.cpp b/tests/GrQuadCropTest.cpp
index 29ee73e..76acc7c 100644
--- a/tests/GrQuadCropTest.cpp
+++ b/tests/GrQuadCropTest.cpp
@@ -5,7 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/gpu/ganesh/geometry/GrQuad.h"
 #include "src/gpu/ganesh/geometry/GrQuadUtils.h"
 #include "tests/Test.h"
diff --git a/tests/GrRenderTaskClusterTest.cpp b/tests/GrRenderTaskClusterTest.cpp
index 789d106..e89a582 100644
--- a/tests/GrRenderTaskClusterTest.cpp
+++ b/tests/GrRenderTaskClusterTest.cpp
@@ -5,11 +5,22 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSpan.h"
+#include "include/core/SkString.h"
+#include "include/private/SkTArray.h"
+#include "src/core/SkTInternalLList.h"
+#include "src/gpu/ganesh/GrRenderTask.h"
 #include "src/gpu/ganesh/GrRenderTaskCluster.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/mock/GrMockRenderTask.h"
 #include "src/gpu/ganesh/mock/GrMockSurfaceProxy.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <utility>
+
 typedef void (*CreateGraphPF)(SkTArray<sk_sp<GrMockRenderTask>>* graph,
                               SkTArray<sk_sp<GrMockRenderTask>>* expected);
 
diff --git a/tests/GrSlugTest.cpp b/tests/GrSlugTest.cpp
index 2affefa..1c94494 100644
--- a/tests/GrSlugTest.cpp
+++ b/tests/GrSlugTest.cpp
@@ -5,12 +5,28 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
 #include "include/core/SkTextBlob.h"
+#include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/private/SkTDArray.h"
 #include "include/private/chromium/Slug.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <cstdint>
+#include <cstring>
+
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(GrSlug_empty,
                                        reporter,
                                        ctxInfo,
diff --git a/tests/GrStyledShapeTest.cpp b/tests/GrStyledShapeTest.cpp
index 190f78b..b7322b4 100644
--- a/tests/GrStyledShapeTest.cpp
+++ b/tests/GrStyledShapeTest.cpp
@@ -6,18 +6,42 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkClipOp.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkFlattenable.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathEffect.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkStrokeRec.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkDashPathEffect.h"
 #include "include/pathops/SkPathOps.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTemplates.h"
 #include "src/core/SkPathEffectBase.h"
+#include "src/core/SkPathPriv.h"
 #include "src/core/SkRectPriv.h"
+#include "src/gpu/ganesh/GrStyle.h"
+#include "src/gpu/ganesh/geometry/GrShape.h"
 #include "src/gpu/ganesh/geometry/GrStyledShape.h"
 #include "tests/Test.h"
 
-#include <initializer_list>
+#include <cstddef>
+#include <cstdint>
 #include <functional>
+#include <initializer_list>
 #include <memory>
+#include <string>
 #include <utility>
 
 uint32_t GrStyledShape::testingOnly_getOriginalGenerationID() const {
diff --git a/tests/GrSubmittedFlushTest.cpp b/tests/GrSubmittedFlushTest.cpp
index 91a1e6b..b559d05 100644
--- a/tests/GrSubmittedFlushTest.cpp
+++ b/tests/GrSubmittedFlushTest.cpp
@@ -5,11 +5,21 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+#include "tools/gpu/FenceSync.h"
+
+struct GrContextOptions;
 
 using namespace sk_gpu_test;
 
diff --git a/tests/GrSurfaceResolveTest.cpp b/tests/GrSurfaceResolveTest.cpp
index 69ac719..52cce88 100644
--- a/tests/GrSurfaceResolveTest.cpp
+++ b/tests/GrSurfaceResolveTest.cpp
@@ -5,18 +5,31 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrPixmap.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tests/TestUtils.h"
+#include "tools/gpu/FenceSync.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
+#include <functional>
+
+class GrBackendTexture;
+struct GrContextOptions;
+
 using namespace sk_gpu_test;
 
 bool check_pixels(skiatest::Reporter* reporter,
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 6f4447e..d6246fc 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -5,28 +5,58 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
-#include "src/core/SkCanvasPriv.h"
 #include "src/core/SkCompressedDataUtils.h"
+#include "src/gpu/Swizzle.h"
 #include "src/gpu/ganesh/GrBackendUtils.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorInfo.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRenderTarget.h"
+#include "src/gpu/ganesh/GrResourceCache.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurface.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/SkGr.h"
 #include "src/gpu/ganesh/SurfaceContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tests/TestUtils.h"
-#include "tools/gpu/BackendTextureImageFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
-#include <set>
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <tuple>
+#include <utility>
+#include <vector>
 
 // Tests that GrSurface::asTexture(), GrSurface::asRenderTarget(), and static upcasting of texture
 // and render targets to GrSurface all work as expected.
@@ -221,9 +251,6 @@
     }
 }
 
-#include "src/gpu/ganesh/GrDrawingManager.h"
-#include "src/gpu/ganesh/GrSurfaceProxy.h"
-
 // For each context, set it to always clear the textures and then run through all the
 // supported formats checking that the textures are actually cleared
 DEF_GANESH_TEST(InitialTextureClear, reporter, baseOptions, CtsEnforcement::kApiLevel_T) {
diff --git a/tests/GrTextBlobTest.cpp b/tests/GrTextBlobTest.cpp
index 434db55..c6dc3fc 100644
--- a/tests/GrTextBlobTest.cpp
+++ b/tests/GrTextBlobTest.cpp
@@ -5,19 +5,47 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkColorSpace.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTextBlob.h"
+#include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
 #include "src/core/SkDevice.h"
-#include "src/core/SkSurfacePriv.h"
-#include "src/gpu/ganesh/GrColorInfo.h"
+#include "src/core/SkScalerContext.h"
 #include "src/text/GlyphRun.h"
+#include "src/text/gpu/SDFTControl.h"
+#include "src/text/gpu/SubRunAllocator.h"
 #include "src/text/gpu/TextBlob.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <limits>
+#include <memory>
+#include <tuple>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 using BagOfBytes = sktext::gpu::BagOfBytes;
 using SubRunAllocator = sktext::gpu::SubRunAllocator;
 
diff --git a/tests/GrTextureMipMapInvalidationTest.cpp b/tests/GrTextureMipMapInvalidationTest.cpp
index fabfcf7..692a95d 100644
--- a/tests/GrTextureMipMapInvalidationTest.cpp
+++ b/tests/GrTextureMipMapInvalidationTest.cpp
@@ -5,16 +5,37 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrTexture.h"
-#include "src/image/SkImage_Base.h"
-#include "src/image/SkImage_GpuBase.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
+#include <utility>
+
+struct GrContextOptions;
+
 // Tests that MIP maps are created and invalidated as expected when drawing to and from GrTextures.
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(GrTextureMipMapInvalidationTest,
                                        reporter,
diff --git a/tests/GrThreadSafeCacheTest.cpp b/tests/GrThreadSafeCacheTest.cpp
index 7c56865..17790d9 100644
--- a/tests/GrThreadSafeCacheTest.cpp
+++ b/tests/GrThreadSafeCacheTest.cpp
@@ -5,30 +5,84 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkDeferredDisplayList.h"
 #include "include/core/SkDeferredDisplayListRecorder.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
 #include "include/core/SkSurfaceCharacterization.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
 #include "include/private/SkMalloc.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkCanvasPriv.h"
 #include "src/core/SkMessageBus.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrBuffer.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorSpaceXform.h"
 #include "src/gpu/ganesh/GrDefaultGeoProcFactory.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
+#include "src/gpu/ganesh/GrGpuBuffer.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
+#include "src/gpu/ganesh/GrRenderTargetProxy.h"
+#include "src/gpu/ganesh/GrResourceCache.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
 #include "src/gpu/ganesh/GrStyle.h"
+#include "src/gpu/ganesh/GrSurface.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/GrThreadSafeCache.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <chrono>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <memory>
 #include <thread>
+#include <tuple>
+#include <utility>
+
+class GrDstProxyView;
+class GrProgramInfo;
+class GrThreadSafeVertexTestOp;
+class SkArenaAlloc;
+struct GrContextOptions;
 
 static constexpr int kImageWH = 32;
 static constexpr auto kImageOrigin = kBottomLeft_GrSurfaceOrigin;
@@ -101,8 +155,6 @@
     return bitmap;
 }
 
-class GrThreadSafeVertexTestOp;
-
 class TestHelper {
 public:
     struct Stats {
diff --git a/tests/GradientTest.cpp b/tests/GradientTest.cpp
index 6dbc8db..edf29bc 100644
--- a/tests/GradientTest.cpp
+++ b/tests/GradientTest.cpp
@@ -5,19 +5,41 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorPriv.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/mock/GrMockTypes.h"
 #include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkMatrixProvider.h"
 #include "src/core/SkTLazy.h"
 #include "src/gpu/ganesh/GrColorInfo.h"
+#include "src/gpu/ganesh/GrFPArgs.h"
+#include "src/shaders/SkShaderBase.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <string>
+
 // https://code.google.com/p/chromium/issues/detail?id=448299
 // Giant (inverse) matrix causes overflow when converting/computing using 32.32
 // Before the fix, we would assert (and then crash).
diff --git a/tests/HSVRoundTripTest.cpp b/tests/HSVRoundTripTest.cpp
index ceae56a..7668a18 100644
--- a/tests/HSVRoundTripTest.cpp
+++ b/tests/HSVRoundTripTest.cpp
@@ -5,9 +5,10 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
 #include "include/core/SkColor.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "tests/Test.h"
 
 DEF_TEST(ColorToHSVRoundTrip, reporter) {
     SkScalar hsv[3];
diff --git a/tests/HashTest.cpp b/tests/HashTest.cpp
index 410b022..399ae27 100644
--- a/tests/HashTest.cpp
+++ b/tests/HashTest.cpp
@@ -7,12 +7,16 @@
 
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkString.h"
-#include "include/private/SkChecksum.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkTHash.h"
 #include "src/core/SkOpts.h"
 #include "tests/Test.h"
 
-#include <tuple>
+#include <cstdint>
+#include <initializer_list>
+#include <string>
+#include <string_view>
+#include <utility>
 
 // Tests use of const foreach().  map.count() is of course the better way to do this.
 static int count(const SkTHashMap<int, double>& map) {
diff --git a/tests/HighContrastFilterTest.cpp b/tests/HighContrastFilterTest.cpp
index 0441bb3..6ec1846 100644
--- a/tests/HighContrastFilterTest.cpp
+++ b/tests/HighContrastFilterTest.cpp
@@ -7,10 +7,17 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/effects/SkHighContrastFilter.h"
 #include "tests/Test.h"
 
+#include <initializer_list>
+
 DEF_TEST(HighContrastFilter_FilterImage, reporter) {
     SkHighContrastConfig config;
     config.fInvertStyle = SkHighContrastConfig::InvertStyle::kInvertLightness;
diff --git a/tests/ICCTest.cpp b/tests/ICCTest.cpp
index b86677a..29f75f4 100644
--- a/tests/ICCTest.cpp
+++ b/tests/ICCTest.cpp
@@ -5,17 +5,19 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkTypes.h"
-
-#include <cmath>
-
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkData.h"
 #include "include/core/SkICC.h"
-#include "include/core/SkString.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
 #include "modules/skcms/skcms.h"
-#include "src/core/SkColorSpacePriv.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
+
 DEF_TEST(AdobeRGB, r) {
     if (sk_sp<SkData> profile = GetResourceAsData("icc_profiles/AdobeRGB1998.icc")) {
         skcms_ICCProfile parsed;
diff --git a/tests/ImageBitmapTest.cpp b/tests/ImageBitmapTest.cpp
index 4295bed..beb8667 100644
--- a/tests/ImageBitmapTest.cpp
+++ b/tests/ImageBitmapTest.cpp
@@ -5,10 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "tests/Test.h"
 
 // https://bug.skia.org/5096
 // Test that when we make an image from a subset of a bitmap, that it
diff --git a/tests/ImageCacheTest.cpp b/tests/ImageCacheTest.cpp
index ebfd44c..5b5c4ad 100644
--- a/tests/ImageCacheTest.cpp
+++ b/tests/ImageCacheTest.cpp
@@ -5,10 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkDiscardableMemory.h"
 #include "src/core/SkResourceCache.h"
+#include "src/lazy/SkDiscardableMemoryPool.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+
 namespace {
 static void* gGlobalAddress;
 struct TestingKey : public SkResourceCache::Key {
@@ -105,8 +111,6 @@
     }
 }
 
-#include "src/lazy/SkDiscardableMemoryPool.h"
-
 static SkDiscardableMemoryPool* gPool;
 static SkDiscardableMemory* pool_factory(size_t bytes) {
     SkASSERT(gPool);
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index ddb3836..fbd7a00 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -5,17 +5,45 @@
   * found in the LICENSE file.
   */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
 #include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkImageFilters.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkImageFilterCache.h"
+#include "src/core/SkImageFilterTypes.h"
 #include "src/core/SkSpecialImage.h"
-#include "src/gpu/ganesh/GrColorInfo.h"
+#include "src/gpu/ganesh/GrColorInfo.h" // IWYU pragma: keep
+#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/SkGr.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <tuple>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
 
 static const int kSmallerSize = 10;
 static const int kPad = 3;
@@ -199,15 +227,6 @@
     test_image_backed(reporter, nullptr, srcImage);
 }
 
-#include "include/gpu/GrDirectContext.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrResourceProvider.h"
-#include "src/gpu/ganesh/GrSurfaceProxyPriv.h"
-#include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/gpu/ganesh/SkGr.h"
-
 static GrSurfaceProxyView create_proxy_view(GrRecordingContext* rContext) {
     SkBitmap srcBM = create_bm();
     return std::get<0>(GrMakeUncachedBitmapProxyView(rContext, srcBM));
diff --git a/tests/ImageFilterTest.cpp b/tests/ImageFilterTest.cpp
index 6fb3933..050de12 100644
--- a/tests/ImageFilterTest.cpp
+++ b/tests/ImageFilterTest.cpp
@@ -5,30 +5,66 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBBHFactory.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorFilter.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkFlattenable.h"
+#include "include/core/SkFont.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkPoint3.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkShader.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
 #include "include/effects/SkImageFilters.h"
 #include "include/effects/SkPerlinNoiseShader.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTArray.h"
 #include "src/core/SkColorFilterBase.h"
+#include "src/core/SkImageFilterTypes.h"
 #include "src/core/SkImageFilter_Base.h"
-#include "src/core/SkReadBuffer.h"
 #include "src/core/SkSpecialImage.h"
 #include "src/core/SkSpecialSurface.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/image/SkImage_Base.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <algorithm>
+#include <cstdint>
+#include <string>
+#include <tuple>
+#include <utility>
+
+class SkReadBuffer;
+class SkWriteBuffer;
+struct GrContextOptions;
+
 static const int kBitmapSize = 4;
 
 namespace {
diff --git a/tests/ImageFrom565Bitmap.cpp b/tests/ImageFrom565Bitmap.cpp
index 3349aa8..2c70558 100644
--- a/tests/ImageFrom565Bitmap.cpp
+++ b/tests/ImageFrom565Bitmap.cpp
@@ -5,9 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
-#include "include/core/SkImage.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "tests/Test.h"
 
 DEF_TEST(ImageFrom565Bitmap, r) {
diff --git a/tests/ImageGeneratorTest.cpp b/tests/ImageGeneratorTest.cpp
index 1678897..1034dab 100644
--- a/tests/ImageGeneratorTest.cpp
+++ b/tests/ImageGeneratorTest.cpp
@@ -5,14 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
 #include "include/core/SkGraphics.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkImageGenerator.h"
-#include "include/private/SkImageInfoPriv.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPicture.h"
+#include "include/core/SkPictureRecorder.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkYUVAInfo.h"
+#include "include/core/SkYUVAPixmaps.h"
+#include "src/core/SkAutoMalloc.h"
 #include "tests/Test.h"
 
+#include <memory>
+
 #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
     #include "include/ports/SkImageGeneratorCG.h"
 #elif defined(SK_BUILD_FOR_WIN)
@@ -81,9 +93,6 @@
     }
 }
 
-#include "include/core/SkPictureRecorder.h"
-#include "src/core/SkAutoMalloc.h"
-
 static sk_sp<SkPicture> make_picture() {
     SkPictureRecorder recorder;
     recorder.beginRecording(100, 100)->drawColor(SK_ColorRED);
diff --git a/tests/ImageIsOpaqueTest.cpp b/tests/ImageIsOpaqueTest.cpp
index 40c2118..e033c06 100644
--- a/tests/ImageIsOpaqueTest.cpp
+++ b/tests/ImageIsOpaqueTest.cpp
@@ -5,16 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
-#include "include/core/SkCanvas.h"
-#include "include/core/SkImage.h"
-#include "include/core/SkSurface.h"
-#include "include/gpu/GrDirectContext.h"
-#include "src/core/SkReadBuffer.h"
-#include "src/core/SkWriteBuffer.h"
+#include <cstdint>
+#include <initializer_list>
+
+class SkPicture;
+struct GrContextOptions;
 
 static void check_isopaque(skiatest::Reporter* reporter, const sk_sp<SkSurface>& surface,
                            bool expectedOpaque) {
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index 46ed82f..54cd2f0 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -7,14 +7,29 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <string>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 static void test_bitmap_equality(skiatest::Reporter* reporter, SkBitmap& bm1, SkBitmap& bm2) {
     REPORTER_ASSERT(reporter, bm1.computeByteSize() == bm2.computeByteSize());
     REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getPixels(), bm2.getPixels(), bm1.computeByteSize()));
diff --git a/tests/ImageTest.cpp b/tests/ImageTest.cpp
index 120e7be..25f2511 100644
--- a/tests/ImageTest.cpp
+++ b/tests/ImageTest.cpp
@@ -5,41 +5,84 @@
  * found in the LICENSE file.
  */
 
-#include <functional>
-#include <initializer_list>
-#include <vector>
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorPriv.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
+#include "include/core/SkEncodedImageFormat.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkImageEncoder.h"
 #include "include/core/SkImageGenerator.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkM44.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
-#include "include/core/SkRRect.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSerialProcs.h"
-#include "include/core/SkStream.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
-#include "include/gpu/GrContextThreadSafeProxy.h"
+#include "include/core/SkTypes.h"
+#include "include/core/SkYUVAInfo.h"
+#include "include/core/SkYUVAPixmaps.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkFloatingPoint.h"
+#include "include/private/gpu/ganesh/GrImageContext.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "modules/skcms/skcms.h"
 #include "src/core/SkAutoPixmapStorage.h"
+#include "src/core/SkBitmapCache.h"
 #include "src/core/SkColorSpacePriv.h"
 #include "src/core/SkImagePriv.h"
 #include "src/core/SkOpts.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrImageContextPriv.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
-#include "src/gpu/ganesh/GrResourceCache.h"
-#include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/image/SkImage_Base.h"
 #include "src/image/SkImage_GpuYUVA.h"
+#include "src/shaders/SkImageShader.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
+#include "tools/gpu/FenceSync.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
+#include "tools/gpu/TestContext.h"
+
+#include <algorithm>
+#include <cmath>
+#include <cstdint>
+#include <cstdlib>
+#include <cstring>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+class GrContextThreadSafeProxy;
+class GrRecordingContext;
+struct GrContextOptions;
 
 using namespace sk_gpu_test;
 
@@ -334,8 +377,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#include "src/core/SkBitmapCache.h"
-
 /*
  *  This tests the caching (and preemptive purge) of the raster equivalent of a gpu-image.
  *  We cache it for performance when drawing into a raster surface.
@@ -1546,8 +1587,6 @@
     REPORTER_ASSERT(reporter, numSubmits() == 1);
 }
 
-#include "src/shaders/SkImageShader.h"
-
 constexpr SkM44 gCentripetalCatmulRom
     (0.0f/2, -1.0f/2,  2.0f/2, -1.0f/2,
      2.0f/2,  0.0f/2, -5.0f/2,  3.0f/2,
diff --git a/tests/IncrTopoSortTest.cpp b/tests/IncrTopoSortTest.cpp
index 5a0b911..1764052 100644
--- a/tests/IncrTopoSortTest.cpp
+++ b/tests/IncrTopoSortTest.cpp
@@ -6,10 +6,15 @@
  */
 
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTDArray.h"
 #include "src/core/SkTSort.h"
 #include "tests/Test.h"
 
-#include "tools/ToolUtils.h"
+#include <algorithm>
+#include <cstdint>
 
 // A node in the graph. This corresponds to an opsTask in the MDB world.
 class Node : public SkRefCnt {
diff --git a/tests/IndexedPngOverflowTest.cpp b/tests/IndexedPngOverflowTest.cpp
index 77af8c4..ac9266a 100644
--- a/tests/IndexedPngOverflowTest.cpp
+++ b/tests/IndexedPngOverflowTest.cpp
@@ -7,7 +7,7 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
 #include "tests/CodecPriv.h"
 #include "tests/Test.h"
diff --git a/tests/InfRectTest.cpp b/tests/InfRectTest.cpp
index df05449..cab03e0 100644
--- a/tests/InfRectTest.cpp
+++ b/tests/InfRectTest.cpp
@@ -6,10 +6,14 @@
  */
 
 #include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkFloatingPoint.h"
-#include "include/utils/SkRandom.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static void check_invalid(skiatest::Reporter* reporter,
                           SkScalar l, SkScalar t, SkScalar r, SkScalar b) {
     SkRect rect;
diff --git a/tests/IsClosedSingleContourTest.cpp b/tests/IsClosedSingleContourTest.cpp
index be25b3c..7aa8716 100644
--- a/tests/IsClosedSingleContourTest.cpp
+++ b/tests/IsClosedSingleContourTest.cpp
@@ -4,6 +4,7 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPathBuilder.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/Test.h"
 
diff --git a/tests/JSONTest.cpp b/tests/JSONTest.cpp
index 1cd9093..dee44f1 100644
--- a/tests/JSONTest.cpp
+++ b/tests/JSONTest.cpp
@@ -5,12 +5,17 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkData.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkString.h"
 #include "src/core/SkArenaAlloc.h"
 #include "src/utils/SkJSON.h"
+#include "tests/Test.h"
+
+#include <cstring>
+#include <string_view>
 
 using namespace skjson;
 
diff --git a/tests/LListTest.cpp b/tests/LListTest.cpp
index 43f6ecd..999b63c 100644
--- a/tests/LListTest.cpp
+++ b/tests/LListTest.cpp
@@ -5,10 +5,11 @@
  * found in the LICENSE file.
  */
 
-#include "include/utils/SkRandom.h"
 #include "src/core/SkTInternalLList.h"
 #include "tests/Test.h"
 
+#include <utility>
+
 class ListElement {
 public:
     ListElement(int id) : fID(id) {
diff --git a/tests/LRUCacheTest.cpp b/tests/LRUCacheTest.cpp
index 982519f..838324c 100644
--- a/tests/LRUCacheTest.cpp
+++ b/tests/LRUCacheTest.cpp
@@ -5,11 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include <memory>
-
 #include "src/core/SkLRUCache.h"
 #include "tests/Test.h"
 
+#include <memory>
+#include <utility>
+
 struct Value {
     Value(int value, int* counter)
     : fValue(value)
diff --git a/tests/LazyProxyTest.cpp b/tests/LazyProxyTest.cpp
index 5d9bc56..3b524d5 100644
--- a/tests/LazyProxyTest.cpp
+++ b/tests/LazyProxyTest.cpp
@@ -5,27 +5,58 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/gpu/mock/GrMockTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkRectPriv.h"
+#include "src/gpu/AtlasTypes.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrClip.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
 #include "src/gpu/ganesh/GrOnFlushResourceProvider.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSurface.h"
 #include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrSurfaceProxyPriv.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/gpu/ganesh/GrTextureProxyPriv.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/effects/GrTextureEffect.h"
-#include "src/gpu/ganesh/mock/GrMockGpu.h"
 #include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+class GrDstProxyView;
+class GrOpFlushState;
+class GrSurfaceProxyView;
+namespace skgpu { class KeyBuilder; }
+struct GrShaderCaps;
 
 // This test verifies that lazy proxy callbacks get invoked during flush, after onFlush callbacks,
 // but before Ops are executed. It also ensures that lazy proxy callbacks are invoked both for
diff --git a/tests/LazyStencilAttachmentTest.cpp b/tests/LazyStencilAttachmentTest.cpp
index 780318f..666e71a 100644
--- a/tests/LazyStencilAttachmentTest.cpp
+++ b/tests/LazyStencilAttachmentTest.cpp
@@ -5,17 +5,28 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
-#include "include/gpu/GrRecordingContext.h"
 #include "src/core/SkAutoPixmapStorage.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <initializer_list>
+
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(crbug_1271431,
                                        reporter,
                                        context_info,
diff --git a/tests/M44Test.cpp b/tests/M44Test.cpp
index dc4375f..af625dd 100644
--- a/tests/M44Test.cpp
+++ b/tests/M44Test.cpp
@@ -6,7 +6,11 @@
  */
 
 #include "include/core/SkM44.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkMatrixPriv.h"
 #include "tests/Test.h"
diff --git a/tests/MD5Test.cpp b/tests/MD5Test.cpp
index 27528b7..c2d0ad3 100644
--- a/tests/MD5Test.cpp
+++ b/tests/MD5Test.cpp
@@ -8,6 +8,10 @@
 #include "src/core/SkMD5.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <string>
+
 static bool digests_equal(const SkMD5::Digest& expectedDigest, const SkMD5::Digest& computedDigest) {
     for (size_t i = 0; i < std::size(expectedDigest.data); ++i) {
         if (expectedDigest.data[i] != computedDigest.data[i]) {
diff --git a/tests/MallocPixelRefTest.cpp b/tests/MallocPixelRefTest.cpp
index 1288a27..7ab06a4 100644
--- a/tests/MallocPixelRefTest.cpp
+++ b/tests/MallocPixelRefTest.cpp
@@ -6,11 +6,17 @@
  */
 
 #include "include/core/SkData.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkMallocPixelRef.h"
+#include "include/core/SkPixelRef.h"
+#include "include/core/SkRefCnt.h"
 #include "src/core/SkAutoMalloc.h"
 #include "src/core/SkPixelRefPriv.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+
 static void delete_uint8_proc(void* ptr, void*) {
     delete[] static_cast<uint8_t*>(ptr);
 }
diff --git a/tests/MaskCacheTest.cpp b/tests/MaskCacheTest.cpp
index 6ed2ca4..2bb68e0 100644
--- a/tests/MaskCacheTest.cpp
+++ b/tests/MaskCacheTest.cpp
@@ -5,11 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlurTypes.h"
+#include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/private/SkMalloc.h"
 #include "src/core/SkCachedData.h"
+#include "src/core/SkMask.h"
 #include "src/core/SkMaskCache.h"
 #include "src/core/SkResourceCache.h"
 #include "tests/Test.h"
 
+#include <cstring>
+
 enum LockedState {
     kUnlocked,
     kLocked,
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 171b430..85f1986 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -5,20 +5,25 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMath.h"
 #include "include/core/SkPoint.h"
-#include "include/private/SkColorData.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkFixed.h"
+#include "include/private/SkFloatingPoint.h"
 #include "include/private/SkHalf.h"
 #include "include/private/SkTPin.h"
-#include "include/private/SkTo.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkEndian.h"
-#include "src/core/SkFDot6.h"
 #include "src/core/SkMathPriv.h"
 #include "tests/Test.h"
 
-#include <algorithm>
+#include <array>
 #include <cinttypes>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <limits>
 
 static void test_clz(skiatest::Reporter* reporter) {
     REPORTER_ASSERT(reporter, 32 == SkCLZ(0));
diff --git a/tests/MatrixColorFilterTest.cpp b/tests/MatrixColorFilterTest.cpp
index 73b6bd2..6db91c6 100644
--- a/tests/MatrixColorFilterTest.cpp
+++ b/tests/MatrixColorFilterTest.cpp
@@ -5,16 +5,31 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkColorMatrix.h"
 #include "include/gpu/GrDirectContext.h"
 #include "src/core/SkAutoPixmapStorage.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 
+#include <functional>
+
+struct GrContextOptions;
+
+
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(MatrixColorFilter_TransparentBlack,
                                        reporter,
                                        info,
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 2bec2ab..cb30a8c 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -5,13 +5,26 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkMath.h"
+#include "include/core/SkM44.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkPoint3.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatingPoint.h"
+#include "include/private/SkMalloc.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkMatrixPriv.h"
 #include "src/core/SkMatrixUtils.h"
+#include "src/core/SkPointPriv.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <initializer_list>
+#include <string>
+
 static bool nearly_equal_scalar(SkScalar a, SkScalar b) {
     const SkScalar tolerance = SK_Scalar1 / 200000;
     return SkScalarAbs(a - b) <= tolerance;
diff --git a/tests/MemoryTest.cpp b/tests/MemoryTest.cpp
index 9e5d5d3..913baa5 100644
--- a/tests/MemoryTest.cpp
+++ b/tests/MemoryTest.cpp
@@ -1,4 +1,13 @@
+ /*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "include/private/SkMalloc.h"
 #include "tests/Test.h"
+#include <cstddef>
 
 DEF_TEST(memory_calloc, reporter) {
     const size_t kNum = 200;
diff --git a/tests/MemsetTest.cpp b/tests/MemsetTest.cpp
index 60de9ab..47c4c15 100644
--- a/tests/MemsetTest.cpp
+++ b/tests/MemsetTest.cpp
@@ -5,10 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "include/utils/SkRandom.h"
 #include "src/core/SkOpts.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+
 static void set_zero(void* dst, size_t bytes) {
     char* ptr = (char*)dst;
     for (size_t i = 0; i < bytes; ++i) {
diff --git a/tests/MeshTest.cpp b/tests/MeshTest.cpp
index 9ef5916..bb1bb3a 100644
--- a/tests/MeshTest.cpp
+++ b/tests/MeshTest.cpp
@@ -5,13 +5,25 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkCanvas.h"
 #include "include/core/SkMesh.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSpan.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkRuntimeEffect.h"
 #include "src/core/SkZip.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <limits>
+#include <string>
+#include <string_view>
 #include <tuple>
+#include <utility>
+#include <vector>
 
 using Attribute = SkMeshSpecification::Attribute;
 using Varying   = SkMeshSpecification::Varying;
diff --git a/tests/MessageBusTest.cpp b/tests/MessageBusTest.cpp
index 3171611..330bf1b 100644
--- a/tests/MessageBusTest.cpp
+++ b/tests/MessageBusTest.cpp
@@ -5,10 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/SkTArray.h"
 #include "src/core/SkMessageBus.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <utility>
+
 namespace {
 
 struct TestMessage {
diff --git a/tests/MetaDataTest.cpp b/tests/MetaDataTest.cpp
index b47c020..52885d6 100644
--- a/tests/MetaDataTest.cpp
+++ b/tests/MetaDataTest.cpp
@@ -5,10 +5,13 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "tests/Test.h"
 #include "tools/SkMetaData.h"
 
+#include <cstdint>
+#include <string>
+
 DEF_TEST(MetaData, reporter) {
     SkMetaData  m1;
 
diff --git a/tests/MipMapTest.cpp b/tests/MipMapTest.cpp
index b08075b..92b76f8 100644
--- a/tests/MipMapTest.cpp
+++ b/tests/MipMapTest.cpp
@@ -5,9 +5,25 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkMalloc.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkMipmap.h"
+#include "src/core/SkMipmapBuilder.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
@@ -211,10 +227,6 @@
     sk_sp<SkMipmap> mipmap(SkMipmap::Build(bmp, nullptr));
 }
 
-#include "include/core/SkCanvas.h"
-#include "include/core/SkSurface.h"
-#include "src/core/SkMipmapBuilder.h"
-
 static void fill_in_mips(SkMipmapBuilder* builder, sk_sp<SkImage> img) {
     int count = builder->countLevels();
     for (int i = 0; i < count; ++i) {
diff --git a/tests/MultiPictureDocumentTest.cpp b/tests/MultiPictureDocumentTest.cpp
index 01349c4..9aa8915 100644
--- a/tests/MultiPictureDocumentTest.cpp
+++ b/tests/MultiPictureDocumentTest.cpp
@@ -14,20 +14,28 @@
 #include "include/core/SkFont.h"
 #include "include/core/SkImage.h"
 #include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
 #include "include/core/SkRRect.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSerialProcs.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTextBlob.h"
+#include "include/core/SkTypeface.h"
 #include "src/utils/SkMultiPictureDocument.h"
 #include "tests/Test.h"
 #include "tools/SkSharingProc.h"
 #include "tools/ToolUtils.h"
 
+#include <memory>
+#include <vector>
+
 // Covers rects, ovals, paths, images, text
 static void draw_basic(SkCanvas* canvas, int seed, sk_sp<SkImage> image) {
     canvas->drawColor(SK_ColorWHITE);
diff --git a/tests/NonlinearBlendingTest.cpp b/tests/NonlinearBlendingTest.cpp
index 3a87a5c..3c6ac3f 100644
--- a/tests/NonlinearBlendingTest.cpp
+++ b/tests/NonlinearBlendingTest.cpp
@@ -5,11 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkRefCnt.h"
 #include "modules/skcms/skcms.h"
 #include "src/core/SkColorSpaceXformSteps.h"
 #include "tests/Test.h"
 
+#include <cmath>
+
 DEF_TEST(SkColorSpaceXformSteps_vs_skcms, r) {
     auto srgb = SkColorSpace::MakeSRGB();
     auto dp3  = SkColorSpace::MakeRGB(SkNamedTransferFn::kSRGB, SkNamedGamut::kDisplayP3);
diff --git a/tests/OSPathTest.cpp b/tests/OSPathTest.cpp
index 9a39428..f5dbb7c 100644
--- a/tests/OSPathTest.cpp
+++ b/tests/OSPathTest.cpp
@@ -6,9 +6,12 @@
  */
 
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
 #include "src/utils/SkOSPath.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+
 /**
  *  Test SkOSPath::Join, SkOSPath::Basename, and SkOSPath::Dirname.
  *  Will use SkOSPath::Join to append filename to dir, test that it works correctly,
diff --git a/tests/OnceTest.cpp b/tests/OnceTest.cpp
index fdc6437..50a7cf7 100644
--- a/tests/OnceTest.cpp
+++ b/tests/OnceTest.cpp
@@ -9,6 +9,8 @@
 #include "src/core/SkTaskGroup.h"
 #include "tests/Test.h"
 
+#include <functional>
+
 static void add_five(int* x) {
     *x += 5;
 }
diff --git a/tests/OpChainTest.cpp b/tests/OpChainTest.cpp
index 5aa1a58..06a68ac 100644
--- a/tests/OpChainTest.cpp
+++ b/tests/OpChainTest.cpp
@@ -5,16 +5,50 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTDArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "include/utils/SkRandom.h"
+#include "src/gpu/AtlasTypes.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrRecordingContextPriv.h"
+#include "src/gpu/ganesh/GrRenderTargetProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrTextureResolveManager.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/ops/OpsTask.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
+
+#include <algorithm>
+#include <array>
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
 #include <iterator>
+#include <memory>
+#include <utility>
+#include <vector>
+
+class GrAppliedClip;
+class GrDrawingManager;
+class GrDstProxyView;
+class GrRecordingContext;
+class SkArenaAlloc;
+struct GrContextOptions;
 
 // We create Ops that write a value into a range of a buffer. We create ranges from
 // kNumOpPositions starting positions x kRanges canonical ranges. We repeat each range kNumRepeats
diff --git a/tests/OverAlignedTest.cpp b/tests/OverAlignedTest.cpp
index 879947e..09e038d 100644
--- a/tests/OverAlignedTest.cpp
+++ b/tests/OverAlignedTest.cpp
@@ -5,8 +5,11 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkTypes.h"
+#include "include/private/SkMalloc.h"
 #include "include/utils/SkRandom.h"
 #include "tests/Test.h"
+#include <stdint.h>
 
 // Clang seems to think only 32-bit alignment is guaranteed on 32-bit x86 Android.
 // See https://reviews.llvm.org/D8357
diff --git a/tests/PDFDeflateWStreamTest.cpp b/tests/PDFDeflateWStreamTest.cpp
index 89aa94a..9ec5842 100644
--- a/tests/PDFDeflateWStreamTest.cpp
+++ b/tests/PDFDeflateWStreamTest.cpp
@@ -5,13 +5,22 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #ifdef SK_SUPPORT_PDF
-
+#include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/private/SkMalloc.h"
+#include "include/private/SkTemplates.h"
 #include "include/private/SkTo.h"
 #include "include/utils/SkRandom.h"
 #include "src/pdf/SkDeflate.h"
+#include "tests/Test.h"
+
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <memory>
 
 namespace {
 
diff --git a/tests/PDFDocumentTest.cpp b/tests/PDFDocumentTest.cpp
index 36244cc..f17b56f 100644
--- a/tests/PDFDocumentTest.cpp
+++ b/tests/PDFDocumentTest.cpp
@@ -4,18 +4,26 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/Test.h"
-
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
+#include "include/core/SkDocument.h"
 #include "include/core/SkExecutor.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
 #include "include/docs/SkPDFDocument.h"
-#include "src/core/SkOSFile.h"
 #include "src/utils/SkOSPath.h"
-#include "tools/Resources.h"
+#include "tests/Test.h"
 
-#include "tools/ToolUtils.h"
+#include <cstdint>
+#include <cstdio>
+#include <memory>
+#include <string>
 
 static void test_empty(skiatest::Reporter* reporter) {
     SkDynamicMemoryWStream stream;
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp
index b81d144..ba31e8b 100644
--- a/tests/PDFGlyphsToUnicodeTest.cpp
+++ b/tests/PDFGlyphsToUnicodeTest.cpp
@@ -5,15 +5,21 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #ifdef SK_SUPPORT_PDF
 
-#include "include/core/SkData.h"
 #include "include/core/SkStream.h"
 #include "include/private/SkTDArray.h"
+#include "include/private/SkTemplates.h"
 #include "include/private/SkTo.h"
+#include "src/pdf/SkPDFGlyphUse.h"
 #include "src/pdf/SkPDFMakeToUnicodeCmap.h"
+#include "tests/Test.h"
+
+#include <algorithm>
+#include <cstdint>
+#include <cstring>
 
 static constexpr SkGlyphID kMaximumGlyphIndex = UINT16_MAX;
 
diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp
index f8d4cf6..66b333e 100644
--- a/tests/PDFJpegEmbedTest.cpp
+++ b/tests/PDFJpegEmbedTest.cpp
@@ -5,15 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/codec/SkEncodedOrigin.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkData.h"
-#include "include/core/SkImageGenerator.h"
+#include "include/core/SkDocument.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkTypes.h"
 #include "include/docs/SkPDFDocument.h"
-
+#include "include/private/SkEncodedInfo.h"
+#include "src/pdf/SkJpegInfo.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <array>
+#include <cstdint>
+#include <cstring>
+
 static bool is_subset_of(SkData* smaller, SkData* larger) {
     SkASSERT(smaller && larger);
     if (smaller->size() > larger->size()) {
@@ -81,8 +92,6 @@
 
 #ifdef SK_SUPPORT_PDF
 
-#include "src/pdf/SkJpegInfo.h"
-
 struct SkJFIFInfo {
     SkISize fSize;
     enum Type {
diff --git a/tests/PDFMetadataAttributeTest.cpp b/tests/PDFMetadataAttributeTest.cpp
index e736fac..9aefbd6 100644
--- a/tests/PDFMetadataAttributeTest.cpp
+++ b/tests/PDFMetadataAttributeTest.cpp
@@ -5,10 +5,17 @@
  * found in the LICENSE file.
  */
 #include "include/core/SkData.h"
+#include "include/core/SkDocument.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
 #include "include/docs/SkPDFDocument.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <cstring>
+
 DEF_TEST(SkPDF_Metadata, r) {
     REQUIRE_PDF_DOCUMENT(SkPDF_Metadata, r);
     SkTime::DateTime now;
diff --git a/tests/PDFOpaqueSrcModeToSrcOverTest.cpp b/tests/PDFOpaqueSrcModeToSrcOverTest.cpp
index e01b159..a1449fe 100644
--- a/tests/PDFOpaqueSrcModeToSrcOverTest.cpp
+++ b/tests/PDFOpaqueSrcModeToSrcOverTest.cpp
@@ -5,8 +5,15 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkDocument.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkTypes.h"
 #include "include/docs/SkPDFDocument.h"
 #include "tests/Test.h"
 
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 137b491..80fe301 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -9,35 +9,55 @@
 
 #ifdef SK_SUPPORT_PDF
 
-#include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkData.h"
-#include "include/core/SkImageEncoder.h"
-#include "include/core/SkMatrix.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkDocument.h"
+#include "include/core/SkFlattenable.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkScalar.h"
+#include "include/core/SkSpan.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypes.h"
+#include "include/docs/SkPDFDocument.h"
 #include "include/effects/SkImageFilters.h"
 #include "include/effects/SkPerlinNoiseShader.h"
+#include "include/private/SkFloatingPoint.h"
 #include "include/private/SkTo.h"
+#include "include/utils/SkRandom.h"
 #include "src/core/SkImageFilter_Base.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkSpecialImage.h"
 #include "src/pdf/SkClusterator.h"
-#include "src/pdf/SkDeflate.h"
-#include "src/pdf/SkPDFDevice.h"
 #include "src/pdf/SkPDFDocumentPriv.h"
 #include "src/pdf/SkPDFFont.h"
 #include "src/pdf/SkPDFTypes.h"
 #include "src/pdf/SkPDFUnion.h"
 #include "src/pdf/SkPDFUtils.h"
 #include "src/text/GlyphRun.h"
+#include "src/utils/SkFloatToDecimal.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <cfloat>
 #include <cmath>
+#include <cstdint>
+#include <cstdio>
 #include <cstdlib>
 #include <memory>
+#include <string>
+#include <utility>
+
+class SkTypeface;
 
 template <typename T>
 static SkString emit_to_string(T& obj) {
diff --git a/tests/PDFTaggedLinkTest.cpp b/tests/PDFTaggedLinkTest.cpp
index 591ed33..7c979f7 100644
--- a/tests/PDFTaggedLinkTest.cpp
+++ b/tests/PDFTaggedLinkTest.cpp
@@ -4,15 +4,30 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #ifdef SK_SUPPORT_PDF
-
 #include "include/core/SkAnnotation.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
+#include "include/core/SkDocument.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
+#include "include/core/SkTypeface.h"
 #include "include/docs/SkPDFDocument.h"
+#include "tests/Test.h"
+
+#include <memory>
+#include <utility>
+#include <vector>
 
 using PDFTag = SkPDF::StructureElementNode;
 
diff --git a/tests/PDFTaggedPruningTest.cpp b/tests/PDFTaggedPruningTest.cpp
index 6265014..f25ddb5 100644
--- a/tests/PDFTaggedPruningTest.cpp
+++ b/tests/PDFTaggedPruningTest.cpp
@@ -4,14 +4,27 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #ifdef SK_SUPPORT_PDF
-
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkDocument.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
+#include "include/core/SkTypeface.h"
 #include "include/docs/SkPDFDocument.h"
+#include "tests/Test.h"
+
+#include <memory>
+#include <utility>
+#include <vector>
 
 using PDFTag = SkPDF::StructureElementNode;
 
diff --git a/tests/PDFTaggedTableTest.cpp b/tests/PDFTaggedTableTest.cpp
index f108970..1a2336a 100644
--- a/tests/PDFTaggedTableTest.cpp
+++ b/tests/PDFTaggedTableTest.cpp
@@ -9,10 +9,22 @@
 #ifdef SK_SUPPORT_PDF
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkDocument.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
+#include "include/core/SkTypeface.h"
 #include "include/docs/SkPDFDocument.h"
 
+#include <memory>
+#include <utility>
+#include <vector>
+
 using PDFTag = SkPDF::StructureElementNode;
 
 // Test building a tagged PDF containing a table.
diff --git a/tests/PDFTaggedTest.cpp b/tests/PDFTaggedTest.cpp
index 57d2bea5..42e43c0 100644
--- a/tests/PDFTaggedTest.cpp
+++ b/tests/PDFTaggedTest.cpp
@@ -4,14 +4,24 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/Test.h"
-
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkDocument.h"
 #include "include/core/SkFont.h"
-#include "include/core/SkImage.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTime.h"
+#include "include/core/SkTypeface.h"
 #include "include/docs/SkPDFDocument.h"
+#include "tests/Test.h"
+
+#include <memory>
+#include <utility>
+#include <vector>
 
 using PDFTag = SkPDF::StructureElementNode;
 
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index ed45861..8fa9214 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -5,21 +5,34 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkBlurTypes.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontTypes.h"
 #include "include/core/SkMaskFilter.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
-#include "include/core/SkTypeface.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
 #include "include/effects/SkColorMatrix.h"
-#include "include/private/SkTo.h"
-#include "include/utils/SkRandom.h"
+#include "include/private/SkTemplates.h"
 #include "src/core/SkAutoMalloc.h"
 #include "src/core/SkBlurMask.h"
 #include "src/core/SkPaintPriv.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkWriteBuffer.h"
-#include "src/utils/SkUTF.h"
 #include "tests/Test.h"
+
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <optional>
+#include <string>
+
 #undef ASSERT
 
 DEF_TEST(Paint_copy, reporter) {
diff --git a/tests/ParametricStageTest.cpp b/tests/ParametricStageTest.cpp
index 173cb76..9716669 100644
--- a/tests/ParametricStageTest.cpp
+++ b/tests/ParametricStageTest.cpp
@@ -5,10 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkColorSpace.h"
+#include "modules/skcms/skcms.h"
 #include "src/core/SkRasterPipeline.h"
 #include "tests/Test.h"
 
+#include <cmath>
+
 static void check_error(skiatest::Reporter* r, float limit, skcms_TransferFunction fn) {
     float in[256], out[256];
     for (int i = 0; i < 256; i++) {
diff --git a/tests/ParseColorTest.cpp b/tests/ParseColorTest.cpp
index 35f80de..cf9716f 100644
--- a/tests/ParseColorTest.cpp
+++ b/tests/ParseColorTest.cpp
@@ -5,9 +5,13 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkColor.h"
+#include "include/core/SkString.h"
 #include "include/utils/SkParse.h"
 #include "tests/Test.h"
 
+#include <string>
+
 static constexpr struct {
     const char* fName;
     SkColor     fColor;
diff --git a/tests/ParsePathTest.cpp b/tests/ParsePathTest.cpp
index 551b1a0..9051fe9 100644
--- a/tests/ParsePathTest.cpp
+++ b/tests/ParsePathTest.cpp
@@ -5,9 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPath.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
 #include "include/utils/SkParsePath.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static void test_to_from(skiatest::Reporter* reporter, const SkPath& path) {
     SkString str, str2;
     SkParsePath::ToSVGString(path, &str);
diff --git a/tests/PathBuilderTest.cpp b/tests/PathBuilderTest.cpp
index 94b7e6e..441ebac 100644
--- a/tests/PathBuilderTest.cpp
+++ b/tests/PathBuilderTest.cpp
@@ -5,13 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPath.h"
 #include "include/core/SkPathBuilder.h"
 #include "include/core/SkPathTypes.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/private/SkPathRef.h"
+#include "include/utils/SkRandom.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
 #include <vector>
 
 static void is_empty(skiatest::Reporter* reporter, const SkPath& p) {
@@ -232,8 +239,6 @@
     }
 }
 
-#include "include/utils/SkRandom.h"
-
 DEF_TEST(pathbuilder_make, reporter) {
     constexpr int N = 100;
     uint8_t vbs[N];
diff --git a/tests/PathCoverageTest.cpp b/tests/PathCoverageTest.cpp
index 9defb5c..50fd32c 100644
--- a/tests/PathCoverageTest.cpp
+++ b/tests/PathCoverageTest.cpp
@@ -5,11 +5,17 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPoint.h"
 #include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkMathPriv.h"
 #include "src/core/SkPointPriv.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <array>
+#include <cstdint>
+
 /*
    Duplicates lots of code from gpu/src/GrPathUtils.cpp
    It'd be nice not to do so, but that code's set up currently to only have
diff --git a/tests/PathMeasureTest.cpp b/tests/PathMeasureTest.cpp
index c3867b4..3ec2454 100644
--- a/tests/PathMeasureTest.cpp
+++ b/tests/PathMeasureTest.cpp
@@ -5,10 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkContourMeasure.h"
+#include "include/core/SkPath.h"
 #include "include/core/SkPathMeasure.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <initializer_list>
+
 static void test_small_segment3() {
     SkPath path;
     const SkPoint pts[] = {
@@ -229,8 +239,6 @@
     REPORTER_ASSERT(reporter, !meas.nextContour());
 }
 
-#include "include/core/SkContourMeasure.h"
-
 static void test_90_degrees(sk_sp<SkContourMeasure> cm, SkScalar radius,
                             skiatest::Reporter* reporter) {
     SkPoint pos;
diff --git a/tests/PathOpsAngleIdeas.cpp b/tests/PathOpsAngleIdeas.cpp
index 1b0bc54..069414b 100644
--- a/tests/PathOpsAngleIdeas.cpp
+++ b/tests/PathOpsAngleIdeas.cpp
@@ -4,15 +4,30 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkTArray.h"
 #include "include/utils/SkRandom.h"
+#include "src/core/SkArenaAlloc.h"
 #include "src/core/SkTSort.h"
 #include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkOpAngle.h"
 #include "src/pathops/SkOpContour.h"
 #include "src/pathops/SkOpSegment.h"
+#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsRect.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <array>
+#include <cfloat>
+#include <cmath>
+
 static bool gPathOpsAngleIdeasVerbose = false;
 static bool gPathOpsAngleIdeasEnableBruteCheck = false;
 
diff --git a/tests/PathOpsAngleTest.cpp b/tests/PathOpsAngleTest.cpp
index 9550389..485d976 100644
--- a/tests/PathOpsAngleTest.cpp
+++ b/tests/PathOpsAngleTest.cpp
@@ -4,13 +4,27 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
 #include "include/utils/SkRandom.h"
+#include "src/core/SkArenaAlloc.h"
 #include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkOpAngle.h"
 #include "src/pathops/SkOpContour.h"
 #include "src/pathops/SkOpSegment.h"
+#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cfloat>
+#include <cmath>
+
 static bool gDisableAngleTests = true;
 
 static float next(float f)
diff --git a/tests/PathOpsAsWindingTest.cpp b/tests/PathOpsAsWindingTest.cpp
index d4118abe..ed37069 100644
--- a/tests/PathOpsAsWindingTest.cpp
+++ b/tests/PathOpsAsWindingTest.cpp
@@ -5,11 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
 #include "include/utils/SkParsePath.h"
-#include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsThreadedCommon.h"
 #include "tests/Test.h"
 
+#include <initializer_list>
+#include <string>
+
 static SkPath build_squircle(SkPath::Verb verb, const SkRect& rect, SkPathDirection dir) {
     SkPath path;
     bool reverse = SkPathDirection::kCCW == dir;
diff --git a/tests/PathOpsBattles.cpp b/tests/PathOpsBattles.cpp
index 3875128..cb54d4e 100644
--- a/tests/PathOpsBattles.cpp
+++ b/tests/PathOpsBattles.cpp
@@ -4,8 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsTestCommon.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsBoundsTest.cpp b/tests/PathOpsBoundsTest.cpp
index 785a4c2..1fe39d3 100644
--- a/tests/PathOpsBoundsTest.cpp
+++ b/tests/PathOpsBoundsTest.cpp
@@ -4,11 +4,20 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkPathOpsBounds.h"
+#include "src/pathops/SkPathOpsCubic.h"
 #include "src/pathops/SkPathOpsCurve.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const SkRect sectTests[][2] = {
     {{2, 0, 4, 1}, {4, 0, 6, 1}},
     {{2, 0, 4, 1}, {3, 0, 5, 1}},
diff --git a/tests/PathOpsBuildUseTest.cpp b/tests/PathOpsBuildUseTest.cpp
index feb36c5..47a376f 100644
--- a/tests/PathOpsBuildUseTest.cpp
+++ b/tests/PathOpsBuildUseTest.cpp
@@ -4,8 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsTestCommon.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsBuilderConicTest.cpp b/tests/PathOpsBuilderConicTest.cpp
index a8a9ba7..3c3b225 100644
--- a/tests/PathOpsBuilderConicTest.cpp
+++ b/tests/PathOpsBuilderConicTest.cpp
@@ -5,10 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBitmap.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkScalar.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "include/utils/SkParsePath.h"
 #include "include/utils/SkRandom.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/SubsetPath.h"
+#include "tests/Test.h"
+#include "tools/flags/CommandLineFlags.h"
 
 #define DEBUG_SIMPLIFY_FAILS 0
 
@@ -88,8 +98,6 @@
     testOne(reporter, set);
 }
 
-#include "tools/flags/CommandLineFlags.h"
-
 static DEFINE_int(processOffset, 0,
                     "Offset the test by this value. This permits multiple processes "
                     "to exercise the same test in parallel with different test values.");
@@ -623,8 +631,6 @@
 " Q 146.3946533203125 126.4554138183594 146.4066772460938 129.8022613525391"
 " Q 146.4187316894531 133.1491088867188 146.4187316894531 136.5 Z";
 
-#include "include/utils/SkParsePath.h"
-
 DEF_TEST(PathOpsOvalsAsQuads, reporter) {
     if ((false)) { // don't execute this for now
         SkPath path;
diff --git a/tests/PathOpsBuilderTest.cpp b/tests/PathOpsBuilderTest.cpp
index 31c02fe..45b2b24 100644
--- a/tests/PathOpsBuilderTest.cpp
+++ b/tests/PathOpsBuilderTest.cpp
@@ -5,9 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkBitmap.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkRect.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
 DEF_TEST(PathOpsBuilder, reporter) {
diff --git a/tests/PathOpsChalkboardTest.cpp b/tests/PathOpsChalkboardTest.cpp
index 8f58713..211c303 100644
--- a/tests/PathOpsChalkboardTest.cpp
+++ b/tests/PathOpsChalkboardTest.cpp
@@ -4,10 +4,20 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
+#include "include/private/SkTDArray.h"
 #include "include/utils/SkRandom.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
+
+#include <array>
 #include <atomic>
+#include <cstddef>
+#include <cstdint>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsConicIntersectionTest.cpp b/tests/PathOpsConicIntersectionTest.cpp
index 89b5528..267b776 100644
--- a/tests/PathOpsConicIntersectionTest.cpp
+++ b/tests/PathOpsConicIntersectionTest.cpp
@@ -4,11 +4,20 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkGeometry.h"
 #include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkPathOpsConic.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+
 /*
 manually compute the intersection of a pair of circles and see if the conic intersection matches
   given two circles
@@ -60,6 +69,9 @@
 #endif
 }
 
+#define DEBUG_VISUALIZE_CONICS 0
+
+#if DEBUG_VISUALIZE_CONICS
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkImageEncoder.h"
@@ -67,9 +79,6 @@
 #include "include/core/SkString.h"
 #include "src/pathops/SkPathOpsRect.h"
 
-#define DEBUG_VISUALIZE_CONICS 0
-
-#if DEBUG_VISUALIZE_CONICS
 static void writePng(const SkConic& c, const SkConic ch[2], const char* name) {
     const int scale = 10;
     SkConic conic, chopped[2];
diff --git a/tests/PathOpsConicLineIntersectionTest.cpp b/tests/PathOpsConicLineIntersectionTest.cpp
index 18749fc..ad8a6fd 100644
--- a/tests/PathOpsConicLineIntersectionTest.cpp
+++ b/tests/PathOpsConicLineIntersectionTest.cpp
@@ -4,15 +4,21 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkGeometry.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsConic.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
-#include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
 #include <utility>
 
 static struct lineConic {
diff --git a/tests/PathOpsConicQuadIntersectionTest.cpp b/tests/PathOpsConicQuadIntersectionTest.cpp
index 3515b5c..a5cadd7 100644
--- a/tests/PathOpsConicQuadIntersectionTest.cpp
+++ b/tests/PathOpsConicQuadIntersectionTest.cpp
@@ -4,13 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsConic.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+
 static struct conicQuad {
     ConicPts conic;
     QuadPts quad;
diff --git a/tests/PathOpsCubicConicIntersectionTest.cpp b/tests/PathOpsCubicConicIntersectionTest.cpp
index d27d706..2cbb5a2 100644
--- a/tests/PathOpsCubicConicIntersectionTest.cpp
+++ b/tests/PathOpsCubicConicIntersectionTest.cpp
@@ -4,13 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsConic.h"
 #include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <iterator>
+
 static struct cubicConic {
     CubicPts cubic;
     ConicPts conic;
diff --git a/tests/PathOpsCubicIntersectionTest.cpp b/tests/PathOpsCubicIntersectionTest.cpp
index 6e6f970..c8aba84 100644
--- a/tests/PathOpsCubicIntersectionTest.cpp
+++ b/tests/PathOpsCubicIntersectionTest.cpp
@@ -4,15 +4,23 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkGeometry.h"
 #include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsDebug.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsRect.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsCubicIntersectionTestData.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
-#include <stdlib.h>
+#include <array>
+#include <cstdlib>
 
 using namespace PathOpsCubicIntersectionTestData;
 
diff --git a/tests/PathOpsCubicIntersectionTestData.cpp b/tests/PathOpsCubicIntersectionTestData.cpp
index 60e75f1..4e383b9 100644
--- a/tests/PathOpsCubicIntersectionTestData.cpp
+++ b/tests/PathOpsCubicIntersectionTestData.cpp
@@ -5,9 +5,11 @@
  * found in the LICENSE file.
  */
 
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsCubicIntersectionTestData.h"
 
-#include <limits>
+#include <array>
+#include <cfloat>
 
 namespace PathOpsCubicIntersectionTestData {
 
diff --git a/tests/PathOpsCubicIntersectionTestData.h b/tests/PathOpsCubicIntersectionTestData.h
index 69e8c83..59e62fc 100644
--- a/tests/PathOpsCubicIntersectionTestData.h
+++ b/tests/PathOpsCubicIntersectionTestData.h
@@ -6,6 +6,8 @@
  */
 #include "tests/PathOpsTestCommon.h"
 
+#include <cstddef>
+
 namespace PathOpsCubicIntersectionTestData {
 
 extern const CubicPts pointDegenerates[];
diff --git a/tests/PathOpsCubicLineIntersectionIdeas.cpp b/tests/PathOpsCubicLineIntersectionIdeas.cpp
index 026a339..7c92268 100644
--- a/tests/PathOpsCubicLineIntersectionIdeas.cpp
+++ b/tests/PathOpsCubicLineIntersectionIdeas.cpp
@@ -4,15 +4,18 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
-#include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsCubic.h"
-#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
-#include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <array>
+#include <cmath>
+
 static bool gPathOpsCubicLineIntersectionIdeasVerbose = false;
 
 static struct CubicLineFailures {
diff --git a/tests/PathOpsCubicLineIntersectionTest.cpp b/tests/PathOpsCubicLineIntersectionTest.cpp
index 7b0e91f..b895f00 100644
--- a/tests/PathOpsCubicLineIntersectionTest.cpp
+++ b/tests/PathOpsCubicLineIntersectionTest.cpp
@@ -4,13 +4,18 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
 #include <utility>
 
 struct lineCubic {
diff --git a/tests/PathOpsCubicQuadIntersectionTest.cpp b/tests/PathOpsCubicQuadIntersectionTest.cpp
index 51a194f..d6002ba 100644
--- a/tests/PathOpsCubicQuadIntersectionTest.cpp
+++ b/tests/PathOpsCubicQuadIntersectionTest.cpp
@@ -4,14 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "include/utils/SkRandom.h"
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+
 static struct quadCubic {
     CubicPts cubic;
     QuadPts quad;
diff --git a/tests/PathOpsCubicReduceOrderTest.cpp b/tests/PathOpsCubicReduceOrderTest.cpp
index 9a1a6a1..51f4c76 100644
--- a/tests/PathOpsCubicReduceOrderTest.cpp
+++ b/tests/PathOpsCubicReduceOrderTest.cpp
@@ -4,14 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "src/pathops/SkIntersections.h"
-#include "src/pathops/SkPathOpsRect.h"
+#include "include/core/SkTypes.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsCubicIntersectionTestData.h"
 #include "tests/PathOpsQuadIntersectionTestData.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+
 using namespace PathOpsCubicIntersectionTestData;
 
 #if 0 // disable test until stroke reduction is supported
diff --git a/tests/PathOpsDCubicTest.cpp b/tests/PathOpsDCubicTest.cpp
index acb33fe..9ebd33c 100644
--- a/tests/PathOpsDCubicTest.cpp
+++ b/tests/PathOpsDCubicTest.cpp
@@ -8,6 +8,9 @@
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const CubicPts hullTests[] = {
 {{{2.6250000819563866, 2.3750000223517418}, {2.833333432674408, 2.3333333432674408}, {3.1111112236976624, 2.3333333134651184}, {3.4074075222015381, 2.3333332538604736}}},
 };
diff --git a/tests/PathOpsDLineTest.cpp b/tests/PathOpsDLineTest.cpp
index 51175ab..0c5521f 100644
--- a/tests/PathOpsDLineTest.cpp
+++ b/tests/PathOpsDLineTest.cpp
@@ -4,10 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const SkDLine tests[] = {
     {{{2, 1}, {2, 1}}},
     {{{2, 1}, {1, 1}}},
diff --git a/tests/PathOpsDPointTest.cpp b/tests/PathOpsDPointTest.cpp
index 4750f15..50c29e9 100644
--- a/tests/PathOpsDPointTest.cpp
+++ b/tests/PathOpsDPointTest.cpp
@@ -4,10 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cmath>
+#include <cstddef>
+
 static const SkDPoint tests[] = {
     {0, 0},
     {1, 0},
diff --git a/tests/PathOpsDRectTest.cpp b/tests/PathOpsDRectTest.cpp
index 289da24..bbb7581 100644
--- a/tests/PathOpsDRectTest.cpp
+++ b/tests/PathOpsDRectTest.cpp
@@ -4,13 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkPathOpsCubic.h"
-#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkPathOpsRect.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const QuadPts quadTests[] = {
     {{{1, 1}, {2, 1}, {0, 2}}},
     {{{0, 0}, {1, 1}, {3, 1}}},
diff --git a/tests/PathOpsDVectorTest.cpp b/tests/PathOpsDVectorTest.cpp
index b675931..2312507 100644
--- a/tests/PathOpsDVectorTest.cpp
+++ b/tests/PathOpsDVectorTest.cpp
@@ -4,10 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cmath>
+#include <cstddef>
+
 static const SkDPoint tests[] = {
     {0, 0},
     {1, 0},
diff --git a/tests/PathOpsDebug.cpp b/tests/PathOpsDebug.cpp
index 6bc7f9e..4f05604 100644
--- a/tests/PathOpsDebug.cpp
+++ b/tests/PathOpsDebug.cpp
@@ -5,14 +5,33 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkString.h"
-#include "include/private/SkMutex.h"
-#include "src/pathops/SkIntersectionHelper.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "src/core/SkArenaAlloc.h"
+#include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkOpAngle.h"
 #include "src/pathops/SkOpCoincidence.h"
 #include "src/pathops/SkOpContour.h"
 #include "src/pathops/SkOpSegment.h"
+#include "src/pathops/SkOpSpan.h"
+#include "src/pathops/SkPathOpsConic.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsCurve.h"
+#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsRect.h"
+#include "src/pathops/SkPathOpsTSect.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsDebug.h"
-#include "tests/PathOpsTSectDebug.h"
+
+#include <algorithm>
+#include <cfloat>
+#include <cmath>
+#include <cstdint>
 
 bool PathOpsDebug::gJson;
 bool PathOpsDebug::gMarkJsonFlaky;
diff --git a/tests/PathOpsDebug.h b/tests/PathOpsDebug.h
index 7fd7f03..8ad8c71 100644
--- a/tests/PathOpsDebug.h
+++ b/tests/PathOpsDebug.h
@@ -8,7 +8,7 @@
 #ifndef PathOpsDebug_DEFINED
 #define PathOpsDebug_DEFINED
 
-#include <stdio.h>
+#include <cstdio>
 
 class PathOpsDebug {
 public:
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index c343168..86fbb0d 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -7,21 +7,35 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
 #include "include/private/SkMutex.h"
+#include "include/private/SkTDArray.h"
 #include "include/utils/SkParsePath.h"
 #include "src/core/SkPathPriv.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
-#include <stdlib.h>
-#include <vector>
-#include <string>
 #include <algorithm>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <vector>
 
 std::vector<std::string> gUniqueNames;
 
diff --git a/tests/PathOpsExtendedTest.h b/tests/PathOpsExtendedTest.h
index 776cbf6..72086dc 100644
--- a/tests/PathOpsExtendedTest.h
+++ b/tests/PathOpsExtendedTest.h
@@ -8,11 +8,12 @@
 #define PathOpsExtendedTest_DEFINED
 
 #include "include/core/SkBitmap.h"
-#include "include/core/SkPath.h"
-#include "include/core/SkStream.h"
-#include "src/pathops/SkPathOpsTypes.h"
-#include "tests/Test.h"
+#include "include/pathops/SkPathOps.h"
 
+#include <cstddef>
+
+class SkPath;
+namespace skiatest { class Reporter; }
 struct PathOpsThreadState;
 
 struct TestDesc {
diff --git a/tests/PathOpsFuzz763Test.cpp b/tests/PathOpsFuzz763Test.cpp
index d4a436d..38cf3c3 100644
--- a/tests/PathOpsFuzz763Test.cpp
+++ b/tests/PathOpsFuzz763Test.cpp
@@ -4,8 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsTestCommon.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
+
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsInverseTest.cpp b/tests/PathOpsInverseTest.cpp
index e9d8765..fd7de6d 100644
--- a/tests/PathOpsInverseTest.cpp
+++ b/tests/PathOpsInverseTest.cpp
@@ -4,7 +4,12 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkString.h"
+#include "include/pathops/SkPathOps.h"
 #include "tests/PathOpsExtendedTest.h"
+#include "tests/Test.h"
 
 DEF_TEST(PathOpsInverse, reporter) {
     const SkPathDirection dirs[] = {SkPathDirection::kCW, SkPathDirection::kCCW};
diff --git a/tests/PathOpsIssue3651.cpp b/tests/PathOpsIssue3651.cpp
index bb12a99..32fd292 100644
--- a/tests/PathOpsIssue3651.cpp
+++ b/tests/PathOpsIssue3651.cpp
@@ -4,8 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsExtendedTest.h"
-#include "tests/PathOpsTestCommon.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsLineIntersectionTest.cpp b/tests/PathOpsLineIntersectionTest.cpp
index a49713f..3bd8633 100644
--- a/tests/PathOpsLineIntersectionTest.cpp
+++ b/tests/PathOpsLineIntersectionTest.cpp
@@ -4,11 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <array>
+#include <cstddef>
+
 // FIXME: add tests for intersecting, non-intersecting, degenerate, coincident
 static const SkDLine tests[][2] = {
 {{{{0.00010360032320022583, 1.0172703415155411}, {0.00014114845544099808, 1.0200891587883234}}},
diff --git a/tests/PathOpsLineParametetersTest.cpp b/tests/PathOpsLineParametetersTest.cpp
index 4a5c32f..085372c 100644
--- a/tests/PathOpsLineParametetersTest.cpp
+++ b/tests/PathOpsLineParametetersTest.cpp
@@ -4,10 +4,18 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkLineParameters.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cfloat>
+#include <cmath>
+#include <cstddef>
+
 // tests to verify that distance calculations are coded correctly
 static const CubicPts tests[] = {
     {{{0, 0}, {1, 1}, {2, 2}, {0, 3}}},
diff --git a/tests/PathOpsOpCircleThreadedTest.cpp b/tests/PathOpsOpCircleThreadedTest.cpp
index 0ac492b..bd7d461 100644
--- a/tests/PathOpsOpCircleThreadedTest.cpp
+++ b/tests/PathOpsOpCircleThreadedTest.cpp
@@ -4,10 +4,19 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkTDArray.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 #include <atomic>
 
diff --git a/tests/PathOpsOpCubicThreadedTest.cpp b/tests/PathOpsOpCubicThreadedTest.cpp
index d692c44..05fc974 100644
--- a/tests/PathOpsOpCubicThreadedTest.cpp
+++ b/tests/PathOpsOpCubicThreadedTest.cpp
@@ -4,10 +4,18 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkTDArray.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 #include <atomic>
 
diff --git a/tests/PathOpsOpLoopThreadedTest.cpp b/tests/PathOpsOpLoopThreadedTest.cpp
index 2d70bf8..8233b53 100644
--- a/tests/PathOpsOpLoopThreadedTest.cpp
+++ b/tests/PathOpsOpLoopThreadedTest.cpp
@@ -4,10 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 #include <atomic>
 
diff --git a/tests/PathOpsOpRectThreadedTest.cpp b/tests/PathOpsOpRectThreadedTest.cpp
index b3809e0..663719d 100644
--- a/tests/PathOpsOpRectThreadedTest.cpp
+++ b/tests/PathOpsOpRectThreadedTest.cpp
@@ -4,11 +4,21 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkTDArray.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
+
 #include <atomic>
+#include <initializer_list>
 
 // four rects, of four sizes
 // for 3 smaller sizes, tall, wide
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp
index cc41b71..61aac9a 100644
--- a/tests/PathOpsOpTest.cpp
+++ b/tests/PathOpsOpTest.cpp
@@ -4,9 +4,27 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "include/utils/SkParsePath.h"
+#include "src/core/SkGeometry.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "tests/PathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsTestCommon.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
 
 class PathTest_Private {
 public:
@@ -3590,8 +3608,6 @@
     testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
 }
 
-#include "src/pathops/SkPathOpsCubic.h"
-
 static void loop1asQuad(skiatest::Reporter* reporter, const char* filename) {
     CubicPts cubic1 = {{{0,1}, {1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}}};
     CubicPts cubic2 = {{{1,5}, {-5.66666651f,3.33333349f}, {8.83333302f,2.33333349f}, {0,1}}};
@@ -3656,8 +3672,6 @@
     testPathOp(reporter, path, pathB, kIntersect_SkPathOp, filename);
 }
 
-#include "include/utils/SkParsePath.h"
-
 static void issue3517(skiatest::Reporter* reporter, const char* filename) {
     SkPath path, pathB;
 
@@ -3848,8 +3862,6 @@
     testPathOp(reporter, path, pathB, kDifference_SkPathOp, filename);
 }
 
-#include "src/core/SkGeometry.h"
-
 static void complex_to_quads(const SkPoint pts[], SkPath* path) {
     SkScalar loopT[3];
     if (SkDCubic::ComplexBreak(pts, loopT)) {
diff --git a/tests/PathOpsQuadIntersectionTest.cpp b/tests/PathOpsQuadIntersectionTest.cpp
index d62ac26..e0c949e 100644
--- a/tests/PathOpsQuadIntersectionTest.cpp
+++ b/tests/PathOpsQuadIntersectionTest.cpp
@@ -4,13 +4,21 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
 #include "src/pathops/SkIntersections.h"
-#include "src/pathops/SkPathOpsRect.h"
+#include "src/pathops/SkPathOpsDebug.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsQuadIntersectionTestData.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static void standardTestCases(skiatest::Reporter* reporter) {
     bool showSkipped = false;
     for (size_t index = 0; index < quadraticTests_count; ++index) {
diff --git a/tests/PathOpsQuadIntersectionTestData.cpp b/tests/PathOpsQuadIntersectionTestData.cpp
index 9ea4f5c..b81df9e 100644
--- a/tests/PathOpsQuadIntersectionTestData.cpp
+++ b/tests/PathOpsQuadIntersectionTestData.cpp
@@ -7,6 +7,9 @@
 
 #include "tests/PathOpsQuadIntersectionTestData.h"
 
+#include <array>
+#include <cfloat>
+
 const QuadPts quadraticPoints[] = {
     {{{0, 0}, {1, 0}, {0, 0}}},
     {{{0, 0}, {0, 1}, {0, 0}}},
diff --git a/tests/PathOpsQuadIntersectionTestData.h b/tests/PathOpsQuadIntersectionTestData.h
index 6255922..4443a14 100644
--- a/tests/PathOpsQuadIntersectionTestData.h
+++ b/tests/PathOpsQuadIntersectionTestData.h
@@ -6,6 +6,8 @@
  */
 #include "tests/PathOpsTestCommon.h"
 
+#include <cstddef>
+
 extern const QuadPts quadraticLines[];
 extern const QuadPts quadraticPoints[];
 extern const QuadPts quadraticModEpsilonLines[];
diff --git a/tests/PathOpsQuadLineIntersectionTest.cpp b/tests/PathOpsQuadLineIntersectionTest.cpp
index 6e1e86b..ed66c8a 100644
--- a/tests/PathOpsQuadLineIntersectionTest.cpp
+++ b/tests/PathOpsQuadLineIntersectionTest.cpp
@@ -4,14 +4,17 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
-#include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
 #include <utility>
 
 static struct lineQuad {
diff --git a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp
index bc2a516..0928f83 100644
--- a/tests/PathOpsQuadLineIntersectionThreadedTest.cpp
+++ b/tests/PathOpsQuadLineIntersectionThreadedTest.cpp
@@ -5,13 +5,17 @@
  * found in the LICENSE file.
  */
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "src/pathops/SkIntersections.h"
 #include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 #include <utility>
 
diff --git a/tests/PathOpsQuadReduceOrderTest.cpp b/tests/PathOpsQuadReduceOrderTest.cpp
index 7bd4ef9..07a6af0 100644
--- a/tests/PathOpsQuadReduceOrderTest.cpp
+++ b/tests/PathOpsQuadReduceOrderTest.cpp
@@ -4,12 +4,16 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "src/pathops/SkIntersections.h"
-#include "src/pathops/SkPathOpsRect.h"
+#include "include/core/SkTypes.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsQuadIntersectionTestData.h"
+#include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const QuadPts testSet[] = {
     {{{1, 1}, {2, 2}, {1, 1.000003}}},
     {{{1, 0}, {2, 6}, {3, 0}}}
diff --git a/tests/PathOpsSimplifyDegenerateThreadedTest.cpp b/tests/PathOpsSimplifyDegenerateThreadedTest.cpp
index 7a94d07..08f8f31 100644
--- a/tests/PathOpsSimplifyDegenerateThreadedTest.cpp
+++ b/tests/PathOpsSimplifyDegenerateThreadedTest.cpp
@@ -4,9 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 static void testSimplifyDegeneratesMain(PathOpsThreadState* data) {
     SkASSERT(data);
diff --git a/tests/PathOpsSimplifyFailTest.cpp b/tests/PathOpsSimplifyFailTest.cpp
index a2b05f9..409fee2 100644
--- a/tests/PathOpsSimplifyFailTest.cpp
+++ b/tests/PathOpsSimplifyFailTest.cpp
@@ -5,11 +5,16 @@
  * found in the LICENSE file.
  */
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
 #include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
 #include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+
 static const SkPoint nonFinitePts[] = {
     { SK_ScalarInfinity, 0 },
     { 0, SK_ScalarInfinity },
diff --git a/tests/PathOpsSimplifyQuadThreadedTest.cpp b/tests/PathOpsSimplifyQuadThreadedTest.cpp
index 52fa8fc..48436b7 100644
--- a/tests/PathOpsSimplifyQuadThreadedTest.cpp
+++ b/tests/PathOpsSimplifyQuadThreadedTest.cpp
@@ -4,9 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 static int quadTest = 66;
 
diff --git a/tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp b/tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp
index ecb4f29..33beefc 100644
--- a/tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp
+++ b/tests/PathOpsSimplifyQuadralateralsThreadedTest.cpp
@@ -4,9 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 static int loopNo = 1;
 
diff --git a/tests/PathOpsSimplifyRectThreadedTest.cpp b/tests/PathOpsSimplifyRectThreadedTest.cpp
index 588b6b3..0af86a7 100644
--- a/tests/PathOpsSimplifyRectThreadedTest.cpp
+++ b/tests/PathOpsSimplifyRectThreadedTest.cpp
@@ -5,10 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkMacros.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 // four rects, of four sizes
 // for 3 smaller sizes, tall, wide
diff --git a/tests/PathOpsSimplifyTest.cpp b/tests/PathOpsSimplifyTest.cpp
index af147ff..03abd6c 100644
--- a/tests/PathOpsSimplifyTest.cpp
+++ b/tests/PathOpsSimplifyTest.cpp
@@ -4,7 +4,19 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
+#include "src/pathops/SkPathOpsDebug.h"
 #include "tests/PathOpsExtendedTest.h"
+#include "tests/Test.h"
+
+#include <cstddef>
+#include <iterator>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsSimplifyTrianglesThreadedTest.cpp b/tests/PathOpsSimplifyTrianglesThreadedTest.cpp
index 8c1dbc2..369139d 100644
--- a/tests/PathOpsSimplifyTrianglesThreadedTest.cpp
+++ b/tests/PathOpsSimplifyTrianglesThreadedTest.cpp
@@ -4,9 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
 static void testSimplifyTrianglesMain(PathOpsThreadState* data) {
     SkASSERT(data);
diff --git a/tests/PathOpsSkpTest.cpp b/tests/PathOpsSkpTest.cpp
index 191e03a..590f147 100644
--- a/tests/PathOpsSkpTest.cpp
+++ b/tests/PathOpsSkpTest.cpp
@@ -4,7 +4,15 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
 #include "tests/PathOpsExtendedTest.h"
+#include "tests/Test.h"
+
+#include <array>
+#include <cstddef>
 
 #define TEST(name) { name, #name }
 
diff --git a/tests/PathOpsTestCommon.cpp b/tests/PathOpsTestCommon.cpp
index 27764d1..f2c0a1c 100644
--- a/tests/PathOpsTestCommon.cpp
+++ b/tests/PathOpsTestCommon.cpp
@@ -4,6 +4,11 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkPathPriv.h"
 #include "src/core/SkTSort.h"
 #include "src/pathops/SkPathOpsBounds.h"
@@ -11,10 +16,14 @@
 #include "src/pathops/SkPathOpsCubic.h"
 #include "src/pathops/SkPathOpsLine.h"
 #include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsRect.h"
 #include "src/pathops/SkPathOpsTSect.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "src/pathops/SkReduceOrder.h"
 #include "tests/PathOpsTestCommon.h"
 
+#include <cmath>
+#include <string>
 #include <utility>
 
 static double calc_t_div(const SkDCubic& cubic, double precision, double start) {
diff --git a/tests/PathOpsTestCommon.h b/tests/PathOpsTestCommon.h
index 5b5cd0f..57988d5 100644
--- a/tests/PathOpsTestCommon.h
+++ b/tests/PathOpsTestCommon.h
@@ -7,10 +7,17 @@
 #ifndef PathOpsTestCommon_DEFINED
 #define PathOpsTestCommon_DEFINED
 
+#include "include/core/SkScalar.h"
 #include "include/private/SkTArray.h"
-#include "src/pathops/SkPathOpsQuad.h"
+#include "src/pathops/SkPathOpsPoint.h"
 
+class SkPath;
+struct SkDConic;
+struct SkDCubic;
+struct SkDLine;
+struct SkDQuad;
 struct SkPathOpsBounds;
+struct SkPoint;
 
 struct QuadPts {
     static const int kPointCount = 3;
diff --git a/tests/PathOpsThreadedCommon.cpp b/tests/PathOpsThreadedCommon.cpp
index 79890f5..26123c2 100644
--- a/tests/PathOpsThreadedCommon.cpp
+++ b/tests/PathOpsThreadedCommon.cpp
@@ -6,9 +6,10 @@
  */
 
 #include "src/core/SkTaskGroup.h"
-#include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
 
+#include <functional>
+
 PathOpsThreadedTestRunner::~PathOpsThreadedTestRunner() {
     for (int index = 0; index < fRunnables.size(); index++) {
         delete fRunnables[index];
diff --git a/tests/PathOpsThreadedCommon.h b/tests/PathOpsThreadedCommon.h
index 00e05fd..9990634 100644
--- a/tests/PathOpsThreadedCommon.h
+++ b/tests/PathOpsThreadedCommon.h
@@ -8,8 +8,8 @@
 #define PathOpsThreadedCommon_DEFINED
 
 #include "include/core/SkBitmap.h"
-#include "include/core/SkGraphics.h"
-#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkTypes.h"
 #include "include/pathops/SkPathOps.h"
 #include "include/private/SkTDArray.h"
 
diff --git a/tests/PathOpsThreeWayTest.cpp b/tests/PathOpsThreeWayTest.cpp
index af9ac88..5a1f275 100644
--- a/tests/PathOpsThreeWayTest.cpp
+++ b/tests/PathOpsThreeWayTest.cpp
@@ -4,11 +4,18 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkTypes.h"
+#include "include/private/SkMalloc.h"
 #include "include/private/SkTDArray.h"
 #include "src/pathops/SkIntersections.h"
+#include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsLine.h"
+#include "src/pathops/SkPathOpsPoint.h"
 #include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 
+#include <array>
+
 // check intersections for consistency
 
 struct Curve {
diff --git a/tests/PathOpsTigerTest.cpp b/tests/PathOpsTigerTest.cpp
index b598120..055c893 100644
--- a/tests/PathOpsTigerTest.cpp
+++ b/tests/PathOpsTigerTest.cpp
@@ -4,11 +4,19 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/PathOpsDebug.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkString.h"
+#include "include/private/SkFloatBits.h"
+#include "include/private/SkTDArray.h"
+#include "include/utils/SkRandom.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
+#include "tests/Test.h"
 
+#include <array>
 #include <atomic>
+#include <cstddef>
+#include <cstdint>
 
 #define TEST(name) { name, #name }
 
@@ -182,8 +190,6 @@
 testSimplify(reporter, path, testName.c_str());
 }
 
-#include "include/utils/SkRandom.h"
-
 static void tiger8a_h_1(skiatest::Reporter* reporter, const char* ) {
     uint64_t testlines = 0x0000000000002008;  // best so far: 0x0000001d14c14bb1;
     tiger8a_x(reporter, testlines);
diff --git a/tests/PathOpsTightBoundsTest.cpp b/tests/PathOpsTightBoundsTest.cpp
index 21685a7..4ae9dcd 100644
--- a/tests/PathOpsTightBoundsTest.cpp
+++ b/tests/PathOpsTightBoundsTest.cpp
@@ -4,12 +4,22 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
+#include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkRect.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkTDArray.h"
 #include "include/utils/SkRandom.h"
 #include "tests/PathOpsExtendedTest.h"
 #include "tests/PathOpsThreadedCommon.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <cstdint>
+
 static void testTightBoundsLines(PathOpsThreadState* data) {
     SkRandom ran;
     for (int index = 0; index < 1000; ++index) {
diff --git a/tests/PathOpsTypesTest.cpp b/tests/PathOpsTypesTest.cpp
index cb502e1..ab35f31 100644
--- a/tests/PathOpsTypesTest.cpp
+++ b/tests/PathOpsTypesTest.cpp
@@ -4,9 +4,12 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/PathOpsTestCommon.h"
+#include "src/pathops/SkPathOpsTypes.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static const double roughlyTests[][2] = {
     {5.0402503619650929e-005, 4.3178054475078825e-005}
 };
diff --git a/tests/PathRendererCacheTests.cpp b/tests/PathRendererCacheTests.cpp
index 7038f9a..c1d0a77 100644
--- a/tests/PathRendererCacheTests.cpp
+++ b/tests/PathRendererCacheTests.cpp
@@ -5,22 +5,42 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkStrokeRec.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrConfig.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkPathPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrPaint.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrResourceCache.h"
 #include "src/gpu/ganesh/GrStyle.h"
 #include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/PathRenderer.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/effects/GrPorterDuffXferProcessor.h"
 #include "src/gpu/ganesh/geometry/GrStyledShape.h"
 #include "src/gpu/ganesh/ops/SoftwarePathRenderer.h"
 #include "src/gpu/ganesh/ops/TriangulatingPathRenderer.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <functional>
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
 
 static SkPath create_concave_path() {
     SkPath path;
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 24b6a96..20a2d2f 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -5,15 +5,35 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathBuilder.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkRegion.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkStrokeRec.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/core/SkVertices.h"
+#include "include/pathops/SkPathOps.h"
+#include "include/private/SkFloatBits.h"
+#include "include/private/SkFloatingPoint.h"
 #include "include/private/SkIDChangeListener.h"
+#include "include/private/SkMalloc.h"
+#include "include/private/SkPathRef.h"
 #include "include/private/SkTo.h"
 #include "include/utils/SkNullCanvas.h"
 #include "include/utils/SkParse.h"
@@ -26,7 +46,13 @@
 #include "src/core/SkWriteBuffer.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <cfloat>
 #include <cmath>
+#include <cstdint>
+#include <cstring>
+#include <initializer_list>
+#include <memory>
 #include <utility>
 #include <vector>
 
@@ -752,7 +778,6 @@
 #endif
 }
 
-#include "include/core/SkSurface.h"
 static void test_fuzz_crbug_627414(skiatest::Reporter* reporter) {
     SkPath path;
     path.moveTo(0, 0);
@@ -4818,7 +4843,6 @@
     test_interp(reporter);
 }
 
-#include "include/core/SkSurface.h"
 DEF_TEST(PathBigCubic, reporter) {
     SkPath path;
     path.moveTo(SkBits2Float(0x00000000), SkBits2Float(0x00000000));  // 0, 0
@@ -5052,7 +5076,6 @@
     }
 }
 
-#include "include/pathops/SkPathOps.h"
 DEF_TEST(path_tight_bounds, reporter) {
     SkRandom rand;
 
@@ -5409,7 +5432,6 @@
     }
 }
 
-#include "include/core/SkVertices.h"
 static void draw_triangle(SkCanvas* canvas, const SkPoint pts[]) {
     // draw in different ways, looking for an assert
 
diff --git a/tests/PictureBBHTest.cpp b/tests/PictureBBHTest.cpp
index 8fbeea3..c4c6c1f 100644
--- a/tests/PictureBBHTest.cpp
+++ b/tests/PictureBBHTest.cpp
@@ -5,13 +5,16 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBBHFactory.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
-#include "src/core/SkRectPriv.h"
-
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "tests/Test.h"
 
 class PictureBBHTestBase {
diff --git a/tests/PictureShaderTest.cpp b/tests/PictureShaderTest.cpp
index 74e1dd4..8d9cb6e 100644
--- a/tests/PictureShaderTest.cpp
+++ b/tests/PictureShaderTest.cpp
@@ -6,15 +6,21 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
-#include "include/core/SkShader.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
 #include "src/core/SkPicturePriv.h"
 #include "src/core/SkResourceCache.h"
-#include "src/shaders/SkPictureShader.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <initializer_list>
+
 // Test that the SkPictureShader cache is purged on shader deletion.
 DEF_TEST(PictureShader_caching, reporter) {
     auto makePicture = [] () {
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 97c62e9..989dc18 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -13,17 +13,18 @@
 #include "include/core/SkData.h"
 #include "include/core/SkFont.h"
 #include "include/core/SkFontStyle.h"
-#include "include/core/SkImage.h"
 #include "include/core/SkImageInfo.h"
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
 #include "include/core/SkPixelRef.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkScalar.h"
-#include "include/core/SkShader.h"
 #include "include/core/SkStream.h"
 #include "include/core/SkTypeface.h"
 #include "include/core/SkTypes.h"
@@ -33,12 +34,12 @@
 #include "src/core/SkRectPriv.h"
 #include "tests/Test.h"
 
+#include <cstddef>
 #include <memory>
+#include <vector>
 
 class SkRRect;
 class SkRegion;
-template <typename T> class SkTDArray;
-
 
 static void make_bm(SkBitmap* bm, int w, int h, SkColor color, bool immutable) {
     bm->allocN32Pixels(w, h);
diff --git a/tests/PinnedImageTest.cpp b/tests/PinnedImageTest.cpp
index df47a3b..d0cbd2e 100644
--- a/tests/PinnedImageTest.cpp
+++ b/tests/PinnedImageTest.cpp
@@ -7,17 +7,27 @@
 
 // This is a GPU-backend specific test.
 
-#include "tests/Test.h"
-
-using namespace sk_gpu_test;
-
-#include "tools/gpu/GrContextFactory.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/mock/GrMockTypes.h"
 #include "src/core/SkImagePriv.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+#include "tools/gpu/FenceSync.h"
+
+class GrRecordingContext;
+struct GrContextOptions;
+
+using namespace sk_gpu_test;
 
 static bool surface_is_expected_color(SkSurface* surf, const SkImageInfo& ii, SkColor color) {
     SkBitmap bm;
diff --git a/tests/PixelRefTest.cpp b/tests/PixelRefTest.cpp
index 9fef367..765d2b0 100644
--- a/tests/PixelRefTest.cpp
+++ b/tests/PixelRefTest.cpp
@@ -5,11 +5,13 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkBitmap.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkMallocPixelRef.h"
 #include "include/core/SkPixelRef.h"
+#include "include/core/SkRefCnt.h"
 #include "include/private/SkIDChangeListener.h"
+#include "tests/Test.h"
 
 static void decrement_counter_proc(void* pixels, void* ctx) {
     int* counter = (int*)ctx;
diff --git a/tests/Point3Test.cpp b/tests/Point3Test.cpp
index bb87078..3504de0 100644
--- a/tests/Point3Test.cpp
+++ b/tests/Point3Test.cpp
@@ -8,9 +8,13 @@
 // Unit tests for src/core/SkPoint3.cpp and its header
 
 #include "include/core/SkPoint3.h"
+#include "include/core/SkScalar.h"
 #include "include/utils/SkRandom.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+
 static void test_eq_ops(skiatest::Reporter* reporter) {
     const SkPoint3 p0 = SkPoint3::Make(0, 0, 0);
     const SkPoint3 p1 = SkPoint3::Make(1, 1, 1);
diff --git a/tests/PointTest.cpp b/tests/PointTest.cpp
index 6e015a8..9ed50d3 100644
--- a/tests/PointTest.cpp
+++ b/tests/PointTest.cpp
@@ -4,12 +4,19 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-// Unit tests for src/core/SkPoint.cpp and its header
 
+#include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkPointPriv.h"
 #include "tests/Test.h"
 
+#include <cfloat>
+#include <cstddef>
+#include <cstdint>
+#include <string>
+
 static void test_casts(skiatest::Reporter* reporter) {
     SkPoint p = { 0, 0 };
     SkRect  r = { 0, 0, 0, 0 };
diff --git a/tests/PolyUtilsTest.cpp b/tests/PolyUtilsTest.cpp
index 72bfc7a..e8d6b72 100644
--- a/tests/PolyUtilsTest.cpp
+++ b/tests/PolyUtilsTest.cpp
@@ -5,10 +5,13 @@
  * found in the LICENSE file.
  */
 #include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
 #include "include/private/SkTDArray.h"
 #include "src/utils/SkPolyUtils.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 DEF_TEST(PolyUtils, reporter) {
 
     SkTDArray<SkPoint> poly;
diff --git a/tests/PreChopPathCurvesTest.cpp b/tests/PreChopPathCurvesTest.cpp
index 1b6e3bd..6989ca6 100644
--- a/tests/PreChopPathCurvesTest.cpp
+++ b/tests/PreChopPathCurvesTest.cpp
@@ -5,6 +5,8 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPath.h"
 #include "src/gpu/tessellate/Tessellation.h"
 #include "tests/Test.h"
 
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp
index c11587c..5912f18 100644
--- a/tests/PremulAlphaRoundTripTest.cpp
+++ b/tests/PremulAlphaRoundTripTest.cpp
@@ -5,15 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
-#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
 #include "src/core/SkConvertPixels.h"
 #include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrPixmap.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/ToolUtils.h"
+
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
+struct GrContextOptions;
 
 static uint32_t pack_unpremul_rgba(SkColor c) {
     uint32_t packed;
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index 4bf8aaf..11df7ff 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -7,27 +7,53 @@
 
 // This is a GPU-backend specific test. It relies on static initializers to work
 
-#include "include/core/SkTypes.h"
-
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkString.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrConfig.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkArenaAlloc.h"
 #include "src/core/SkPointPriv.h"
+#include "src/core/SkSLTypeShared.h"
 #include "src/gpu/KeyBuilder.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGeometryProcessor.h"
 #include "src/gpu/ganesh/GrGpu.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
 #include "src/gpu/ganesh/GrOpFlushState.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrPipeline.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProgramInfo.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
+#include "src/gpu/ganesh/ops/GrDrawOp.h"
 #include "src/gpu/ganesh/ops/GrMeshDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/ops/GrSimpleMeshDrawOpHelper.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <cstddef>
 #include <memory>
+#include <utility>
+
+class GrDstProxyView;
+class GrGLSLProgramDataManager;
+class GrMeshDrawTarget;
+class GrRecordingContext;
+class GrSurfaceProxyView;
+struct GrContextOptions;
+struct GrShaderCaps;
+struct GrSimpleMesh;
+struct SkPoint;
 
 namespace {
 class Op : public GrMeshDrawOp {
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index 87c72b9..2b78d64 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -5,29 +5,80 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkSLSampleUsage.h"
+#include "include/private/SkTArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "include/utils/SkRandom.h"
 #include "src/gpu/KeyBuilder.h"
-#include "src/gpu/ganesh/GrClip.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrFragmentProcessor.h"
-#include "src/gpu/ganesh/GrGpuResource.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/GrMemoryPool.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorAnalysis.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
+#include "src/gpu/ganesh/GrProcessorUnitTest.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/GrXferProcessor.h"
 #include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/effects/GrTextureEffect.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
+#include "src/gpu/ganesh/ops/GrDrawOp.h"
 #include "src/gpu/ganesh/ops/GrMeshDrawOp.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tests/TestHarness.h"
 #include "tests/TestUtils.h"
+#include "tools/flags/CommandLineFlags.h"
 
+#include <algorithm>
 #include <atomic>
+#include <cmath>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
 #include <random>
+#include <string>
+#include <tuple>
+#include <utility>
+#include <vector>
+
+class GrDstProxyView;
+class GrMeshDrawTarget;
+class GrOpFlushState;
+class GrProgramInfo;
+class GrRecordingContext;
+class GrResourceProvider;
+class SkArenaAlloc;
+struct GrContextOptions;
+struct GrShaderCaps;
 
 namespace {
 class TestOp : public GrMeshDrawOp {
@@ -205,7 +256,6 @@
     }
 }
 
-#include "tools/flags/CommandLineFlags.h"
 static DEFINE_bool(randomProcessorTest, false,
                    "Use non-deterministic seed for random processor tests?");
 static DEFINE_int(processorSeed, 0,
diff --git a/tests/ProgramsTest.cpp b/tests/ProgramsTest.cpp
index e259684..d0dc151 100644
--- a/tests/ProgramsTest.cpp
+++ b/tests/ProgramsTest.cpp
@@ -7,29 +7,49 @@
 
 // This is a GPU-backend specific test.
 
-#include "include/core/SkTypes.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
-#include "include/private/SkChecksum.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/gl/GrGLTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "include/utils/SkRandom.h"
 #include "src/gpu/KeyBuilder.h"
+#include "src/gpu/Swizzle.h"
 #include "src/gpu/ganesh/GrAutoLocaleSetter.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrDrawOpTest.h"
 #include "src/gpu/ganesh/GrDrawingManager.h"
 #include "src/gpu/ganesh/GrFragmentProcessor.h"
-#include "src/gpu/ganesh/GrPipeline.h"
+#include "src/gpu/ganesh/GrPaint.h"
+#include "src/gpu/ganesh/GrProcessor.h"
+#include "src/gpu/ganesh/GrProcessorUnitTest.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrXferProcessor.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/effects/GrBlendFragmentProcessor.h"
 #include "src/gpu/ganesh/effects/GrPorterDuffXferProcessor.h"
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
-#include "src/gpu/ganesh/glsl/GrGLSLProgramBuilder.h"
-#include "src/gpu/ganesh/ops/GrDrawOp.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+
+#include <algorithm>
+#include <array>
+#include <cstdint>
+#include <memory>
+#include <tuple>
+#include <utility>
+
+class GrRecordingContext;
+struct GrShaderCaps;
 
 #ifdef SK_GL
 #include "src/gpu/ganesh/gl/GrGLGpu.h"
diff --git a/tests/PromiseImageTest.cpp b/tests/PromiseImageTest.cpp
index 2a64a9d..d56694c 100644
--- a/tests/PromiseImageTest.cpp
+++ b/tests/PromiseImageTest.cpp
@@ -5,19 +5,44 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkDeferredDisplayListRecorder.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPromiseImageTexture.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkShader.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/image/SkImage_Gpu.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+#include "tools/gpu/FenceSync.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
+#include <cstddef>
+#include <functional>
+#include <utility>
+
+struct GrContextOptions;
+
 using namespace sk_gpu_test;
 
 struct PromiseTextureChecker {
diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp
index f11b9ff..5d18584 100644
--- a/tests/ProxyConversionTest.cpp
+++ b/tests/ProxyConversionTest.cpp
@@ -7,18 +7,28 @@
 
 // This is a GPU-backend specific test.
 
-#include "tests/Test.h"
-
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/RefCntedCallback.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRenderTarget.h"
 #include "src/gpu/ganesh/GrRenderTargetProxy.h"
 #include "src/gpu/ganesh/GrSurfaceProxy.h"
-#include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <utility>
+
+struct GrContextOptions;
 
 static sk_sp<GrSurfaceProxy> make_wrapped_rt(GrProxyProvider* provider,
                                              GrGpu* gpu,
diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp
index 4c38a91..cc819bf 100644
--- a/tests/ProxyRefTest.cpp
+++ b/tests/ProxyRefTest.cpp
@@ -7,19 +7,27 @@
 
 // This is a GPU-backend specific test.
 
-#include "tests/Test.h"
-
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
-#include "src/gpu/ganesh/GrRenderTargetProxy.h"
-#include "src/gpu/ganesh/GrResourceProvider.h"
-#include "src/gpu/ganesh/GrSurfaceProxy.h"
-#include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tests/TestUtils.h"
 
+#include <initializer_list>
+
+class GrResourceProvider;
+struct GrContextOptions;
+
 static const int kWidthHeight = 128;
 
 static sk_sp<GrTextureProxy> make_deferred(GrRecordingContext* rContext) {
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp
index e931fa4..5856cf9 100644
--- a/tests/ProxyTest.cpp
+++ b/tests/ProxyTest.cpp
@@ -7,27 +7,35 @@
 
 // This is a GPU-backend specific test.
 
+#include "include/core/SkColorType.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/gl/GrGLTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/RefCntedCallback.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
+#include "src/gpu/ganesh/GrGpuResource.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRenderTarget.h"
 #include "src/gpu/ganesh/GrRenderTargetProxy.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
-#include "src/gpu/ganesh/GrSurface.h"
-#include "src/gpu/ganesh/GrSurfaceProxyPriv.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/gl/GrGLUtil.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/ManagedBackendTexture.h"
-#ifdef SK_GL
-#include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
-#include "src/gpu/ganesh/gl/GrGLUtil.h"
-#endif
 
-#include "tests/TestUtils.h"
+#include <initializer_list>
+
+struct GrContextOptions;
 
 // Check that the surface proxy's member vars are set as expected
 static void check_surface(skiatest::Reporter* reporter,
diff --git a/tests/QuickRejectTest.cpp b/tests/QuickRejectTest.cpp
index 13e3d1e..b2b7bd5 100644
--- a/tests/QuickRejectTest.cpp
+++ b/tests/QuickRejectTest.cpp
@@ -7,10 +7,16 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPoint3.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkTypes.h"
 #include "include/effects/SkImageFilters.h"
-#include "src/core/SkArenaAlloc.h"
 #include "tests/Test.h"
 
 static void test_drawBitmap(skiatest::Reporter* reporter) {
diff --git a/tests/RRectInPathTest.cpp b/tests/RRectInPathTest.cpp
index 62dda15..f402e09 100644
--- a/tests/RRectInPathTest.cpp
+++ b/tests/RRectInPathTest.cpp
@@ -7,10 +7,22 @@
 
 #include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
+#include "include/private/SkMalloc.h"
+#include "include/private/SkPathRef.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <initializer_list>
+
 static SkRRect path_contains_rrect(skiatest::Reporter* reporter, const SkPath& path,
                                    SkPathDirection* dir, unsigned* start) {
     SkRRect out;
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index e89c8f7..740edb5 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -5,10 +5,17 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRect.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTemplates.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkRTree.h"
 #include "tests/Test.h"
 
+#include <cmath>
+#include <cstddef>
+#include <vector>
+
 static const int NUM_RECTS = 200;
 static const size_t NUM_ITERATIONS = 100;
 static const size_t NUM_QUERIES = 50;
diff --git a/tests/RandomTest.cpp b/tests/RandomTest.cpp
index a24b1d9..fc0a2fd 100644
--- a/tests/RandomTest.cpp
+++ b/tests/RandomTest.cpp
@@ -5,10 +5,14 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkTSort.h"
 #include "tests/Test.h"
 
+#include <cmath>
+#include <cstring>
+
 static bool anderson_darling_test(double p[32]) {
     // Min and max Anderson-Darling values allowable for k=32
     const double kADMin32 = 0.202;        // p-value of ~0.1
diff --git a/tests/ReadPixelsTest.cpp b/tests/ReadPixelsTest.cpp
index b9ccf72..f761731 100644
--- a/tests/ReadPixelsTest.cpp
+++ b/tests/ReadPixelsTest.cpp
@@ -5,19 +5,38 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkClipOp.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorPriv.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkColorData.h"
 #include "include/private/SkHalf.h"
 #include "include/private/SkImageInfoPriv.h"
-#include "include/utils/SkNWayCanvas.h"
 #include "src/core/SkMathPriv.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+#include <string>
+
 static const int DEV_W = 100, DEV_H = 100;
 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
 static const SkRect DEV_RECT_S = SkRect::MakeWH(DEV_W * SK_Scalar1,
diff --git a/tests/ReadWritePixelsGpuTest.cpp b/tests/ReadWritePixelsGpuTest.cpp
index 1af6203..5ce736e 100644
--- a/tests/ReadWritePixelsGpuTest.cpp
+++ b/tests/ReadWritePixelsGpuTest.cpp
@@ -5,27 +5,65 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkImageInfoPriv.h"
+#include "include/private/SkTArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkConvertPixels.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
 #include "src/gpu/ganesh/effects/GrTextureEffect.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 #include "tools/ToolUtils.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
 #include "tools/gpu/BackendTextureImageFactory.h"
-#include "tools/gpu/GrContextFactory.h"
-#include "tools/gpu/ProxyUtils.h"
 
+#include <algorithm>
+#include <array>
+#include <cstring>
+#include <functional>
 #include <initializer_list>
+#include <memory>
+#include <utility>
+#include <vector>
+
+struct GrContextOptions;
 
 static constexpr int min_rgb_channel_bits(SkColorType ct) {
     switch (ct) {
diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp
index 9da9f12..00a0fc8 100644
--- a/tests/RecordDrawTest.cpp
+++ b/tests/RecordDrawTest.cpp
@@ -5,18 +5,27 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBBHFactory.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkM44.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPicture.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
+#include "include/effects/SkImageFilters.h"
+#include "include/private/SkTemplates.h"
+#include "src/core/SkRecord.h"
+#include "src/core/SkRecordDraw.h"
+#include "src/core/SkRecorder.h"
+#include "src/core/SkRecords.h"
 #include "tests/RecordTestUtils.h"
 #include "tests/Test.h"
 
-#include "include/core/SkSurface.h"
-#include "include/effects/SkImageFilters.h"
-#include "src/core/SkImagePriv.h"
-#include "src/core/SkRecord.h"
-#include "src/core/SkRecordDraw.h"
-#include "src/core/SkRecordOpts.h"
-#include "src/core/SkRecorder.h"
-#include "src/core/SkRecords.h"
-#include "tools/debugger/DebugCanvas.h"
+class SkImage;
 
 static const int W = 1920, H = 1080;
 
diff --git a/tests/RecordOptsTest.cpp b/tests/RecordOptsTest.cpp
index 7633a38..ee55a8e 100644
--- a/tests/RecordOptsTest.cpp
+++ b/tests/RecordOptsTest.cpp
@@ -5,17 +5,29 @@
  * found in the LICENSE file.
  */
 
-#include "tests/RecordTestUtils.h"
-#include "tests/Test.h"
-
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSurface.h"
 #include "include/effects/SkImageFilters.h"
 #include "src/core/SkRecord.h"
 #include "src/core/SkRecordOpts.h"
 #include "src/core/SkRecorder.h"
 #include "src/core/SkRecords.h"
+#include "tests/RecordTestUtils.h"
+#include "tests/Test.h"
+
+#include <array>
+#include <cstddef>
 
 static const int W = 1920, H = 1080;
 
diff --git a/tests/RecordPatternTest.cpp b/tests/RecordPatternTest.cpp
index 816ac3a..8368ea7 100644
--- a/tests/RecordPatternTest.cpp
+++ b/tests/RecordPatternTest.cpp
@@ -5,12 +5,14 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkCanvas.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
 #include "src/core/SkRecord.h"
 #include "src/core/SkRecordPattern.h"
 #include "src/core/SkRecorder.h"
 #include "src/core/SkRecords.h"
+#include "tests/Test.h"
 
 using namespace SkRecords;
 typedef Pattern<Is<Save>,
diff --git a/tests/RecordTest.cpp b/tests/RecordTest.cpp
index f1056c2..b7f2587 100644
--- a/tests/RecordTest.cpp
+++ b/tests/RecordTest.cpp
@@ -5,14 +5,14 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkBitmap.h"
-#include "include/core/SkImageInfo.h"
-#include "include/core/SkShader.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
 #include "src/core/SkRecord.h"
 #include "src/core/SkRecords.h"
 #include "tests/RecordTestUtils.h"
 #include "tests/Test.h"
 
+#include <cstdint>
 #include <new>
 
 // Sums the area of any DrawRect command it sees.
diff --git a/tests/RecorderTest.cpp b/tests/RecorderTest.cpp
index 3a21a34..9a25f41 100644
--- a/tests/RecorderTest.cpp
+++ b/tests/RecorderTest.cpp
@@ -5,14 +5,22 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
-#include "include/core/SkPictureRecorder.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
+#include "include/private/SkMalloc.h"
 #include "src/core/SkRecord.h"
 #include "src/core/SkRecorder.h"
 #include "src/core/SkRecords.h"
+#include "tests/Test.h"
 
 #define COUNT(T) + 1
 static const int kRecordTypes = SK_RECORD_TYPES(COUNT);
diff --git a/tests/RecordingXfermodeTest.cpp b/tests/RecordingXfermodeTest.cpp
index fcdf346..d35f6bd 100644
--- a/tests/RecordingXfermodeTest.cpp
+++ b/tests/RecordingXfermodeTest.cpp
@@ -5,16 +5,22 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkBBHFactory.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
-#include "include/core/SkStream.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
-#include "src/core/SkBlendModePriv.h"
+#include "tests/Test.h"
 
 #include <cstring>
 
diff --git a/tests/RectTest.cpp b/tests/RectTest.cpp
index 02fb161..79af2e2 100644
--- a/tests/RectTest.cpp
+++ b/tests/RectTest.cpp
@@ -7,12 +7,21 @@
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkRectPriv.h"
 #include "tests/Test.h"
 
-#include <limits.h>
+#include <climits>
+#include <initializer_list>
 
 static bool has_green_pixels(const SkBitmap& bm) {
     for (int j = 0; j < bm.height(); ++j) {
@@ -268,8 +277,6 @@
     REPORTER_ASSERT(reporter, difference == reasonable);
 }
 
-#include "include/core/SkSurface.h"
-
 // Before the fix, this sequence would trigger a release_assert in the Tiler
 // in SkBitmapDevice.cpp
 DEF_TEST(big_tiled_rect_crbug_927075, reporter) {
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index f4062c6..672395b 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -8,19 +8,51 @@
 #include "tests/Test.h"
 
 #ifdef SK_GL
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColor.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
+#include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
 #include "src/gpu/ganesh/effects/GrTextureEffect.h"
-#include "src/gpu/ganesh/gl/GrGLGpu.h"
-#include "src/gpu/ganesh/gl/GrGLUtil.h"
+#include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/TestUtils.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
+
 // skbug.com/5932
 static void test_basic_draw_as_src(skiatest::Reporter* reporter, GrDirectContext* dContext,
                                    GrSurfaceProxyView rectView, GrColorType colorType,
diff --git a/tests/RefCntTest.cpp b/tests/RefCntTest.cpp
index 8c01070..28ac213 100644
--- a/tests/RefCntTest.cpp
+++ b/tests/RefCntTest.cpp
@@ -11,6 +11,7 @@
 #include "tests/Test.h"
 
 #include <thread>
+#include <utility>
 
 static void bounce_ref(void* data) {
     SkRefCnt* ref = static_cast<SkRefCnt*>(data);
diff --git a/tests/RegionTest.cpp b/tests/RegionTest.cpp
index 94bddca..df44c35 100644
--- a/tests/RegionTest.cpp
+++ b/tests/RegionTest.cpp
@@ -5,13 +5,23 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkAutoMalloc.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
 static void Union(SkRegion* rgn, const SkIRect& rect) {
     rgn->op(rect, SkRegion::kUnion_Op);
 }
diff --git a/tests/RepeatedClippedBlurTest.cpp b/tests/RepeatedClippedBlurTest.cpp
index f6e0d7d..8aaf6a0 100644
--- a/tests/RepeatedClippedBlurTest.cpp
+++ b/tests/RepeatedClippedBlurTest.cpp
@@ -5,15 +5,32 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkImageFilters.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrResourceCache.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+
+struct GrContextOptions;
+
 // This is the repro of a CastOS memory regression bug (b/138674523).
 // The test simply keeps calling SkImage::makeWithFilter (with a blur image filter) while
 // shrinking the clip.
diff --git a/tests/ResourceAllocatorTest.cpp b/tests/ResourceAllocatorTest.cpp
index 1a3f70e..88d0746 100644
--- a/tests/ResourceAllocatorTest.cpp
+++ b/tests/ResourceAllocatorTest.cpp
@@ -5,21 +5,46 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkSpan.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTo.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrResourceAllocator.h"
-#include "src/gpu/ganesh/GrResourceProviderPriv.h"
+#include "src/gpu/ganesh/GrResourceCache.h"
+#include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSurface.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrSurfaceProxyPriv.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
+#include <array>
+#include <cstddef>
+#include <functional>
+#include <type_traits>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 namespace {
 struct ProxyParams {
     int             fSize;
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index d48bc86..5a4b961 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -5,14 +5,34 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrConfig.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTDArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "include/utils/SkRandom.h"
 #include "src/core/SkMessageBus.h"
-#include "src/core/SkMipmap.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
+#include "src/gpu/ganesh/GrGpuResource.h"
 #include "src/gpu/ganesh/GrGpuResourceCacheAccess.h"
 #include "src/gpu/ganesh/GrGpuResourcePriv.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
@@ -21,12 +41,23 @@
 #include "src/gpu/ganesh/GrResourceCache.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
 #include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
+#include <chrono>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+#include <string_view>
 #include <thread>
+#include <utility>
+#include <vector>
+
+class GrAttachment;
+struct GrContextOptions;
 
 static const int gWidth = 640;
 static const int gHeight = 480;
diff --git a/tests/RoundRectTest.cpp b/tests/RoundRectTest.cpp
index 0e8508c..19f8e27 100644
--- a/tests/RoundRectTest.cpp
+++ b/tests/RoundRectTest.cpp
@@ -6,13 +6,23 @@
  */
 
 #include "include/core/SkMatrix.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/pathops/SkPathOps.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkPointPriv.h"
 #include "src/core/SkRRectPriv.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
 static void test_tricky_radii(skiatest::Reporter* reporter) {
     {
         // crbug.com/458522
diff --git a/tests/RuntimeBlendTest.cpp b/tests/RuntimeBlendTest.cpp
index 5830115..2e244b9 100644
--- a/tests/RuntimeBlendTest.cpp
+++ b/tests/RuntimeBlendTest.cpp
@@ -5,19 +5,28 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkBlender.h" // IWYU pragma: keep
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
-#include "include/core/SkSize.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
-#include "include/effects/SkRuntimeEffect.h"
-#include "src/gpu/ganesh/GrCaps.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "tools/Resources.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/RuntimeBlendUtils.h"
-#include "tools/ToolUtils.h"
+
+#include <cmath>
+#include <initializer_list>
+#include <vector>
+
+struct GrContextOptions;
 
 static bool nearly_equal(const SkColor& x, const SkColor& y) {
     const int kTolerance = 1;
diff --git a/tests/SRGBReadWritePixelsTest.cpp b/tests/SRGBReadWritePixelsTest.cpp
index 4bf7b6b..7bed8e3 100644
--- a/tests/SRGBReadWritePixelsTest.cpp
+++ b/tests/SRGBReadWritePixelsTest.cpp
@@ -5,18 +5,39 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkCanvas.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrShaderCaps.h"
 #include "src/gpu/ganesh/SurfaceContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 
+#include <algorithm>
+#include <cmath>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+#include <string>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 // using anonymous namespace because these functions are used as template params.
 namespace {
 /** convert 0..1 srgb value to 0..1 linear */
diff --git a/tests/SRGBTest.cpp b/tests/SRGBTest.cpp
index 04ff6d1..c06b8cb 100644
--- a/tests/SRGBTest.cpp
+++ b/tests/SRGBTest.cpp
@@ -5,13 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkTypes.h"
+#include "src/core/SkArenaAlloc.h"
 #include "src/core/SkColorSpaceXformSteps.h"
 #include "src/core/SkRasterPipeline.h"
 #include "tests/Test.h"
 
-#include <math.h>
+#include <cstdint>
+#include <string>
 
 DEF_TEST(srgb_roundtrip, r) {
     uint32_t reds[256];
diff --git a/tests/SVGDeviceTest.cpp b/tests/SVGDeviceTest.cpp
index f8e1c44..73881d6 100644
--- a/tests/SVGDeviceTest.cpp
+++ b/tests/SVGDeviceTest.cpp
@@ -5,13 +5,8 @@
  * found in the LICENSE file.
  */
 
-#define ABORT_TEST(r, cond, ...)                                   \
-    do {                                                           \
-        if (cond) {                                                \
-            REPORT_FAILURE(r, #cond, SkStringPrintf(__VA_ARGS__)); \
-            return;                                                \
-        }                                                          \
-    } while (0)
+#include "include/core/SkTypes.h"
+#ifdef SK_XML
 
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
@@ -27,16 +22,22 @@
 #include "include/svg/SkSVGCanvas.h"
 #include "include/utils/SkParse.h"
 #include "src/shaders/SkImageShader.h"
-#include "tests/Test.h"
-#include "tools/ToolUtils.h"
-
-#include <string.h>
-
-#ifdef SK_XML
-
 #include "src/svg/SkSVGDevice.h"
 #include "src/xml/SkDOM.h"
 #include "src/xml/SkXMLWriter.h"
+#include "tests/Test.h"
+#include "tools/ToolUtils.h"
+
+#include <string>
+
+#define ABORT_TEST(r, cond, ...)                                   \
+    do {                                                           \
+        if (cond) {                                                \
+            REPORT_FAILURE(r, #cond, SkStringPrintf(__VA_ARGS__)); \
+            return;                                                \
+        }                                                          \
+    } while (0)
+
 
 static std::unique_ptr<SkCanvas> MakeDOMCanvas(SkDOM* dom, uint32_t flags = 0) {
     auto svgDevice = SkSVGDevice::Make(SkISize::Make(100, 100),
diff --git a/tests/SafeMathTest.cpp b/tests/SafeMathTest.cpp
index 99a16e0..450db79 100644
--- a/tests/SafeMathTest.cpp
+++ b/tests/SafeMathTest.cpp
@@ -8,6 +8,9 @@
 #include "src/core/SkSafeMath.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <limits>
+
 DEF_TEST(SafeMath, r) {
     size_t max = std::numeric_limits<size_t>::max();
 
diff --git a/tests/SamplingTest.cpp b/tests/SamplingTest.cpp
index 8ff5d90..0cf9e24 100644
--- a/tests/SamplingTest.cpp
+++ b/tests/SamplingTest.cpp
@@ -6,13 +6,19 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkSamplingPriv.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <initializer_list>
+
 // In general, sampling under identity matrix should not affect the pixels. However,
 // cubic resampling when B != 0 is expected to change pixels.
 //
diff --git a/tests/SaveLayerOriginTest.cpp b/tests/SaveLayerOriginTest.cpp
index 00765c4..d03c83a 100644
--- a/tests/SaveLayerOriginTest.cpp
+++ b/tests/SaveLayerOriginTest.cpp
@@ -5,12 +5,27 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tests/TestUtils.h"
+
+#include <cstdint>
+
+struct GrContextOptions;
 
 static void check_pixels(skiatest::Reporter* reporter, const SkBitmap& bitmap,
                          GrSurfaceOrigin origin) {
diff --git a/tests/ScalarTest.cpp b/tests/ScalarTest.cpp
index 044eb2a..f25ab44 100644
--- a/tests/ScalarTest.cpp
+++ b/tests/ScalarTest.cpp
@@ -5,13 +5,19 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkMath.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
 #include "include/private/SkFloatingPoint.h"
-#include "include/utils/SkRandom.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+
 static void test_roundtoint(skiatest::Reporter* reporter) {
     SkScalar x = 0.49999997f;
     int ix = SkScalarRoundToInt(x);
diff --git a/tests/ScaleToSidesTest.cpp b/tests/ScaleToSidesTest.cpp
index 375c39c..953d7ed 100644
--- a/tests/ScaleToSidesTest.cpp
+++ b/tests/ScaleToSidesTest.cpp
@@ -5,11 +5,13 @@
  * found in the LICENSE file.
  */
 
+#include "include/private/SkFloatingPoint.h"
 #include "src/core/SkScaleToSides.h"
-
 #include "tests/Test.h"
 
 #include <algorithm>
+#include <array>
+#include <cfloat>
 
 DEF_TEST(ScaleToSides, reporter) {
     double interestingValues[] = {
diff --git a/tests/SerialProcsTest.cpp b/tests/SerialProcsTest.cpp
index fee34b7..819f476 100644
--- a/tests/SerialProcsTest.cpp
+++ b/tests/SerialProcsTest.cpp
@@ -6,15 +6,30 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSerialProcs.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTDArray.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
 #include <algorithm>
+#include <cstring>
+#include <functional>
+#include <iterator>
 
 static sk_sp<SkImage> picture_to_image(sk_sp<SkPicture> pic) {
     SkIRect r = pic->cullRect().round();
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 70b6df3..943ce67 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -5,30 +5,64 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAnnotation.h"
+#include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorFilter.h"
+#include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
 #include "include/core/SkFontMetrics.h"
 #include "include/core/SkFontMgr.h"
+#include "include/core/SkFontStyle.h"
 #include "include/core/SkImage.h"
-#include "include/core/SkMallocPixelRef.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkPathEffect.h"
+#include "include/core/SkPicture.h"
 #include "include/core/SkPictureRecorder.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkPoint3.h"
+#include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkRegion.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSerialProcs.h"
+#include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkSurface.h"
 #include "include/core/SkTextBlob.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkDashPathEffect.h"
 #include "include/effects/SkImageFilters.h"
-#include "include/private/SkFixed.h"
+#include "include/private/SkMalloc.h"
 #include "include/private/SkTemplates.h"
 #include "src/core/SkAnnotationKeys.h"
 #include "src/core/SkAutoMalloc.h"
-#include "src/core/SkMatrixPriv.h"
-#include "src/core/SkOSFile.h"
+#include "src/core/SkColorFilterBase.h"
+#include "src/core/SkImageFilter_Base.h"
 #include "src/core/SkPicturePriv.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkWriteBuffer.h"
-#include "src/shaders/SkShaderBase.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <algorithm>
+#include <array>
+#include <cstdint>
+#include <cstring>
+#include <memory>
+#include <utility>
+
 static const uint32_t kArraySize = 64;
 static const int kBitmapSize = 256;
 
@@ -725,7 +759,6 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-#include "include/core/SkAnnotation.h"
 
 static sk_sp<SkPicture> copy_picture_via_serialization(SkPicture* src) {
     SkDynamicMemoryWStream wstream;
diff --git a/tests/ShaderImageFilterTest.cpp b/tests/ShaderImageFilterTest.cpp
index a2a9f08..04b5955 100644
--- a/tests/ShaderImageFilterTest.cpp
+++ b/tests/ShaderImageFilterTest.cpp
@@ -6,15 +6,34 @@
  */
 
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImageFilter.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
 #include "include/effects/SkImageFilters.h"
 #include "include/effects/SkRuntimeEffect.h"
+#include "include/gpu/GrDirectContext.h"
 #include "src/effects/imagefilters/SkRuntimeImageFilter.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <vector>
+
+struct GrContextOptions;
+
 static void test_unscaled(skiatest::Reporter* reporter) {
     static const int kWidth = 10;
     static const int kHeight = 10;
diff --git a/tests/ShaderOpacityTest.cpp b/tests/ShaderOpacityTest.cpp
index e56a723..68ba957 100644
--- a/tests/ShaderOpacityTest.cpp
+++ b/tests/ShaderOpacityTest.cpp
@@ -5,13 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
-#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkShader.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
 #include "include/effects/SkGradientShader.h"
 #include "tests/Test.h"
-#include "tools/ToolUtils.h"
 
 static void test_bitmap(skiatest::Reporter* reporter) {
     SkImageInfo info = SkImageInfo::MakeN32Premul(2, 2);
diff --git a/tests/ShaderTest.cpp b/tests/ShaderTest.cpp
index 8189b48..26b05b3 100644
--- a/tests/ShaderTest.cpp
+++ b/tests/ShaderTest.cpp
@@ -6,12 +6,18 @@
  */
 
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkData.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkShader.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
 #include "include/effects/SkPerlinNoiseShader.h"
 #include "tests/Test.h"
 
diff --git a/tests/ShadowTest.cpp b/tests/ShadowTest.cpp
index 8318468..2a967bc 100644
--- a/tests/ShadowTest.cpp
+++ b/tests/ShadowTest.cpp
@@ -6,10 +6,17 @@
  */
 
 #include "include/core/SkCanvas.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkPoint3.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "include/core/SkVertices.h"
-#include "include/utils/SkShadowUtils.h"
+#include "include/private/SkShadowFlags.h"
 #include "src/core/SkDrawShadowInfo.h"
 #include "src/core/SkVerticesPriv.h"
 #include "src/utils/SkShadowTessellator.h"
diff --git a/tests/SizeTest.cpp b/tests/SizeTest.cpp
index 100da02..1d006a8 100644
--- a/tests/SizeTest.cpp
+++ b/tests/SizeTest.cpp
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkScalar.h"
 #include "include/core/SkSize.h"
-
 #include "tests/Test.h"
 
 DEF_TEST(ISize, reporter) {
diff --git a/tests/SkBase64Test.cpp b/tests/SkBase64Test.cpp
index ec2661e..9dffaba 100644
--- a/tests/SkBase64Test.cpp
+++ b/tests/SkBase64Test.cpp
@@ -5,11 +5,14 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkString.h"
+#include "include/private/SkTemplates.h"
 #include "include/private/SkTo.h"
 #include "include/utils/SkBase64.h"
-
 #include "tests/Test.h"
 
+#include <cstring>
+
 DEF_TEST(SkBase64, reporter) {
     char all[256];
     for (int index = 0; index < 255; ++index) {
diff --git a/tests/SkBlockAllocatorTest.cpp b/tests/SkBlockAllocatorTest.cpp
index c87535b..fd328e8 100644
--- a/tests/SkBlockAllocatorTest.cpp
+++ b/tests/SkBlockAllocatorTest.cpp
@@ -5,10 +5,13 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkTypes.h"
 #include "src/core/SkBlockAllocator.h"
 #include "tests/Test.h"
 
+#include <cstdint>
 #include <cstring>
+#include <new>
 #include <vector>
 
 using Block = SkBlockAllocator::Block;
diff --git a/tests/SkColorSpaceXformStepsTest.cpp b/tests/SkColorSpaceXformStepsTest.cpp
index d89a8da..1dc6109 100644
--- a/tests/SkColorSpaceXformStepsTest.cpp
+++ b/tests/SkColorSpaceXformStepsTest.cpp
@@ -5,10 +5,14 @@
  * found in the LICENSE file.
  */
 
-#include "src/core/SkColorSpacePriv.h"
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkRefCnt.h"
 #include "src/core/SkColorSpaceXformSteps.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
 DEF_TEST(SkColorSpaceXformSteps, r) {
     auto srgb   = SkColorSpace::MakeSRGB(),
          adobe  = SkColorSpace::MakeRGB(SkNamedTransferFn::k2Dot2, SkNamedGamut::kAdobeRGB),
diff --git a/tests/SkDOMTest.cpp b/tests/SkDOMTest.cpp
index b6b9f5f..e0ce59e 100644
--- a/tests/SkDOMTest.cpp
+++ b/tests/SkDOMTest.cpp
@@ -5,12 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkStream.h"
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #if defined(SK_XML)
-
+#include "include/core/SkStream.h"
 #include "src/xml/SkDOM.h"
+#include "tests/Test.h"
 
 static const SkDOM::Node* check_node(skiatest::Reporter* r, const SkDOM& dom,
                                      const SkDOM::Node* node, const char* expectedName,
diff --git a/tests/SkGaussFilterTest.cpp b/tests/SkGaussFilterTest.cpp
index f065d8f..65eba1f 100644
--- a/tests/SkGaussFilterTest.cpp
+++ b/tests/SkGaussFilterTest.cpp
@@ -6,11 +6,13 @@
  */
 
 #include "src/core/SkGaussFilter.h"
+#include "tests/Test.h"
 
 #include <cmath>
+#include <cstdlib>
+#include <initializer_list>
 #include <tuple>
 #include <vector>
-#include "tests/Test.h"
 
 // one part in a million
 static constexpr double kEpsilon = 0.000001;
diff --git a/tests/SkGlyphBufferTest.cpp b/tests/SkGlyphBufferTest.cpp
index c012116..61f0b19 100644
--- a/tests/SkGlyphBufferTest.cpp
+++ b/tests/SkGlyphBufferTest.cpp
@@ -5,12 +5,21 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkEnumerate.h"
+#include "src/core/SkGlyph.h"
 #include "src/core/SkGlyphBuffer.h"
-#include "src/core/SkGlyphRunPainter.h"
-#include "src/core/SkScalerContext.h"
+#include "src/core/SkZip.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <tuple>
+
 DEF_TEST(SkPackedGlyphIDCtor, reporter) {
     using PG = SkPackedGlyphID;
     // x and y are in one quarter the sub-pixel sampling frequency.
diff --git a/tests/SkGlyphTest.cpp b/tests/SkGlyphTest.cpp
index b46be64..a57d172 100644
--- a/tests/SkGlyphTest.cpp
+++ b/tests/SkGlyphTest.cpp
@@ -5,6 +5,8 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
 #include "src/core/SkGlyph.h"
 #include "tests/Test.h"
 
diff --git a/tests/SkImageTest.cpp b/tests/SkImageTest.cpp
index e5cf168..a1f094a 100644
--- a/tests/SkImageTest.cpp
+++ b/tests/SkImageTest.cpp
@@ -5,10 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
-#include "src/core/SkImagePriv.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "tests/Test.h"
+#include <cstdint>
 
 static const int gWidth = 20;
 static const int gHeight = 20;
diff --git a/tests/SkPathRangeIterTest.cpp b/tests/SkPathRangeIterTest.cpp
index ce6d54e..6b5613f 100644
--- a/tests/SkPathRangeIterTest.cpp
+++ b/tests/SkPathRangeIterTest.cpp
@@ -5,6 +5,9 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/Test.h"
diff --git a/tests/SkRemoteGlyphCacheTest.cpp b/tests/SkRemoteGlyphCacheTest.cpp
index a229d55..dd3d316 100644
--- a/tests/SkRemoteGlyphCacheTest.cpp
+++ b/tests/SkRemoteGlyphCacheTest.cpp
@@ -5,31 +5,59 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
 #include "include/core/SkGraphics.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSerialProcs.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTextBlob.h"
+#include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrContextOptions.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/private/SkMalloc.h"
 #include "include/private/SkMutex.h"
+#include "include/private/SkTHash.h"
 #include "include/private/chromium/SkChromeRemoteGlyphCache.h"
 #include "include/private/chromium/Slug.h"
-#include "src/core/SkDraw.h"
 #include "src/core/SkFontPriv.h"
-#include "src/core/SkReadBuffer.h"
-#include "src/core/SkScalerCache.h"
-#include "src/core/SkStrikeCache.h"
+#include "src/core/SkGlyph.h"
 #include "src/core/SkStrikeSpec.h"
-#include "src/core/SkSurfacePriv.h"
 #include "src/core/SkTypeface_remote.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
+#include "src/gpu/ganesh/GrShaderCaps.h"
 #include "src/text/gpu/SDFTControl.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 #include "tools/fonts/TestEmptyTypeface.h"
 
+#include <cmath>
+#include <cstdint>
+#include <cstring>
+#include <initializer_list>
+#include <memory>
+#include <vector>
+
 // Since SkRemoteGlyphCache is not re-entrant, we can't use it while drawing slugs to simulate
 // text blobs in the GPU stack.
 #if !defined(SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG_STRIKE_SERIALIZE)
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index abcabc5..7468e4a 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -5,19 +5,33 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
-#include "include/core/SkGraphics.h"
-#include "include/core/SkPicture.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPictureRecorder.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkBitmapCache.h"
+#include "src/core/SkCachedData.h"
+#include "src/core/SkDiscardableMemory.h"
 #include "src/core/SkMipmap.h"
 #include "src/core/SkResourceCache.h"
 #include "src/image/SkImage_Base.h"
 #include "src/lazy/SkDiscardableMemoryPool.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <memory>
+
 ////////////////////////////////////////////////////////////////////////////////////////
 
 enum LockedState {
@@ -108,8 +122,6 @@
     }
 }
 
-#include "src/lazy/SkDiscardableMemoryPool.h"
-
 static SkDiscardableMemoryPool* gPool = nullptr;
 static int gFactoryCalls = 0;
 
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index af26528..38e90fa 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -5,18 +5,37 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkBlender.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkCapabilities.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkData.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkShader.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkSpan.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkBlenders.h"
 #include "include/effects/SkGradientShader.h"
 #include "include/effects/SkRuntimeEffect.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkSLSampleUsage.h"
+#include "include/private/SkSLString.h"
+#include "include/private/SkTArray.h"
 #include "include/sksl/SkSLDebugTrace.h"
+#include "include/sksl/SkSLVersion.h"
 #include "src/core/SkColorSpacePriv.h"
 #include "src/core/SkRuntimeEffectPriv.h"
 #include "src/core/SkTLazy.h"
@@ -26,12 +45,24 @@
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrFragmentProcessor.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
 #include "src/gpu/ganesh/effects/GrSkSLFP.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-#include <algorithm>
+#include <array>
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+#include <string>
 #include <thread>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
+struct SkIPoint;
 
 #ifdef SK_GRAPHITE_ENABLED
 #include "include/gpu/graphite/Context.h"
diff --git a/tests/SkSLCross.cpp b/tests/SkSLCross.cpp
index ad0c0ab..0b592dc 100644
--- a/tests/SkSLCross.cpp
+++ b/tests/SkSLCross.cpp
@@ -29,13 +29,14 @@
 #include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
 #include "src/gpu/ganesh/glsl/GrGLSLProgramDataManager.h"
 #include "src/gpu/ganesh/glsl/GrGLSLUniformHandler.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <memory>
 #include <utility>
 
 namespace skgpu { class KeyBuilder; }
+struct GrContextOptions;
 struct GrShaderCaps;
 
 static void run_test(skiatest::Reporter*, GrDirectContext*,
diff --git a/tests/SkSLDSLOnlyTest.cpp b/tests/SkSLDSLOnlyTest.cpp
index cc08388..847f5e3 100644
--- a/tests/SkSLDSLOnlyTest.cpp
+++ b/tests/SkSLDSLOnlyTest.cpp
@@ -6,16 +6,18 @@
  */
 
 #include "include/sksl/DSL.h"
-#include "include/sksl/DSLBlock.h"
-
 #include "tests/Test.h"
 
-#include <utility>
+#include <string_view>
 
-namespace sk_gpu_test { class ContextInfo; }
+struct GrContextOptions;
 
 // This file verifies that DSL code compiles with only a DSL.h import. We don't bother with any
 // 'real' tests here, as those are all in SkSLDSLTest.cpp.
+// IWYU pragma: no_include "include/sksl/DSLCore.h"
+// IWYU pragma: no_include "include/sksl/DSLExpression.h"
+// IWYU pragma: no_include "include/sksl/DSLStatement.h"
+// IWYU pragma: no_include "include/sksl/DSLType.h"
 
 using namespace SkSL::dsl;
 
diff --git a/tests/SkSLDSLTest.cpp b/tests/SkSLDSLTest.cpp
index 4d13592..621ee1e 100644
--- a/tests/SkSLDSLTest.cpp
+++ b/tests/SkSLDSLTest.cpp
@@ -34,21 +34,20 @@
 #include "src/sksl/ir/SkSLBlock.h"
 #include "src/sksl/ir/SkSLExpression.h"
 #include "src/sksl/ir/SkSLProgram.h"
-#include "src/sksl/ir/SkSLVariable.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <ctype.h>
-#include <stdlib.h>
 #include <cstdint>
+#include <cstdlib>
 #include <limits>
 #include <memory>
 #include <string>
 #include <string_view>
-#include <type_traits>
 #include <utility>
 #include <vector>
 
+struct GrContextOptions;
+
 using namespace SkSL::dsl;
 
 SkSL::ProgramSettings default_settings() {
diff --git a/tests/SkSLDSLUtil.cpp b/tests/SkSLDSLUtil.cpp
index 804e7a7..a025e86 100644
--- a/tests/SkSLDSLUtil.cpp
+++ b/tests/SkSLDSLUtil.cpp
@@ -4,10 +4,12 @@
  * Use of this source code is governed by a BSD-style license that can be
  * found in the LICENSE file.
  */
-#include "tests/Test.h"
+#include "include/core/SkTypes.h"
 
 #ifdef SK_ENABLE_SKSL
+#include "include/gpu/GrDirectContext.h"
 #include "include/sksl/DSLCore.h"
+#include "include/sksl/DSLExpression.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
 #include "tools/gpu/GrContextFactory.h"
diff --git a/tests/SkSLES2ConformanceTest.cpp b/tests/SkSLES2ConformanceTest.cpp
index e5265c1..5ac84f9 100644
--- a/tests/SkSLES2ConformanceTest.cpp
+++ b/tests/SkSLES2ConformanceTest.cpp
@@ -28,12 +28,14 @@
 #include "include/gpu/GrDirectContext.h"
 #include "src/core/SkOSFile.h"
 #include "src/utils/SkOSPath.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <functional>
 
+struct GrContextOptions;
+
 static void test_expect_fail(skiatest::Reporter* r, const char* testFile) {
     SkRuntimeEffect::Options options{};
     sk_sp<SkData> shaderData = GetResourceAsData(testFile);
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index 3020ed8..9636f49 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -9,15 +9,16 @@
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkString.h"
 #include "include/private/SkSLProgramKind.h"
-#include "include/private/SkTHash.h"
 #include "src/core/SkOSFile.h"
 #include "src/sksl/SkSLCompiler.h"
+#include "src/sksl/SkSLProgramSettings.h"
 #include "src/sksl/SkSLUtil.h"
-#include "src/sksl/ir/SkSLProgram.h"
+#include "src/sksl/ir/SkSLProgram.h" // IWYU pragma: keep
 #include "src/utils/SkOSPath.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <cstddef>
 #include <functional>
 #include <memory>
 #include <sstream>
diff --git a/tests/SkSLInterpreterTest.cpp b/tests/SkSLInterpreterTest.cpp
index 35da276..70de901 100644
--- a/tests/SkSLInterpreterTest.cpp
+++ b/tests/SkSLInterpreterTest.cpp
@@ -22,6 +22,7 @@
 #include "src/sksl/SkSLBuiltinTypes.h"
 #include "src/sksl/SkSLCompiler.h"
 #include "src/sksl/SkSLContext.h"
+#include "src/sksl/SkSLProgramSettings.h"
 #include "src/sksl/SkSLUtil.h"
 #include "src/sksl/codegen/SkSLVMCodeGenerator.h"
 #include "src/sksl/ir/SkSLExternalFunction.h"
@@ -29,8 +30,9 @@
 #include "src/sksl/tracing/SkVMDebugTrace.h"
 #include "tests/Test.h"
 
-#include <math.h>
-#include <stdio.h>
+#include <cmath>
+#include <cstdint>
+#include <cstdio>
 #include <memory>
 #include <string>
 #include <string_view>
diff --git a/tests/SkSLMemoryLayoutTest.cpp b/tests/SkSLMemoryLayoutTest.cpp
index 7b9fd77..25e70cf 100644
--- a/tests/SkSLMemoryLayoutTest.cpp
+++ b/tests/SkSLMemoryLayoutTest.cpp
@@ -18,6 +18,7 @@
 #include <memory>
 #include <string>
 #include <string_view>
+#include <utility>
 #include <vector>
 
 DEF_TEST(SkSLMemoryLayout140Test, r) {
diff --git a/tests/SkSLTest.cpp b/tests/SkSLTest.cpp
index 61e97db..865d1bf 100644
--- a/tests/SkSLTest.cpp
+++ b/tests/SkSLTest.cpp
@@ -30,19 +30,20 @@
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrShaderCaps.h"
 #include "src/sksl/SkSLCompiler.h"
-#include "src/sksl/SkSLStringStream.h"
+#include "src/sksl/SkSLProgramSettings.h"
 #include "src/sksl/SkSLUtil.h"
 #include "src/sksl/ir/SkSLProgram.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tests/TestHarness.h"
 #include "tools/Resources.h"
-#include "tools/gpu/GrContextFactory.h"
 
 #include <array>
 #include <memory>
 #include <string>
 #include <vector>
 
+struct GrContextOptions;
+
 static constexpr int kWidth = 2;
 static constexpr int kHeight = 2;
 
diff --git a/tests/SkScalerCacheTest.cpp b/tests/SkScalerCacheTest.cpp
index 246f67f..4fa17a2 100644
--- a/tests/SkScalerCacheTest.cpp
+++ b/tests/SkScalerCacheTest.cpp
@@ -5,17 +5,31 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkExecutor.h"
 #include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTo.h"
 #include "src/core/SkGlyphBuffer.h"
 #include "src/core/SkScalerCache.h"
+#include "src/core/SkScalerContext.h"
 #include "src/core/SkStrikeSpec.h"
 #include "src/core/SkTaskGroup.h"
-#include "src/text/GlyphRun.h"
+#include "src/core/SkZip.h"
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
 #include <atomic>
+#include <cstddef>
+#include <functional>
+#include <initializer_list>
+#include <memory>
 
 class Barrier {
 public:
diff --git a/tests/SkSharedMutexTest.cpp b/tests/SkSharedMutexTest.cpp
index a9a80b1..1157155 100644
--- a/tests/SkSharedMutexTest.cpp
+++ b/tests/SkSharedMutexTest.cpp
@@ -7,9 +7,10 @@
 
 #include "src/core/SkSharedMutex.h"
 #include "src/core/SkTaskGroup.h"
-
 #include "tests/Test.h"
 
+#include <functional>
+
 DEF_TEST(SkSharedMutexBasic, r) {
     SkSharedMutex sm;
     sm.acquire();
diff --git a/tests/SkStrikeCacheTest.cpp b/tests/SkStrikeCacheTest.cpp
index 7cc613e..2611cd7 100644
--- a/tests/SkStrikeCacheTest.cpp
+++ b/tests/SkStrikeCacheTest.cpp
@@ -5,6 +5,14 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypeface.h"
+#include "src/core/SkScalerContext.h"
 #include "src/core/SkStrikeCache.h"
 #include "src/core/SkStrikeSpec.h"
 #include "tests/Test.h"
diff --git a/tests/SkStringViewTest.cpp b/tests/SkStringViewTest.cpp
index 6e6b204..b6f16a5 100644
--- a/tests/SkStringViewTest.cpp
+++ b/tests/SkStringViewTest.cpp
@@ -5,11 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include <string_view>
-
 #include "include/private/SkStringView.h"
 #include "tests/Test.h"
 
+#include <string>
+#include <string_view>
+
 DEF_TEST(SkStringViewStartsAndEnds, r) {
     std::string_view empty("");
     REPORTER_ASSERT(r, empty.empty());
diff --git a/tests/SkTBlockListTest.cpp b/tests/SkTBlockListTest.cpp
index 037cd88..3d4feaa 100644
--- a/tests/SkTBlockListTest.cpp
+++ b/tests/SkTBlockListTest.cpp
@@ -5,9 +5,17 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkTypes.h"
+#include "src/core/SkBlockAllocator.h"
 #include "src/core/SkTBlockList.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <limits>
+#include <new>
+#include <type_traits>
+#include <utility>
 #include <vector>
 
 namespace {
diff --git a/tests/SkUTFTest.cpp b/tests/SkUTFTest.cpp
index ac25001..9165c18 100644
--- a/tests/SkUTFTest.cpp
+++ b/tests/SkUTFTest.cpp
@@ -4,6 +4,10 @@
 #include "src/utils/SkUTF.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <cstddef>
+#include <string>
+
 DEF_TEST(SkUTF_UTF16, reporter) {
     // Test non-basic-multilingual-plane unicode.
     static const SkUnichar gUni[] = {
diff --git a/tests/SkVMDebugTracePlayerTest.cpp b/tests/SkVMDebugTracePlayerTest.cpp
index fb04d3b..6f368d3 100644
--- a/tests/SkVMDebugTracePlayerTest.cpp
+++ b/tests/SkVMDebugTracePlayerTest.cpp
@@ -5,16 +5,27 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkM44.h"
+#include "include/core/SkRefCnt.h"
+#include "include/private/SkSLProgramKind.h"
+#include "src/core/SkVM.h"
 #include "src/sksl/SkSLCompiler.h"
+#include "src/sksl/SkSLProgramSettings.h"
 #include "src/sksl/SkSLUtil.h"
 #include "src/sksl/codegen/SkSLVMCodeGenerator.h"
-#include "src/sksl/ir/SkSLProgram.h"
+#include "src/sksl/ir/SkSLProgram.h" // IWYU pragma: keep
 #include "src/sksl/tracing/SkVMDebugTrace.h"
 #include "src/sksl/tracing/SkVMDebugTracePlayer.h"
-
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <memory>
+#include <string>
+#include <unordered_map>
+#include <unordered_set>
+#include <vector>
+
+namespace SkSL { class FunctionDefinition; }
+
 using LineNumberMap = SkSL::SkVMDebugTracePlayer::LineNumberMap;
 
 static sk_sp<SkSL::SkVMDebugTrace> make_trace(skiatest::Reporter* r, std::string src) {
diff --git a/tests/SkVMDebugTraceTest.cpp b/tests/SkVMDebugTraceTest.cpp
index fffbb9c..e70a9cc 100644
--- a/tests/SkVMDebugTraceTest.cpp
+++ b/tests/SkVMDebugTraceTest.cpp
@@ -5,10 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkData.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "src/sksl/ir/SkSLType.h"
 #include "src/sksl/tracing/SkVMDebugTrace.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <string>
+#include <string_view>
+#include <vector>
+
 DEF_TEST(SkVMDebugTraceSetSource, r) {
     SkSL::SkVMDebugTrace i;
     i.setSource("SkVMDebugTrace::setSource unit test\n"
diff --git a/tests/SkVMTest.cpp b/tests/SkVMTest.cpp
index 34bd7a5..78fca87 100644
--- a/tests/SkVMTest.cpp
+++ b/tests/SkVMTest.cpp
@@ -5,20 +5,37 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkColorPriv.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
-#include "include/private/SkColorData.h"
-#include "src/core/SkCpu.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatingPoint.h"
+#include "include/private/SkSLProgramKind.h"
 #include "src/core/SkMSAN.h"
 #include "src/core/SkVM.h"
 #include "src/sksl/SkSLCompiler.h"
+#include "src/sksl/SkSLProgramSettings.h"
 #include "src/sksl/SkSLUtil.h"
 #include "src/sksl/codegen/SkSLVMCodeGenerator.h"
-#include "src/sksl/ir/SkSLProgram.h"
+#include "src/sksl/ir/SkSLProgram.h" // IWYU pragma: keep
 #include "src/sksl/tracing/SkVMDebugTrace.h"
 #include "src/utils/SkVMVisualizer.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <cmath>
+#include <cstdint>
+#include <cstring>
+#include <initializer_list>
+#include <memory>
+#include <string>
+#include <utility>
+#include <vector>
+
+namespace SkSL { class FunctionDefinition; }
+
 template <typename Fn>
 static void test_jit_and_interpreter(const skvm::Builder& b, Fn&& test) {
     skvm::Program p = b.done();
diff --git a/tests/Skbug12214.cpp b/tests/Skbug12214.cpp
index 190ae29..8525dea 100644
--- a/tests/Skbug12214.cpp
+++ b/tests/Skbug12214.cpp
@@ -5,11 +5,17 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-#include "include/core/SkCanvas.h"
-#include "include/core/SkSurface.h"
-#include "include/gpu/GrDirectContext.h"
+struct GrContextOptions;
 
 DEF_GANESH_TEST_FOR_ALL_CONTEXTS(skbug12214, r, contextInfo, CtsEnforcement::kApiLevel_T) {
     auto imageInfo = SkImageInfo::Make(/*width=*/32, /*height=*/32, kRGBA_8888_SkColorType,
diff --git a/tests/Skbug5221.cpp b/tests/Skbug5221.cpp
index fb4dba4..dc676d9 100644
--- a/tests/Skbug5221.cpp
+++ b/tests/Skbug5221.cpp
@@ -5,12 +5,20 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrDirectContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-#include "include/core/SkCanvas.h"
-#include "include/core/SkFont.h"
-#include "include/core/SkSurface.h"
-#include "include/gpu/GrDirectContext.h"
+struct GrContextOptions;
 
 // This passes by not crashing.
 static void test(SkCanvas* canvas) {
diff --git a/tests/Skbug6389.cpp b/tests/Skbug6389.cpp
index 1aa20ab..f4bf9e2 100644
--- a/tests/Skbug6389.cpp
+++ b/tests/Skbug6389.cpp
@@ -5,8 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlurTypes.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkMaskFilter.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
 #include "include/core/SkSurface.h"
 #include "include/effects/SkImageFilters.h"
 #include "tests/Test.h"
diff --git a/tests/Skbug6653.cpp b/tests/Skbug6653.cpp
index ff49d48..678c707 100644
--- a/tests/Skbug6653.cpp
+++ b/tests/Skbug6653.cpp
@@ -5,14 +5,27 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 static SkBitmap read_pixels(sk_sp<SkSurface> surface, SkColor initColor) {
     SkBitmap bmp;
     bmp.allocN32Pixels(surface->width(), surface->height());
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp
index 2862fa9..d66e9bf 100644
--- a/tests/SortTest.cpp
+++ b/tests/SortTest.cpp
@@ -9,7 +9,8 @@
 #include "src/core/SkTSort.h"
 #include "tests/Test.h"
 
-#include <stdlib.h>
+#include <cstdlib>
+#include <string>
 
 extern "C" {
     static int compare_int(const void* a, const void* b) {
diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp
index f07b36b..4d16192 100644
--- a/tests/SpecialImageTest.cpp
+++ b/tests/SpecialImageTest.cpp
@@ -5,25 +5,39 @@
  * found in the LICENSE file
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPixmap.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
-#include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkSpecialImage.h"
 #include "src/core/SkSpecialSurface.h"
-#include "src/gpu/ganesh/GrColorInfo.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrProxyProvider.h"
-#include "src/gpu/ganesh/GrSurfaceProxy.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrColorInfo.h" // IWYU pragma: keep
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/SkGr.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <tuple>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
+
 // This test creates backing resources exactly sized to [kFullSize x kFullSize].
 // It then wraps them in an SkSpecialImage with only the center (red) region being active.
 // It then draws the SkSpecialImage to a full sized (all blue) canvas and checks that none
diff --git a/tests/SpecialSurfaceTest.cpp b/tests/SpecialSurfaceTest.cpp
index e2dc06a..8892299 100644
--- a/tests/SpecialSurfaceTest.cpp
+++ b/tests/SpecialSurfaceTest.cpp
@@ -5,15 +5,25 @@
 * found in the LICENSE file
 */
 
-#include "include/core/SkBitmap.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "src/core/SkSpecialImage.h"
 #include "src/core/SkSpecialSurface.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <initializer_list>
+struct GrContextOptions;
+
 static const int kSurfaceSize = 10;
 
 // Exercise the public API of SkSpecialSurface (e.g., getCanvas, newImageSnapshot)
diff --git a/tests/SrcOverTest.cpp b/tests/SrcOverTest.cpp
index f8fa6ed..194507f 100644
--- a/tests/SrcOverTest.cpp
+++ b/tests/SrcOverTest.cpp
@@ -5,9 +5,12 @@
  * found in the LICENSE file.
  */
 
-#include "include/private/SkColorData.h"
+#include "include/core/SkColorPriv.h"
+#include "include/core/SkMath.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+
 // our std SkAlpha255To256
 static int test_srcover0(unsigned dst, unsigned alpha) {
     return alpha + SkAlphaMul(dst, SkAlpha255To256(255 - alpha));
diff --git a/tests/SrcSrcOverBatchTest.cpp b/tests/SrcSrcOverBatchTest.cpp
index 9c320c9..bff6f37 100644
--- a/tests/SrcSrcOverBatchTest.cpp
+++ b/tests/SrcSrcOverBatchTest.cpp
@@ -8,12 +8,24 @@
 // We want to make sure that if we collapse src-over down to src when blending, that batching still
 // works correctly with a draw that explicitly requests src.
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkShader.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+
+struct GrContextOptions;
 
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(SrcSrcOverBatchTest,
                                        reporter,
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index 1241dd7..2b1ca65 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -5,28 +5,36 @@
  * found in the LICENSE file.
  */
 
-// Make sure SkUserConfig.h is included so #defines are available on
-// Android.
-#include "include/core/SkTypes.h"
-#ifdef SK_ENABLE_ANDROID_UTILS
-#include "client_utils/android/FrontBufferedStream.h"
-#endif
 #include "include/core/SkData.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTemplates.h"
 #include "include/private/SkTo.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkAutoMalloc.h"
+#include "src/core/SkBuffer.h"
 #include "src/core/SkOSFile.h"
 #include "src/core/SkStreamPriv.h"
 #include "src/utils/SkOSPath.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <cstdio>
 #include <functional>
 #include <limits>
+#include <memory>
+#include <string>
+
+#ifdef SK_ENABLE_ANDROID_UTILS
+#include "client_utils/android/FrontBufferedStream.h"
+#endif
 
 #ifndef SK_BUILD_FOR_WIN
-#include <unistd.h>
 #include <fcntl.h>
 #endif
 
@@ -647,8 +655,6 @@
     test_all(&stream2, true);
 }
 
-#include "src/core/SkBuffer.h"
-
 DEF_TEST(RBuffer, reporter) {
     int32_t value = 0;
     SkRBuffer buffer(&value, 4);
diff --git a/tests/StrikeForGPUTest.cpp b/tests/StrikeForGPUTest.cpp
index a701b71..495c65a 100644
--- a/tests/StrikeForGPUTest.cpp
+++ b/tests/StrikeForGPUTest.cpp
@@ -5,18 +5,23 @@
  * found in the LICENSE file.
  */
 
-#include "src/text/StrikeForGPU.h"
-
-#include <memory>
-
 #include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkRefCnt.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkStrikeCache.h"
 #include "src/core/SkStrikeSpec.h"
 #include "src/core/SkWriteBuffer.h"
-
+#include "src/text/StrikeForGPU.h"
+#include "src/text/gpu/SubRunAllocator.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <memory>
+#include <optional>
+#include <type_traits>
+#include <utility>
+
 using namespace sktext;
 
 DEF_TEST(SkStrikePromise_Basic, reporter) {
diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp
index 11c0321..c185f35 100644
--- a/tests/StringTest.cpp
+++ b/tests/StringTest.cpp
@@ -5,13 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTArray.h"
+#include "src/core/SkStringUtils.h"
 #include "tests/Test.h"
 
-#include "include/core/SkString.h"
-#include "src/core/SkStringUtils.h"
-
-#include <math.h>
-#include <stdio.h>
+#include <cmath>
+#include <cstdarg>
+#include <cstdint>
+#include <cstring>
+#include <string_view>
 #include <thread>
 
 DEF_TEST(String, reporter) {
diff --git a/tests/StrokeTest.cpp b/tests/StrokeTest.cpp
index 8e07598..5099fb3 100644
--- a/tests/StrokeTest.cpp
+++ b/tests/StrokeTest.cpp
@@ -7,12 +7,18 @@
 
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStrokeRec.h"
+#include "include/private/SkFloatBits.h"
 #include "src/core/SkPathPriv.h"
-#include "src/core/SkStroke.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstddef>
+#include <cstdint>
+
 static bool equal(const SkRect& a, const SkRect& b) {
     return  SkScalarNearlyEqual(a.left(), b.left()) &&
             SkScalarNearlyEqual(a.top(), b.top()) &&
diff --git a/tests/StrokerTest.cpp b/tests/StrokerTest.cpp
index 25ffc0a..0710a86 100644
--- a/tests/StrokerTest.cpp
+++ b/tests/StrokerTest.cpp
@@ -7,16 +7,27 @@
 
 #include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
-#include "include/core/SkTime.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkFloatBits.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkPointPriv.h"
 #include "src/core/SkStrokerPriv.h"
 #include "src/pathops/SkPathOpsCubic.h"
+#include "src/pathops/SkPathOpsPoint.h"
+#include "src/pathops/SkPathOpsQuad.h"
 #include "tests/PathOpsCubicIntersectionTestData.h"
 #include "tests/PathOpsQuadIntersectionTestData.h"
+#include "tests/PathOpsTestCommon.h"
 #include "tests/Test.h"
 #include "tools/flags/CommandLineFlags.h"
 
+#include <array>
+#include <cfloat>
+#include <cstddef>
+#include <cstdint>
+
 using namespace PathOpsCubicIntersectionTestData;
 
 static DEFINE_bool(timeout, true, "run until alloted time expires");
diff --git a/tests/SubsetPath.cpp b/tests/SubsetPath.cpp
index 338b41c..146b530 100644
--- a/tests/SubsetPath.cpp
+++ b/tests/SubsetPath.cpp
@@ -5,6 +5,9 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkTypes.h"
 #include "src/core/SkMathPriv.h"
 #include "src/core/SkPathPriv.h"
 #include "tests/SubsetPath.h"
diff --git a/tests/SurfaceDrawContextTest.cpp b/tests/SurfaceDrawContextTest.cpp
index a948a06..e7ca825 100644
--- a/tests/SurfaceDrawContextTest.cpp
+++ b/tests/SurfaceDrawContextTest.cpp
@@ -7,14 +7,24 @@
 
 // This is a GPU-backend specific test.
 
-#include "tests/Test.h"
-
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
+#include "src/gpu/ganesh/GrRenderTargetProxy.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/SurfaceDrawContext.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
+
+#include <memory>
+
+class GrRecordingContext;
+struct GrContextOptions;
 
 static const int kSize = 64;
 
diff --git a/tests/SurfaceSemaphoreTest.cpp b/tests/SurfaceSemaphoreTest.cpp
index f3817b6..6e3e70e 100644
--- a/tests/SurfaceSemaphoreTest.cpp
+++ b/tests/SurfaceSemaphoreTest.cpp
@@ -5,28 +5,51 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSemaphore.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkTemplates.h"
 #include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+#include "tools/gpu/TestContext.h"
+
+#include <string>
+#include <cstdint>
+#include <initializer_list>
+
 
 #ifdef SK_GL
+#include "include/gpu/gl/GrGLFunctions.h"
+#include "include/gpu/gl/GrGLInterface.h"
+#include "include/gpu/gl/GrGLTypes.h"
 #include "src/gpu/ganesh/gl/GrGLGpu.h"
 #include "src/gpu/ganesh/gl/GrGLUtil.h"
 #endif
 
 #ifdef SK_VULKAN
-#include "include/gpu/vk/GrVkTypes.h"
 #include "src/gpu/ganesh/vk/GrVkCommandPool.h"
 #include "src/gpu/ganesh/vk/GrVkGpu.h"
 #include "src/gpu/ganesh/vk/GrVkUtil.h"
+#include "src/gpu/vk/VulkanInterface.h"
+
+#include <vulkan/vulkan_core.h>
 
 #ifdef VK_USE_PLATFORM_WIN32_KHR
 // windows wants to define this as CreateSemaphoreA or CreateSemaphoreW
@@ -34,6 +57,8 @@
 #endif
 #endif
 
+struct GrContextOptions;
+
 static const int MAIN_W = 8, MAIN_H = 16;
 static const int CHILD_W = 16, CHILD_H = 16;
 
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index a4471be..ac929d1 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -5,31 +5,59 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
-#include "include/core/SkData.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorFilter.h"
+#include "include/core/SkColorPriv.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkOverdrawCanvas.h"
+#include "include/core/SkPaint.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkShader.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkColorMatrix.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/SkFloatingPoint.h"
+#include "include/private/SkMalloc.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkCanvasPriv.h"
-#include "src/core/SkDevice.h"
-#include "src/core/SkUtils.h"
+#include "src/gpu/ganesh/Device_v1.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColorInfo.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
-#include "src/gpu/ganesh/GrGpuResourcePriv.h"
-#include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/GrRenderTarget.h"
+#include "src/gpu/ganesh/GrRenderTargetProxy.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
 #include "src/image/SkImage_Base.h"
 #include "src/image/SkImage_Gpu.h"
 #include "src/image/SkSurface_Gpu.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestHarness.h"
 #include "tools/RuntimeBlendUtils.h"
@@ -38,9 +66,15 @@
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
 
-#include <functional>
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
-#include <vector>
+#include <limits>
+#include <memory>
+#include <utility>
+
+class GrRecordingContext;
+struct GrContextOptions;
 
 static void release_direct_surface_storage(void* pixels, void* context) {
     SkASSERT(pixels == context);
diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp
index 8a96b56..6246a7a 100644
--- a/tests/SwizzlerTest.cpp
+++ b/tests/SwizzlerTest.cpp
@@ -5,12 +5,19 @@
  * found in the LICENSE file.
  */
 
+#include "include/codec/SkCodec.h"
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkSwizzle.h"
-#include "include/private/SkImageInfoPriv.h"
-#include "src/codec/SkSwizzler.h"
+#include "src/codec/SkSampler.h"
 #include "src/core/SkOpts.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <cstring>
+#include <memory>
+
 static void check_fill(skiatest::Reporter* r,
                        const SkImageInfo& imageInfo,
                        uint32_t startRow,
diff --git a/tests/TArrayTest.cpp b/tests/TArrayTest.cpp
index 07caa8e..75d8bd3 100644
--- a/tests/TArrayTest.cpp
+++ b/tests/TArrayTest.cpp
@@ -5,11 +5,16 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkRefCnt.h"
 #include "include/private/SkTArray.h"
 #include "include/utils/SkRandom.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstdint>
+#include <initializer_list>
+#include <type_traits>
+#include <utility>
+
 // This class is used to test SkTArray's behavior with classes containing a vtable.
 
 namespace {
diff --git a/tests/TDPQueueTest.cpp b/tests/TDPQueueTest.cpp
index 8046977..086147c 100644
--- a/tests/TDPQueueTest.cpp
+++ b/tests/TDPQueueTest.cpp
@@ -5,6 +5,7 @@
  * found in the LICENSE file.
  */
 
+#include "include/private/SkTDArray.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkTDPQueue.h"
 #include "tests/Test.h"
diff --git a/tests/TemplatesTest.cpp b/tests/TemplatesTest.cpp
index f073b4c..53eeb41 100644
--- a/tests/TemplatesTest.cpp
+++ b/tests/TemplatesTest.cpp
@@ -8,6 +8,9 @@
 #include "include/private/SkTemplates.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <utility>
+
 // Tests for some of the helpers in SkTemplates.h
 static void test_automalloc_realloc(skiatest::Reporter* reporter) {
     SkAutoSTMalloc<1, int> array;
diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp
index 35b0010..a44700d 100644
--- a/tests/TestTest.cpp
+++ b/tests/TestTest.cpp
@@ -5,9 +5,10 @@
  * found in the LICENSE file.
  */
 
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-#include "include/gpu/GrDirectContext.h"
+struct GrContextOptions;
 
 // This is an example of a normal test. It should not require any GPU backends, that is, it is a
 // CPU test.
diff --git a/tests/TestUtils.cpp b/tests/TestUtils.cpp
index c3919ff..c7d7103 100644
--- a/tests/TestUtils.cpp
+++ b/tests/TestUtils.cpp
@@ -5,23 +5,40 @@
  * found in the LICENSE file.
  */
 
-#include "tests/TestUtils.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBitmap.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/encode/SkPngEncoder.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/SkTo.h"
 #include "include/utils/SkBase64.h"
 #include "src/core/SkAutoPixmapStorage.h"
-#include "src/core/SkUtils.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrDrawingManager.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrSurfaceProxy.h"
-#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/SkGr.h"
 #include "src/gpu/ganesh/SurfaceContext.h"
+#include "src/utils/SkCharToGlyphCache.h"
+#include "tests/Test.h"
+#include "tests/TestUtils.h"
+
+#include <cmath>
+#include <cstdlib>
+#include <utility>
 
 void TestReadPixels(skiatest::Reporter* reporter,
                     GrDirectContext* dContext,
@@ -284,8 +301,6 @@
                                    budgeted);
 }
 
-#include "src/utils/SkCharToGlyphCache.h"
-
 static SkGlyphID hash_to_glyph(uint32_t value) {
     return SkToU16(((value >> 16) ^ value) & 0xFFFF);
 }
diff --git a/tests/TestUtils.h b/tests/TestUtils.h
index 55db437..97ff38e 100644
--- a/tests/TestUtils.h
+++ b/tests/TestUtils.h
@@ -8,13 +8,26 @@
 #ifndef TestUtils_DEFINED
 #define TestUtils_DEFINED
 
-#include "include/core/SkBitmap.h"
-#include "src/gpu/ganesh/GrDataUtils.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrImageInfo.h"
 #include "src/gpu/ganesh/GrPixmap.h"
-#include "tests/Test.h"
 
-namespace skgpu::v1 { class SurfaceContext; }
+#include <cstdint>
+#include <functional>
+#include <memory>
+
+class GrDirectContext;
+class GrRecordingContext;
 class GrSurfaceProxy;
+class SkBitmap;
+class SkPixmap;
+class SkString;
+namespace skiatest { class Reporter; }
+namespace skgpu::v1 { class SurfaceContext; }
 typedef uint32_t GrColor;
 
 // Ensure that reading back from 'srcContext' as RGBA 8888 matches 'expectedPixelValues
diff --git a/tests/TextBlobCacheTest.cpp b/tests/TextBlobCacheTest.cpp
index c247359..f8177f0 100644
--- a/tests/TextBlobCacheTest.cpp
+++ b/tests/TextBlobCacheTest.cpp
@@ -5,33 +5,53 @@
  * found in the LICENSE file.
  */
 
-#include "tools/ToolUtils.h"
-
-#include <string>
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkData.h"
+#include "include/core/SkEncodedImageFormat.h"
+#include "include/core/SkFont.h"
 #include "include/core/SkFontMgr.h"
-#include "include/core/SkGraphics.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkImageEncoder.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
 #include "include/core/SkTextBlob.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/private/SkSpinlock.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTemplates.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/text/GlyphRun.h"
+#include "src/gpu/ganesh/text/GrAtlasManager.h"
+#include "src/text/gpu/TextBlobRedrawCoordinator.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/fonts/RandomScalerContext.h"
 
 #ifdef SK_BUILD_FOR_WIN
     #include "include/ports/SkTypeface_win.h"
 #endif
 
-#include "tests/Test.h"
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <string>
 
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/text/GrAtlasManager.h"
-#include "src/text/gpu/TextBlobRedrawCoordinator.h"
+struct GrContextOptions;
 
 static void draw(SkCanvas* canvas, int redraw, const SkTArray<sk_sp<SkTextBlob>>& blobs) {
     int yOffset = 0;
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index ad1be0a..4cf073f 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -5,16 +5,35 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkFontTypes.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkPaint.h"
 #include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSerialProcs.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkTextBlob.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTArray.h"
+#include "include/private/SkTemplates.h"
 #include "include/private/SkTo.h"
 #include "src/core/SkTextBlobPriv.h"
-
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <algorithm>
+#include <cstddef>
+#include <cstdint>
+#include <string>
+
 class TextBlobTester {
 public:
     // This unit test feeds an SkTextBlobBuilder various runs then checks to see if
@@ -343,10 +362,6 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-#include "include/core/SkCanvas.h"
-#include "include/core/SkSurface.h"
-#include "include/private/SkTArray.h"
-
 static void add_run(SkTextBlobBuilder* builder, const char text[], SkScalar x, SkScalar y,
                     sk_sp<SkTypeface> tf) {
     SkFont font;
diff --git a/tests/TextureBindingsResetTest.cpp b/tests/TextureBindingsResetTest.cpp
index 29661d5..e2234df 100644
--- a/tests/TextureBindingsResetTest.cpp
+++ b/tests/TextureBindingsResetTest.cpp
@@ -8,14 +8,38 @@
 #include "tests/Test.h"
 
 #ifdef SK_GL
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/gl/GrGLFunctions.h"
+#include "include/gpu/gl/GrGLInterface.h"
+#include "include/gpu/gl/GrGLTypes.h"
+#include "include/private/SkTDArray.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrGpu.h"
+#include "src/gpu/ganesh/GrShaderCaps.h"
+#include "src/gpu/ganesh/gl/GrGLCaps.h"
 #include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
 #include "src/gpu/ganesh/gl/GrGLGpu.h"
 #include "src/gpu/ganesh/gl/GrGLUtil.h"
+#include "tests/CtsEnforcement.h"
+#include "tools/gpu/gl/GLTestContext.h"
+
+struct GrContextOptions;
 
 DEF_GANESH_TEST_FOR_GL_RENDERING_CONTEXTS(TextureBindingsResetTest,
                                           reporter,
diff --git a/tests/TextureOpTest.cpp b/tests/TextureOpTest.cpp
index 70d1a0d..252a8a2 100644
--- a/tests/TextureOpTest.cpp
+++ b/tests/TextureOpTest.cpp
@@ -5,17 +5,41 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkArenaAlloc.h"
+#include "src/gpu/Swizzle.h"
+#include "src/gpu/ganesh/GrAppliedClip.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrColorSpaceXform.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrProcessorSet.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
 #include "src/gpu/ganesh/geometry/GrQuad.h"
+#include "src/gpu/ganesh/ops/GrOp.h"
 #include "src/gpu/ganesh/ops/OpsTask.h"
 #include "src/gpu/ganesh/ops/TextureOp.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
+#include <utility>
+
+struct GrContextOptions;
+
 using namespace skgpu::ganesh;
 
 class OpsTaskTestingAccess {
diff --git a/tests/TextureProxyTest.cpp b/tests/TextureProxyTest.cpp
index 234e1cc..c9bda0f 100644
--- a/tests/TextureProxyTest.cpp
+++ b/tests/TextureProxyTest.cpp
@@ -7,25 +7,43 @@
 
 // This is a GPU-backend specific test.
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrRecordingContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/core/SkMessageBus.h"
+#include "src/gpu/ResourceKey.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrGpuResourcePriv.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
 #include "src/gpu/ganesh/GrRecordingContextPriv.h"
 #include "src/gpu/ganesh/GrResourceCache.h"
-#include "src/gpu/ganesh/GrResourceProvider.h"
+#include "src/gpu/ganesh/GrSurface.h"
 #include "src/gpu/ganesh/GrTexture.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
 #include "src/gpu/ganesh/SkGr.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 
-#ifdef SK_DAWN
-#include "src/gpu/ganesh/dawn/GrDawnGpu.h"
-#endif
+#include <cstddef>
+#include <cstdint>
+#include <initializer_list>
+#include <utility>
+
+class GrResourceProvider;
+struct GrContextOptions;
 
 int GrProxyProvider::numUniqueKeyProxies_TestOnly() const {
     return fUniquelyKeyedProxies.count();
diff --git a/tests/TextureStripAtlasManagerTest.cpp b/tests/TextureStripAtlasManagerTest.cpp
index e050cc0..674958c 100644
--- a/tests/TextureStripAtlasManagerTest.cpp
+++ b/tests/TextureStripAtlasManagerTest.cpp
@@ -5,17 +5,31 @@
  * found in the LICENSE file.
  */
 
-
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorFilter.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
 #include "include/gpu/GrDirectContext.h"
-
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <cstdint>
+#include <utility>
+
+class SkImage;
+struct GrContextOptions;
+
 // The gradient shader will use the texture strip atlas if it has too many colors. Make sure
 // abandoning the context works.
 DEF_GANESH_TEST_FOR_RENDERING_CONTEXTS(TextureStripAtlasManagerGradientTest,
diff --git a/tests/TopoSortTest.cpp b/tests/TopoSortTest.cpp
index 3ad1425..c8c4796 100644
--- a/tests/TopoSortTest.cpp
+++ b/tests/TopoSortTest.cpp
@@ -5,12 +5,18 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSpan.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTArray.h"
 #include "include/utils/SkRandom.h"
 #include "src/gpu/ganesh/GrTTopoSort.h"
 #include "tests/Test.h"
-
 #include "tools/ToolUtils.h"
 
+#include <cstddef>
+#include <vector>
+
 typedef void (*CreateGraphPF)(SkTArray<sk_sp<ToolUtils::TopoTestNode>>* graph);
 
 /* Simple diamond
diff --git a/tests/TraceMemoryDumpTest.cpp b/tests/TraceMemoryDumpTest.cpp
index 484f208..7cecf81 100644
--- a/tests/TraceMemoryDumpTest.cpp
+++ b/tests/TraceMemoryDumpTest.cpp
@@ -5,21 +5,35 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTraceMemoryDump.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
-
+#include "include/gpu/gl/GrGLTypes.h"
+#include "include/private/gpu/ganesh/GrGLTypesPriv.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrRenderTarget.h"
-#include "src/gpu/ganesh/GrTexture.h"
+#include <cstddef>
+#include <cstdint>
+#include <utility>
+
 #ifdef SK_GL
 #include "src/gpu/ganesh/gl/GrGLBuffer.h"
 #include "src/gpu/ganesh/gl/GrGLDefines_impl.h"
 #include "src/gpu/ganesh/gl/GrGLGpu.h"
+#include "src/gpu/ganesh/gl/GrGLRenderTarget.h"
+#include "src/gpu/ganesh/gl/GrGLTexture.h"
 #include "src/gpu/ganesh/gl/GrGLTextureRenderTarget.h"
 #endif
 
+class SkDiscardableMemory;
+struct GrContextOptions;
+
 /*
  * Build test for SkTraceMemoryDump.
  */
diff --git a/tests/TracingTest.cpp b/tests/TracingTest.cpp
index a0ea36d..1cd77a4 100644
--- a/tests/TracingTest.cpp
+++ b/tests/TracingTest.cpp
@@ -5,14 +5,18 @@
  * found in the LICENSE file.
  */
 
-#include "include/core/SkImageInfo.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
-#include "src/core/SkLeanWindows.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
 #include "src/core/SkTraceEvent.h"
 #include "tests/Test.h"
 #include "tools/flags/CommandLineFlags.h"
 
+#include <atomic>
+#include <cstdint>
+
 static DEFINE_bool(slowTracingTest, false,
                    "Artificially slow down tracing test to produce nicer JSON");
 
diff --git a/tests/TransferPixelsTest.cpp b/tests/TransferPixelsTest.cpp
index b3c1e6a..72a009b 100644
--- a/tests/TransferPixelsTest.cpp
+++ b/tests/TransferPixelsTest.cpp
@@ -7,21 +7,39 @@
 
 // This is a GPU-backend specific test. It relies on static initializers to work
 
-#include "include/core/SkTypes.h"
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkColorSpace.h"
-#include "include/core/SkSurface.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
+#include "include/gpu/GrConfig.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
+#include "src/gpu/ganesh/GrColor.h"
+#include "src/gpu/ganesh/GrDataUtils.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/GrGpu.h"
+#include "src/gpu/ganesh/GrGpuBuffer.h"
 #include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrPixmap.h"
 #include "src/gpu/ganesh/GrResourceProvider.h"
-#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/SkGr.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
-#include "tools/gpu/GrContextFactory.h"
+
+#include <algorithm>
+#include <cstdint>
+#include <cstring>
+#include <functional>
+#include <initializer_list>
+#include <memory>
+
+struct GrContextOptions;
 
 using sk_gpu_test::GrContextFactory;
 
diff --git a/tests/TriangulatingPathRendererTests.cpp b/tests/TriangulatingPathRendererTests.cpp
index 7d4af99..463c32a 100644
--- a/tests/TriangulatingPathRendererTests.cpp
+++ b/tests/TriangulatingPathRendererTests.cpp
@@ -5,24 +5,61 @@
  * found in the LICENSE file.
  */
 
-#include "tests/Test.h"
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkColor.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkMatrix.h"
 #include "include/core/SkPath.h"
+#include "include/core/SkPathTypes.h"
+#include "include/core/SkPoint.h"
 #include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkString.h"
+#include "include/core/SkStrokeRec.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTileMode.h"
+#include "include/core/SkTypes.h"
 #include "include/effects/SkGradientShader.h"
 #include "include/gpu/GrDirectContext.h"
-#include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "include/gpu/GrTypes.h"
+#include "include/private/SkFloatBits.h"
+#include "include/private/SkTemplates.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "include/utils/SkRandom.h"
+#include "src/core/SkArenaAlloc.h"
+#include "src/core/SkMatrixProvider.h"
+#include "src/core/SkPathPriv.h"
+#include "src/gpu/ganesh/GrColorInfo.h"
 #include "src/gpu/ganesh/GrEagerVertexAllocator.h"
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
+#include "src/gpu/ganesh/GrPaint.h"
 #include "src/gpu/ganesh/GrStyle.h"
 #include "src/gpu/ganesh/GrUserStencilSettings.h"
+#include "src/gpu/ganesh/PathRenderer.h"
+#include "src/gpu/ganesh/SurfaceDrawContext.h"
 #include "src/gpu/ganesh/effects/GrPorterDuffXferProcessor.h"
 #include "src/gpu/ganesh/geometry/GrAATriangulator.h"
 #include "src/gpu/ganesh/geometry/GrInnerFanTriangulator.h"
 #include "src/gpu/ganesh/geometry/GrStyledShape.h"
+#include "src/gpu/ganesh/geometry/GrTriangulator.h"
+#include "src/gpu/ganesh/ops/TriangulatingPathRenderer.h"
 #include "src/shaders/SkShaderBase.h"
+#include "tests/CtsEnforcement.h"
+#include "tests/Test.h"
 #include "tools/ToolUtils.h"
+
+#include <cmath>
+#include <cstddef>
+#include <initializer_list>
 #include <map>
+#include <memory>
+#include <utility>
+
+class GrRecordingContext;
+class SkShader;
+struct GrContextOptions;
 
 #if !defined(SK_ENABLE_OPTIMIZE_SIZE)
 
@@ -490,8 +527,6 @@
 };
 
 #if SK_GPU_V1
-#include "src/gpu/ganesh/SurfaceDrawContext.h"
-#include "src/gpu/ganesh/ops/TriangulatingPathRenderer.h"
 
 // A simple concave path. Test this with a non-invertible matrix.
 static SkPath create_path_17() {
diff --git a/tests/TypefaceTest.cpp b/tests/TypefaceTest.cpp
index e0cb09d..7d7c998 100644
--- a/tests/TypefaceTest.cpp
+++ b/tests/TypefaceTest.cpp
@@ -6,17 +6,26 @@
  */
 
 #include "include/core/SkData.h"
+#include "include/core/SkFont.h"
+#include "include/core/SkFontArguments.h"
 #include "include/core/SkFontMgr.h"
+#include "include/core/SkFontParameters.h"
+#include "include/core/SkFontStyle.h"
+#include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
 #include "include/core/SkStream.h"
+#include "include/core/SkString.h"
 #include "include/core/SkTypeface.h"
+#include "include/core/SkTypes.h"
 #include "include/private/SkFixed.h"
-#include "src/core/SkAdvancedTypefaceMetrics.h"
+#include "include/private/SkTemplates.h"
+#include "src/core/SkEndian.h"
 #include "src/core/SkFontDescriptor.h"
-#include "src/core/SkFontMgrPriv.h"
 #include "src/core/SkFontPriv.h"
 #include "src/core/SkTypefaceCache.h"
 #include "src/sfnt/SkOTTable_OS_2.h"
+#include "src/sfnt/SkOTTable_OS_2_V0.h"
 #include "src/sfnt/SkSFNTHeader.h"
 #include "src/utils/SkUTF.h"
 #include "tests/Test.h"
@@ -25,10 +34,15 @@
 #include "tools/fonts/TestEmptyTypeface.h"
 
 #include <algorithm>
+#include <cstddef>
+#include <cstdint>
 #include <memory>
+#include <string>
+#include <utility>
 
 #if defined(SK_BUILD_FOR_WIN)
 #include "include/ports/SkTypeface_win.h"
+#include "src/core/SkFontMgrPriv.h"
 #endif
 
 static void TypefaceStyle_test(skiatest::Reporter* reporter,
diff --git a/tests/UnicodeTest.cpp b/tests/UnicodeTest.cpp
index 2137678..b4d6e79 100644
--- a/tests/UnicodeTest.cpp
+++ b/tests/UnicodeTest.cpp
@@ -6,10 +6,15 @@
  */
 
 #include "include/core/SkFont.h"
-#include "include/core/SkPaint.h"
+#include "include/core/SkFontTypes.h"
+#include "src/core/SkFontPriv.h"
 #include "src/utils/SkUTF.h"
 #include "tests/Test.h"
 
+#include <cstddef>
+#include <cstdint>
+#include <string>
+
 // Simple test to ensure that when we call textToGlyphs, we get the same
 // result (for the same text) when using UTF8, UTF16, UTF32.
 // TODO: make the text more complex (i.e. incorporate chars>7bits)
@@ -44,9 +49,6 @@
     REPORTER_ASSERT(reporter, !memcmp(glyphs8, glyphs32, count8 * sizeof(uint16_t)));
 }
 
-#include "include/core/SkFont.h"
-#include "src/core/SkFontPriv.h"
-
 DEF_TEST(glyphs_to_unichars, reporter) {
     SkFont font;
 
diff --git a/tests/UtilsTest.cpp b/tests/UtilsTest.cpp
index 423a175..c1ec6de 100644
--- a/tests/UtilsTest.cpp
+++ b/tests/UtilsTest.cpp
@@ -7,6 +7,7 @@
 
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkSpan.h"
+#include "include/private/SkTemplates.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkEnumerate.h"
 #include "src/core/SkTSearch.h"
@@ -15,8 +16,13 @@
 #include "tests/Test.h"
 
 #include <array>
+#include <cstddef>
+#include <cstdint>
 #include <initializer_list>
+#include <memory>
+#include <new>
 #include <tuple>
+#include <utility>
 #include <vector>
 
 class RefClass : public SkRefCnt {
diff --git a/tests/VerticesTest.cpp b/tests/VerticesTest.cpp
index cabee01..68e6bba 100644
--- a/tests/VerticesTest.cpp
+++ b/tests/VerticesTest.cpp
@@ -5,7 +5,12 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkBlendMode.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
 #include "include/core/SkVertices.h"
 #include "src/core/SkAutoMalloc.h"
@@ -15,6 +20,8 @@
 #include "tests/Test.h"
 #include "tools/ToolUtils.h"
 
+#include <cstdint>
+
 static bool equal(const SkVertices* vert0, const SkVertices* vert1) {
     SkVerticesPriv v0(vert0->priv()), v1(vert1->priv());
 
diff --git a/tests/VkBackendSurfaceTest.cpp b/tests/VkBackendSurfaceTest.cpp
index 3ba31de..b0cb997 100644
--- a/tests/VkBackendSurfaceTest.cpp
+++ b/tests/VkBackendSurfaceTest.cpp
@@ -10,24 +10,32 @@
 #include "include/core/SkTypes.h"
 
 #if defined(SK_VULKAN)
-
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkRefCnt.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/gpu/vk/GrVkTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrTexture.h"
+#include "src/gpu/ganesh/GrSurface.h"
+#include "src/gpu/ganesh/GrSurfaceProxy.h"
 #include "src/gpu/ganesh/GrTextureProxy.h"
-#include "src/gpu/ganesh/vk/GrVkGpu.h"
-#include "src/gpu/ganesh/vk/GrVkImageLayout.h"
+#include "src/gpu/ganesh/vk/GrVkCaps.h"
+#include "src/gpu/ganesh/vk/GrVkImage.h"
 #include "src/gpu/ganesh/vk/GrVkTexture.h"
 #include "src/image/SkImage_Base.h"
-#include "src/image/SkImage_Gpu.h"
-#include "src/image/SkImage_GpuBase.h"
-#include "src/image/SkSurface_Gpu.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/ManagedBackendTexture.h"
 #include "tools/gpu/ProxyUtils.h"
+#include <vulkan/vulkan_core.h>
+#include <tuple>
+class GrTexture;
+struct GrContextOptions;
 
 DEF_GANESH_TEST_FOR_VULKAN_CONTEXT(VkDRMModifierTest, reporter, ctxInfo, CtsEnforcement::kNever) {
     auto dContext = ctxInfo.directContext();
diff --git a/tests/VkDrawableTest.cpp b/tests/VkDrawableTest.cpp
index 5c028ae..a0a9a2a 100644
--- a/tests/VkDrawableTest.cpp
+++ b/tests/VkDrawableTest.cpp
@@ -10,20 +10,37 @@
 #include "include/core/SkTypes.h"
 
 #if SK_SUPPORT_GPU && defined(SK_VULKAN)
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkDrawable.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPaint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSamplingOptions.h"
+#include "include/core/SkString.h"
 #include "include/core/SkSurface.h"
 #include "include/gpu/GrBackendDrawableInfo.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "include/gpu/vk/GrVkTypes.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
 #include "src/gpu/ganesh/vk/GrVkGpu.h"
-#include "src/gpu/ganesh/vk/GrVkMemory.h"
 #include "src/gpu/ganesh/vk/GrVkSecondaryCBDrawContext_impl.h"
 #include "src/gpu/ganesh/vk/GrVkUtil.h"
 #include "src/gpu/vk/VulkanInterface.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
+
+#include <vulkan/vulkan_core.h>
+#include <cstdint>
+#include <memory>
+
+struct GrContextOptions;
 
 using sk_gpu_test::GrContextFactory;
 
diff --git a/tests/VkPriorityExtensionTest.cpp b/tests/VkPriorityExtensionTest.cpp
index 2973053..b80584e 100644
--- a/tests/VkPriorityExtensionTest.cpp
+++ b/tests/VkPriorityExtensionTest.cpp
@@ -9,11 +9,22 @@
 
 #if SK_SUPPORT_GPU && defined(SK_VULKAN)
 
-#include "include/gpu/vk/GrVkTypes.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/vk/VulkanTypes.h"
 #include "src/core/SkAutoMalloc.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/vk/VkTestUtils.h"
 
+#include <algorithm>
+#include <cstdint>
+#include <functional>
+#include <initializer_list>
+#include <string>
+#include <vulkan/vulkan_core.h>
+
+struct GrContextOptions;
+
 #define ACQUIRE_VK_PROC_NOCHECK(name, instance) \
     PFN_vk##name grVk##name =                                                              \
             reinterpret_cast<PFN_vk##name>(getProc("vk" #name, instance, VK_NULL_HANDLE))
diff --git a/tests/VkProtectedContextTest.cpp b/tests/VkProtectedContextTest.cpp
index 67de254..65cb7d5 100644
--- a/tests/VkProtectedContextTest.cpp
+++ b/tests/VkProtectedContextTest.cpp
@@ -11,17 +11,35 @@
 
 #if SK_SUPPORT_GPU && defined(SK_VULKAN)
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkBlendMode.h"
+#include "include/core/SkBlurTypes.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkMaskFilter.h"
 #include "include/core/SkPaint.h"
+#include "include/core/SkPath.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceProps.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
-#include "include/gpu/vk/GrVkBackendContext.h"
+#include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/vk/VkTestHelper.h"
 
+#include <memory>
+#include <utility>
+
+struct GrContextOptions;
+
 static sk_sp<SkSurface> create_protected_sksurface(GrDirectContext* dContext,
                                                    skiatest::Reporter* reporter,
                                                    bool textureable = true) {
@@ -341,37 +359,4 @@
     canvas->drawImage(image, 0, 0);
 }
 
-//////////////////////////////////////////////////////////////////////////////////////////////////
-// Test out DDLs using a protected Vulkan context
-
-void DDLMakeRenderTargetTestImpl(GrDirectContext*, skiatest::Reporter*);
-
-DEF_GANESH_TEST(VkProtectedContext_DDLMakeRenderTargetTest,
-                reporter,
-                ctxInfo,
-                CtsEnforcement::kNever) {
-    auto protectedTestHelper = std::make_unique<VkTestHelper>(true);
-    if (!protectedTestHelper->init()) {
-        return;
-    }
-    REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr);
-
-    DDLMakeRenderTargetTestImpl(protectedTestHelper->directContext(), reporter);
-}
-
-void DDLSurfaceCharacterizationTestImpl(GrDirectContext*, skiatest::Reporter*);
-
-DEF_GANESH_TEST(VkProtectedContext_DDLSurfaceCharacterizationTest,
-                reporter,
-                ctxInfo,
-                CtsEnforcement::kNever) {
-    auto protectedTestHelper = std::make_unique<VkTestHelper>(true);
-    if (!protectedTestHelper->init()) {
-        return;
-    }
-    REPORTER_ASSERT(reporter, protectedTestHelper->directContext() != nullptr);
-
-    DDLSurfaceCharacterizationTestImpl(protectedTestHelper->directContext(), reporter);
-}
-
 #endif  // SK_SUPPORT_GPU && defined(SK_VULKAN)
diff --git a/tests/VkWrapTests.cpp b/tests/VkWrapTests.cpp
index 2acd270..5c93ead 100644
--- a/tests/VkWrapTests.cpp
+++ b/tests/VkWrapTests.cpp
@@ -11,18 +11,25 @@
 
 #if defined(SK_VULKAN)
 
+#include "include/core/SkColorType.h"
+#include "include/core/SkRefCnt.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/gpu/vk/GrVkTypes.h"
+#include "include/gpu/vk/VulkanTypes.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
+#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrRenderTarget.h"
 #include "src/gpu/ganesh/GrTexture.h"
-#include "src/gpu/ganesh/vk/GrVkCaps.h"
-#include "src/gpu/ganesh/vk/GrVkGpu.h"
-#include "src/gpu/ganesh/vk/GrVkMemory.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
-#include "tools/gpu/GrContextFactory.h"
 #include "tools/gpu/ManagedBackendTexture.h"
+#include <vulkan/vulkan_core.h>
+#include <initializer_list>
+struct GrContextOptions;
 
 using sk_gpu_test::GrContextFactory;
 
diff --git a/tests/VkYcbcrSamplerTest.cpp b/tests/VkYcbcrSamplerTest.cpp
index 62c3633..348ef32 100644
--- a/tests/VkYcbcrSamplerTest.cpp
+++ b/tests/VkYcbcrSamplerTest.cpp
@@ -8,16 +8,31 @@
 #include "include/core/SkTypes.h"
 
 #if SK_SUPPORT_GPU && defined(SK_VULKAN)
-
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkCanvas.h"
 #include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkImage.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkRefCnt.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
+#include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/vk/VkTestHelper.h"
 #include "tools/gpu/vk/VkYcbcrSamplerHelper.h"
 
+#include <vulkan/vulkan_core.h>
+
+#include <cmath>
+#include <cstddef>
+#include <cstdint>
+#include <vector>
+
+struct GrContextOptions;
 const size_t kImageWidth = 8;
 const size_t kImageHeight = 8;
 
diff --git a/tests/WangsFormulaTest.cpp b/tests/WangsFormulaTest.cpp
index 985e81a..6ed6dcf 100644
--- a/tests/WangsFormulaTest.cpp
+++ b/tests/WangsFormulaTest.cpp
@@ -5,11 +5,26 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkMatrix.h"
+#include "include/core/SkPoint.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkVx.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkGeometry.h"
+#include "src/gpu/tessellate/Tessellation.h"
 #include "src/gpu/tessellate/WangsFormula.h"
 #include "tests/Test.h"
 
+#include <algorithm>
+#include <cmath>
+#include <cstdlib>
+#include <functional>
+#include <limits>
+#include <string>
+#include <utility>
+
 namespace skgpu::tess {
 
 const SkPoint kSerp[4] = {
diff --git a/tests/WebpTest.cpp b/tests/WebpTest.cpp
index 34af759..d4d0767 100644
--- a/tests/WebpTest.cpp
+++ b/tests/WebpTest.cpp
@@ -6,11 +6,15 @@
  */
 
 #include "include/codec/SkCodec.h"
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
+#include "include/core/SkImageInfo.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 #include "tools/ToolUtils.h"
 
+#include <memory>
+
 DEF_TEST(WebpCodecBlend, r) {
     const char* path = "images/blendBG.webp";
     auto codec = SkCodec::MakeFromData(GetResourceAsData(path));
diff --git a/tests/WindowRectanglesTest.cpp b/tests/WindowRectanglesTest.cpp
index 148677a..a38b1a2 100644
--- a/tests/WindowRectanglesTest.cpp
+++ b/tests/WindowRectanglesTest.cpp
@@ -5,12 +5,14 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkRect.h"
 #include "include/core/SkTypes.h"
-#include "tests/Test.h"
-
 #include "include/utils/SkRandom.h"
 #include "src/core/SkRectPriv.h"
 #include "src/gpu/ganesh/GrWindowRectangles.h"
+#include "tests/Test.h"
+
+#include <cstring>
 
 static SkIRect next_irect(SkRandom& r) {
     return {r.nextS(), r.nextS(), r.nextS(), r.nextS()};
diff --git a/tests/WrappedSurfaceCopyOnWriteTest.cpp b/tests/WrappedSurfaceCopyOnWriteTest.cpp
index f306af7..f7b39d0 100644
--- a/tests/WrappedSurfaceCopyOnWriteTest.cpp
+++ b/tests/WrappedSurfaceCopyOnWriteTest.cpp
@@ -5,21 +5,47 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
+#include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorSpace.h"
+#include "include/core/SkColorType.h"
 #include "include/core/SkDeferredDisplayListRecorder.h"
+#include "include/core/SkImage.h"
 #include "include/core/SkImageInfo.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSurface.h"
+#include "include/core/SkSurfaceCharacterization.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrDirectContext.h"
 #include "include/gpu/GrTypes.h"
+#include "include/private/SkColorData.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkAutoPixmapStorage.h"
 #include "src/core/SkCanvasPriv.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrDrawingManager.h"
+#include "src/gpu/ganesh/GrImageInfo.h"
+#include "src/gpu/ganesh/GrRenderTargetProxy.h"
+#include "src/gpu/ganesh/GrRenderTask.h"
+#include "src/gpu/ganesh/GrSamplerState.h"
 #include "src/gpu/ganesh/GrSurfaceProxy.h"
+#include "src/gpu/ganesh/GrSurfaceProxyView.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "src/gpu/ganesh/SurfaceContext.h"
 #include "src/gpu/ganesh/SurfaceFillContext.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tests/TestUtils.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
 #include "tools/gpu/ProxyUtils.h"
 
+#include <functional>
+#include <memory>
+
+struct GrContextOptions;
+
 DEF_GANESH_TEST_FOR_ALL_CONTEXTS(WrappedSurfaceCopyOnWrite,
                                  reporter,
                                  ctxInfo,
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 0d8744f..86d2e16 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -5,21 +5,46 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkAlphaType.h"
 #include "include/core/SkBitmap.h"
 #include "include/core/SkCanvas.h"
+#include "include/core/SkColor.h"
+#include "include/core/SkColorPriv.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkMallocPixelRef.h"
+#include "include/core/SkPixelRef.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkSurface.h"
+#include "include/core/SkTypes.h"
 #include "include/gpu/GrBackendSurface.h"
 #include "include/gpu/GrDirectContext.h"
+#include "include/gpu/GrTypes.h"
 #include "include/private/SkColorData.h"
 #include "include/private/SkImageInfoPriv.h"
+#include "include/private/SkMalloc.h"
+#include "include/private/gpu/ganesh/GrTypesPriv.h"
 #include "src/core/SkMathPriv.h"
+#include "src/gpu/ganesh/GrCaps.h"
 #include "src/gpu/ganesh/GrDirectContextPriv.h"
-#include "src/gpu/ganesh/GrGpu.h"
 #include "src/gpu/ganesh/GrProxyProvider.h"
+#include "src/gpu/ganesh/GrTextureProxy.h"
+#include "tests/CtsEnforcement.h"
 #include "tests/Test.h"
 #include "tools/gpu/BackendSurfaceFactory.h"
 
+#include <array>
+#include <cstdint>
+#include <cstring>
 #include <initializer_list>
+#include <memory>
+#include <utility>
+
+class GrRecordingContext;
+class SkImage;
+struct GrContextOptions;
 
 static const int DEV_W = 100, DEV_H = 100;
 static const SkIRect DEV_RECT = SkIRect::MakeWH(DEV_W, DEV_H);
@@ -273,8 +298,6 @@
     return true;
 }
 
-#include "include/core/SkMallocPixelRef.h"
-
 // This is a tricky pattern, because we have to setConfig+rowBytes AND specify
 // a custom pixelRef (which also has to specify its rowBytes), so we have to be
 // sure that the two rowBytes match (and the infos match).
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
index 18dcbf85..0a6874b 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -5,12 +5,22 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkData.h"
+#include "include/core/SkRect.h"
+#include "include/core/SkRefCnt.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkTypes.h"
+#include "include/private/SkTemplates.h"
 #include "include/utils/SkRandom.h"
 #include "src/core/SkAutoMalloc.h"
 #include "src/core/SkReadBuffer.h"
 #include "src/core/SkWriter32.h"
 #include "tests/Test.h"
 
+#include <array>
+#include <cstdint>
+#include <cstring>
+
 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer,
                            const void* expected, size_t size) {
     SkAutoSMalloc<256> storage(size);
diff --git a/tests/YUVCacheTest.cpp b/tests/YUVCacheTest.cpp
index c8fb9dc..18fa695 100644
--- a/tests/YUVCacheTest.cpp
+++ b/tests/YUVCacheTest.cpp
@@ -5,6 +5,8 @@
  * found in the LICENSE file.
  */
 
+#include "include/core/SkImageInfo.h"
+#include "include/core/SkPixmap.h"
 #include "include/core/SkYUVAInfo.h"
 #include "include/core/SkYUVAPixmaps.h"
 #include "src/core/SkCachedData.h"
@@ -12,6 +14,9 @@
 #include "src/core/SkYUVPlanesCache.h"
 #include "tests/Test.h"
 
+#include <cstdint>
+#include <cstring>
+
 enum LockedState {
     kUnlocked,
     kLocked,
diff --git a/tests/YUVTest.cpp b/tests/YUVTest.cpp
index 169a8ba..759ce90 100644
--- a/tests/YUVTest.cpp
+++ b/tests/YUVTest.cpp
@@ -6,13 +6,23 @@
  */
 
 #include "include/codec/SkCodec.h"
+#include "include/codec/SkEncodedOrigin.h"
+#include "include/core/SkColorType.h"
+#include "include/core/SkImageInfo.h"
 #include "include/core/SkPixmap.h"
+#include "include/core/SkScalar.h"
+#include "include/core/SkSize.h"
 #include "include/core/SkStream.h"
-#include "include/private/SkTemplates.h"
-#include "src/core/SkAutoMalloc.h"
+#include "include/core/SkTypes.h"
+#include "include/core/SkYUVAInfo.h"
+#include "include/core/SkYUVAPixmaps.h"
+#include "include/effects/SkColorMatrix.h"
 #include "tests/Test.h"
 #include "tools/Resources.h"
 
+#include <memory>
+#include <utility>
+
 static void codec_yuv(skiatest::Reporter* reporter,
                       const char path[],
                       const SkYUVAInfo* expectedInfo) {
@@ -126,9 +136,6 @@
     codec_yuv(r, "images/arrow.png", nullptr);
 }
 
-#include "include/effects/SkColorMatrix.h"
-#include "src/core/SkYUVMath.h"
-
 // Be sure that the two matrices are inverses of each other
 // (i.e. rgb2yuv and yuv2rgb
 DEF_TEST(YUVMath, reporter) {
diff --git a/tests/graphite/RecordingOrderTest.cpp b/tests/graphite/RecordingOrderTest.cpp
index 85fa443..3e484b9 100644
--- a/tests/graphite/RecordingOrderTest.cpp
+++ b/tests/graphite/RecordingOrderTest.cpp
@@ -7,6 +7,7 @@
 
 #include "tests/Test.h"
 
+#include "include/core/SkBitmap.h"
 #include "include/gpu/graphite/Context.h"
 #include "include/gpu/graphite/Recording.h"
 #include "src/gpu/graphite/ContextPriv.h"
diff --git a/tools/debugger/DebugCanvas.h b/tools/debugger/DebugCanvas.h
index b08dd83..5597bd0 100644
--- a/tools/debugger/DebugCanvas.h
+++ b/tools/debugger/DebugCanvas.h
@@ -21,6 +21,7 @@
 #include "include/core/SkTypes.h"
 #include "include/private/SkTDArray.h"
 
+#include <cstddef>
 #include <map>
 #include <vector>
 
diff --git a/tools/debugger/DebugLayerManager.cpp b/tools/debugger/DebugLayerManager.cpp
index c7b74bf..10a60f0 100644
--- a/tools/debugger/DebugLayerManager.cpp
+++ b/tools/debugger/DebugLayerManager.cpp
@@ -19,6 +19,7 @@
 #include "include/private/SkTHash.h"
 #include "tools/debugger/DebugCanvas.h"
 
+#include <cstdint>
 #include <memory>
 #include <unordered_map>
 #include <utility>
diff --git a/tools/debugger/DrawCommand.h b/tools/debugger/DrawCommand.h
index 3adf925..53bfeb4 100644
--- a/tools/debugger/DrawCommand.h
+++ b/tools/debugger/DrawCommand.h
@@ -23,7 +23,6 @@
 #include "include/core/SkPicture.h"
 #include "include/core/SkPoint.h"
 #include "include/core/SkRRect.h"
-#include "include/core/SkRSXform.h"
 #include "include/core/SkRect.h"
 #include "include/core/SkRefCnt.h"
 #include "include/core/SkRegion.h"
@@ -39,6 +38,9 @@
 #include "src/core/SkDrawShadowInfo.h"
 #include "src/core/SkTLazy.h"
 
+#include <cstddef>
+#include <cstdint>
+
 class DebugLayerManager;
 class SkBitmap;
 class SkFlattenable;
@@ -46,6 +48,7 @@
 class SkWStream;
 class UrlDataManager;
 struct SkPoint3;
+struct SkRSXform;
 
 class DrawCommand {
 public:
diff --git a/tools/debugger/JsonWriteBuffer.h b/tools/debugger/JsonWriteBuffer.h
index 4f46033..e40eae9 100644
--- a/tools/debugger/JsonWriteBuffer.h
+++ b/tools/debugger/JsonWriteBuffer.h
@@ -14,6 +14,8 @@
 #include "include/core/SkTypes.h"
 #include "src/core/SkWriteBuffer.h"
 
+#include <cstddef>
+#include <cstdint>
 #include <string_view>
 
 class SkFlattenable;