IWYU for some test files starting with 'C'.

Change-Id: Iea274ae52da8b4b87ec55222c856f40a0d88c4e0
Reviewed-on: https://skia-review.googlesource.com/113746
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Reviewed-on: https://skia-review.googlesource.com/113944
Reviewed-by: Ben Wagner <bungeman@google.com>
diff --git a/tests/CachedDataTest.cpp b/tests/CachedDataTest.cpp
index fe7bb5f..efb4d71 100644
--- a/tests/CachedDataTest.cpp
+++ b/tests/CachedDataTest.cpp
@@ -7,8 +7,15 @@
 
 #include "SkCachedData.h"
 #include "SkDiscardableMemoryPool.h"
+#include "SkMalloc.h"
+#include "SkRefCnt.h"
+#include "SkTypes.h"
 #include "Test.h"
 
+#include <cstring>
+
+class SkDiscardableMemory;
+
 enum LockedState {
     kUnlocked,
     kLocked,
diff --git a/tests/CachedDecodingPixelRefTest.cpp b/tests/CachedDecodingPixelRefTest.cpp
index a44781b..95f9d8d 100644
--- a/tests/CachedDecodingPixelRefTest.cpp
+++ b/tests/CachedDecodingPixelRefTest.cpp
@@ -7,19 +7,20 @@
 
 #include "SkBitmap.h"
 #include "SkCanvas.h"
-#include "SkData.h"
-#include "SkDiscardableMemoryPool.h"
+#include "SkColor.h"
+#include "SkColorData.h"
 #include "SkImage.h"
-#include "SkImageEncoder.h"
 #include "SkImageGenerator.h"
+#include "SkImageInfo.h"
 #include "SkMakeUnique.h"
-#include "SkResourceCache.h"
-#include "SkStream.h"
+#include "SkRefCnt.h"
+#include "SkTypes.h"
 #include "SkUtils.h"
-
 #include "Test.h"
 #include "sk_tool_utils.h"
 
+#include <utility>
+
 class TestImageGenerator : public SkImageGenerator {
 public:
     enum TestType {
diff --git a/tests/CanvasStateHelpers.cpp b/tests/CanvasStateHelpers.cpp
index 1547d2f..e84615d 100644
--- a/tests/CanvasStateHelpers.cpp
+++ b/tests/CanvasStateHelpers.cpp
@@ -5,13 +5,19 @@
  * found in the LICENSE file.
  */
 
-#include "CanvasStateHelpers.h"
+#include "SkTypes.h"
 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
+#include "CanvasStateHelpers.h"
 #include "SkCanvas.h"
 #include "SkCanvasStateUtils.h"
+#include "SkClipOp.h"
+#include "SkColor.h"
 #include "SkPaint.h"
 #include "SkRect.h"
 #include "SkRegion.h"
+#include "SkScalar.h"
+
+#include <memory>
 
 void complex_layers_draw(SkCanvas* canvas, float left, float top,
                          float right, float bottom, int32_t spacer) {
diff --git a/tests/CanvasStateTest.cpp b/tests/CanvasStateTest.cpp
index 2e78d15..775c15a 100644
--- a/tests/CanvasStateTest.cpp
+++ b/tests/CanvasStateTest.cpp
@@ -8,17 +8,27 @@
 #include "CanvasStateHelpers.h"
 #include "SkBitmap.h"
 #include "SkCanvas.h"
-#include "SkClipOpPriv.h"
 #include "SkCanvasStateUtils.h"
+#include "SkClipOpPriv.h"
+#include "SkColor.h"
 #include "SkCommandLineFlags.h"
 #include "SkDrawFilter.h"
+#include "SkImageInfo.h"
 #include "SkPaint.h"
-#include "SkRegion.h"
 #include "SkRRect.h"
 #include "SkRect.h"
+#include "SkRegion.h"
+#include "SkScalar.h"
+#include "SkTDArray.h"
 #include "SkTLazy.h"
+#include "SkTypes.h"
 #include "Test.h"
 
+#include <cstring>
+#include <memory>
+
+class SkCanvasState;
+
 // dlopen and the library flag are only used for tests which require this flag.
 #ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
 #include <dlfcn.h>
diff --git a/tests/CanvasTest.cpp b/tests/CanvasTest.cpp
index f027071..3c6cb22 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -46,29 +46,53 @@
  */
 
 #include "SkBitmap.h"
+#include "SkBlendMode.h"
 #include "SkCanvas.h"
-#include "SkClipStack.h"
+#include "SkCanvasStack.h"
+#include "SkClipOp.h"
+#include "SkClipOpPriv.h"
+#include "SkColor.h"
 #include "SkDocument.h"
+#include "SkFlattenable.h"
+#include "SkImageFilter.h"
+#include "SkImageInfo.h"
+#include "SkMalloc.h"
 #include "SkMatrix.h"
 #include "SkNWayCanvas.h"
 #include "SkPaint.h"
 #include "SkPaintFilterCanvas.h"
 #include "SkPath.h"
-#include "SkPicture.h"
-#include "SkPictureRecord.h"
 #include "SkPictureRecorder.h"
-#include "SkRasterClip.h"
+#include "SkPixmap.h"
+#include "SkPoint.h"
 #include "SkRect.h"
+#include "SkRefCnt.h"
 #include "SkRegion.h"
+#include "SkScalar.h"
 #include "SkShader.h"
+#include "SkSize.h"
 #include "SkSpecialImage.h"
 #include "SkStream.h"
+#include "SkString.h"
 #include "SkSurface.h"
 #include "SkTDArray.h"
 #include "SkTemplates.h"
+#include "SkTypes.h"
 #include "SkVertices.h"
 #include "Test.h"
 
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
+#include "SkColorData.h"
+#include "SkColorSpace.h"
+#endif
+
+#include <memory>
+#include <utility>
+
+class SkColorSpaceXformer;
+class SkReadBuffer;
+template <typename T> class SkTCopyOnFirstWrite;
+
 DEF_TEST(canvas_clipbounds, reporter) {
     SkCanvas canvas(10, 10);
     SkIRect irect, irect2;
@@ -685,9 +709,6 @@
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#include "SkCanvasStack.h"
-#include "SkNWayCanvas.h"
-
 // Subclass that takes a bool*, which it updates in its construct (true) and destructor (false)
 // to allow the caller to know how long the object is alive.
 class LifeLineCanvas : public SkCanvas {
diff --git a/tests/ChecksumTest.cpp b/tests/ChecksumTest.cpp
index 1882235..7427187 100644
--- a/tests/ChecksumTest.cpp
+++ b/tests/ChecksumTest.cpp
@@ -8,6 +8,7 @@
 #include "SkChecksum.h"
 #include "SkOpts.h"
 #include "SkRandom.h"
+#include "SkTypes.h"
 #include "Test.h"
 
 DEF_TEST(Checksum, r) {
diff --git a/tests/ClearTest.cpp b/tests/ClearTest.cpp
index 429b9e1..1110fdd 100644
--- a/tests/ClearTest.cpp
+++ b/tests/ClearTest.cpp
@@ -5,14 +5,29 @@
  * found in the LICENSE file.
  */
 
-#include "Test.h"
+#include "SkTypes.h"
 
 #if SK_SUPPORT_GPU
+#include "GrColor.h"
 #include "GrContext.h"
+#include "GrContextFactory.h"
+#include "GrContextOptions.h"
+#include "GrContextPriv.h"
 #include "GrRenderTargetContext.h"
-
+#include "GrTypes.h"
+#include "SkBitmap.h"
 #include "SkCanvas.h"
+#include "SkColor.h"
+#include "SkColorSpace.h"
+#include "SkImageInfo.h"
+#include "SkPaint.h"
+#include "SkRect.h"
+#include "SkRefCnt.h"
 #include "SkSurface.h"
+#include "Test.h"
+
+#include <cstring>
+#include <memory>
 
 static bool check_rect(GrRenderTargetContext* rtc, const SkIRect& rect, uint32_t expectedValue,
                        uint32_t* actualValue, int* failX, int* failY) {
diff --git a/tests/ClipBoundsTest.cpp b/tests/ClipBoundsTest.cpp
index e8aae38..d616902 100644
--- a/tests/ClipBoundsTest.cpp
+++ b/tests/ClipBoundsTest.cpp
@@ -5,11 +5,16 @@
  * found in the LICENSE file.
  */
 
-#include "Test.h"
+#include "SkTypes.h"
+
 // This is a GR test
 #if SK_SUPPORT_GPU
 #include "GrClipStackClip.h"
-#include "GrContext.h"
+#include "SkClipOpPriv.h"
+#include "SkClipStack.h"
+#include "SkMatrix.h"
+#include "SkRect.h"
+#include "Test.h"
 
 // Ensure that the 'getConservativeBounds' calls are returning bounds clamped
 // to the render target
diff --git a/tests/ClipCubicTest.cpp b/tests/ClipCubicTest.cpp
index 854ac32..a2024ff 100644
--- a/tests/ClipCubicTest.cpp
+++ b/tests/ClipCubicTest.cpp
@@ -7,10 +7,17 @@
 
 #include "SkBitmap.h"
 #include "SkCanvas.h"
+#include "SkColor.h"
 #include "SkCubicClipper.h"
-#include "SkGeometry.h"
+#include "SkFloatBits.h"
 #include "SkPaint.h"
 #include "SkPath.h"
+#include "SkPoint.h"
+#include "SkRect.h"
+#include "SkRefCnt.h"
+#include "SkScalar.h"
+#include "SkSurface.h"
+#include "SkTypes.h"
 #include "Test.h"
 
 // Currently the supersampler blitter uses int16_t for its index into an array
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index fb46681..eeef831 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -5,17 +5,39 @@
  * found in the LICENSE file.
  */
 
-#include "Test.h"
+#include "SkCanvas.h"
+#include "SkClipOp.h"
+#include "SkClipOpPriv.h"
 #include "SkClipStack.h"
+#include "SkImageInfo.h"
+#include "SkMatrix.h"
 #include "SkPath.h"
+#include "SkPoint.h"
+#include "SkRRect.h"
 #include "SkRandom.h"
 #include "SkRect.h"
+#include "SkRefCnt.h"
 #include "SkRegion.h"
+#include "SkScalar.h"
+#include "SkSize.h"
+#include "SkString.h"
+#include "SkSurface.h"
+#include "SkTLList.h"
+#include "SkTemplates.h"
+#include "SkTypes.h"
+#include "Test.h"
 
 #if SK_SUPPORT_GPU
+#include "GrCaps.h"
+#include "GrClip.h"
 #include "GrClipStackClip.h"
+#include "GrConfig.h"
+#include "GrContext.h"
+#include "GrContextFactory.h"
+#include "GrContextPriv.h"
 #include "GrReducedClip.h"
 #include "GrResourceCache.h"
+#include "GrResourceKey.h"
 #include "GrSurfaceProxyPriv.h"
 #include "GrTexture.h"
 #include "GrTextureProxy.h"
@@ -23,6 +45,9 @@
 typedef GrReducedClip::InitialState InitialState;
 #endif
 
+#include <cstring>
+#include <new>
+
 static void test_assign_and_comparison(skiatest::Reporter* reporter) {
     SkClipStack s;
     bool doAA = false;
@@ -1510,7 +1535,6 @@
 #endif
 }
 
-#include "SkSurface.h"
 DEF_GPUTEST_FOR_ALL_CONTEXTS(canvas_private_clipRgn, reporter, ctxInfo) {
     GrContext* context = ctxInfo.grContext();
 
diff --git a/tests/ClipperTest.cpp b/tests/ClipperTest.cpp
index 641ed01..0bb5212 100644
--- a/tests/ClipperTest.cpp
+++ b/tests/ClipperTest.cpp
@@ -7,11 +7,18 @@
 
 #include "SkBitmap.h"
 #include "SkCanvas.h"
+#include "SkColor.h"
 #include "SkEdgeClipper.h"
 #include "SkLineClipper.h"
-#include "SkPath.h"
+#include "SkPaint.h"
+#include "SkPoint.h"
+#include "SkRect.h"
+#include "SkScalar.h"
+#include "SkTypes.h"
 #include "Test.h"
 
+#include <cstring>
+
 static void test_hairclipping(skiatest::Reporter* reporter) {
     SkBitmap bm;
     bm.allocN32Pixels(4, 4);
diff --git a/tests/CodecAnimTest.cpp b/tests/CodecAnimTest.cpp
index c5c65f8..a3e16c6 100644
--- a/tests/CodecAnimTest.cpp
+++ b/tests/CodecAnimTest.cpp
@@ -5,17 +5,24 @@
  * found in the LICENSE file.
  */
 
+#include "CodecPriv.h"
+#include "Resources.h"
 #include "SkAndroidCodec.h"
 #include "SkBitmap.h"
 #include "SkCodec.h"
-#include "SkStream.h"
-
-#include "CodecPriv.h"
-#include "Resources.h"
+#include "SkCodecAnimation.h"
+#include "SkData.h"
+#include "SkImageInfo.h"
+#include "SkRefCnt.h"
+#include "SkSize.h"
+#include "SkString.h"
+#include "SkTypes.h"
 #include "Test.h"
 #include "sk_tool_utils.h"
 
-#include <initializer_list>
+#include <cstring>
+#include <memory>
+#include <utility>
 #include <vector>
 
 DEF_TEST(Codec_trunc, r) {
diff --git a/tests/CodecExactReadTest.cpp b/tests/CodecExactReadTest.cpp
index 6189bdf..86702a1 100644
--- a/tests/CodecExactReadTest.cpp
+++ b/tests/CodecExactReadTest.cpp
@@ -6,13 +6,19 @@
  */
 
 #include "Resources.h"
-#include "Test.h"
-
 #include "SkBitmap.h"
 #include "SkCodec.h"
 #include "SkData.h"
+#include "SkImageInfo.h"
 #include "SkMakeUnique.h"
+#include "SkRefCnt.h"
 #include "SkStream.h"
+#include "SkTemplates.h"
+#include "Test.h"
+
+#include <cstring>
+#include <memory>
+#include <utility>
 
 namespace {
 // This class wraps another SkStream. It does not own the underlying stream, so
diff --git a/tests/CodecPartialTest.cpp b/tests/CodecPartialTest.cpp
index 561dddd..f33f8ba 100644
--- a/tests/CodecPartialTest.cpp
+++ b/tests/CodecPartialTest.cpp
@@ -5,18 +5,23 @@
  * found in the LICENSE file.
  */
 
+#include "FakeStreams.h"
+#include "Resources.h"
 #include "SkBitmap.h"
 #include "SkCodec.h"
 #include "SkData.h"
 #include "SkImageInfo.h"
 #include "SkMakeUnique.h"
-#include "SkRWBuffer.h"
-#include "SkString.h"
-
-#include "FakeStreams.h"
-#include "Resources.h"
+#include "SkRefCnt.h"
+#include "SkStream.h"
+#include "SkTypes.h"
 #include "Test.h"
 
+#include <cstring>
+#include <memory>
+#include <utility>
+#include <vector>
+
 static SkImageInfo standardize_info(SkCodec* codec) {
     SkImageInfo defaultInfo = codec->getInfo();
     // Note: This drops the SkColorSpace, allowing the equality check between two
diff --git a/tests/CodecRecommendedTypeTest.cpp b/tests/CodecRecommendedTypeTest.cpp
index 180bf2f..6ba1157 100644
--- a/tests/CodecRecommendedTypeTest.cpp
+++ b/tests/CodecRecommendedTypeTest.cpp
@@ -7,15 +7,18 @@
 
 #include "SkAndroidCodec.h"
 #include "SkBitmap.h"
-#include "SkCodec.h"
+#include "SkColor.h"
 #include "SkColorSpace.h"
+#include "SkData.h"
 #include "SkEncodedImageFormat.h"
 #include "SkImageEncoder.h"
 #include "SkImageInfo.h"
 #include "SkStream.h"
-
 #include "Test.h"
 
+#include <memory>
+#include <utility>
+
 DEF_TEST(Codec_recommendedF16, r) {
     // Encode an F16 bitmap. SkEncodeImage will encode this to a true-color PNG
     // with a bit depth of 16. SkAndroidCodec should always recommend F16 for
diff --git a/tests/CodecTest.cpp b/tests/CodecTest.cpp
index d8dab25..e83988a 100644
--- a/tests/CodecTest.cpp
+++ b/tests/CodecTest.cpp
@@ -13,29 +13,46 @@
 #include "SkCanvas.h"
 #include "SkCodec.h"
 #include "SkCodecImageGenerator.h"
-#include "SkColorSpace_XYZ.h"
+#include "SkColor.h"
+#include "SkColorSpace.h"
 #include "SkColorSpacePriv.h"
 #include "SkData.h"
+#include "SkEncodedImageFormat.h"
 #include "SkFrontBufferedStream.h"
-#include "SkImageEncoder.h"
-#include "SkImageEncoderPriv.h"
-#include "SkMakeUnique.h"
-#include "SkMD5.h"
-#include "SkOSPath.h"
+#include "SkImage.h"
+#include "SkImageGenerator.h"
+#include "SkImageInfo.h"
 #include "SkJpegEncoder.h"
+#include "SkMD5.h"
+#include "SkMakeUnique.h"
+#include "SkMalloc.h"
+#include "SkMatrix44.h"
+#include "SkPixmap.h"
 #include "SkPngChunkReader.h"
 #include "SkPngEncoder.h"
 #include "SkRandom.h"
+#include "SkRect.h"
+#include "SkRefCnt.h"
+#include "SkSize.h"
 #include "SkStream.h"
 #include "SkStreamPriv.h"
+#include "SkString.h"
+#include "SkTemplates.h"
+#include "SkTypes.h"
 #include "SkUnPreMultiply.h"
 #include "SkWebpEncoder.h"
 #include "Test.h"
-
 #include "png.h"
-
+#include "pngconf.h"
+#include "scripts/pnglibconf.h.prebuilt"
 #include "sk_tool_utils.h"
 
+#include <setjmp.h>
+#include <cstring>
+#include <memory>
+#include <utility>
+#include <vector>
+
 #if PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR < 5
     // FIXME (scroggo): Google3 needs to be updated to use a newer version of libpng. In
     // the meantime, we had to break some pieces of SkPngCodec in order to support Google3.