aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CachedDataTest.cpp7
-rw-r--r--tests/CachedDecodingPixelRefTest.cpp13
-rw-r--r--tests/CanvasStateHelpers.cpp8
-rw-r--r--tests/CanvasStateTest.cpp14
-rw-r--r--tests/CanvasTest.cpp30
-rw-r--r--tests/ChecksumTest.cpp1
-rw-r--r--tests/ClearTest.cpp19
-rw-r--r--tests/ClipBoundsTest.cpp9
-rw-r--r--tests/ClipCubicTest.cpp9
-rw-r--r--tests/ClipStackTest.cpp28
-rw-r--r--tests/ClipperTest.cpp9
-rw-r--r--tests/CodecAnimTest.cpp17
-rw-r--r--tests/CodecExactReadTest.cpp10
-rw-r--r--tests/CodecPartialTest.cpp15
-rw-r--r--tests/CodecRecommendedTypeTest.cpp7
-rw-r--r--tests/CodecTest.cpp33
16 files changed, 183 insertions, 46 deletions
diff --git a/tests/CachedDataTest.cpp b/tests/CachedDataTest.cpp
index fe7bb5f547..efb4d71c77 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 a44781bc2e..95f9d8d09a 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 1547d2f8e0..e84615d73f 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 2e78d15866..775c15a80d 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 f027071b53..5169119fdd 100644
--- a/tests/CanvasTest.cpp
+++ b/tests/CanvasTest.cpp
@@ -46,29 +46,48 @@
*/
#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"
+#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 +704,6 @@ DEF_TEST(PaintFilterCanvas_ConsistentState, reporter) {
///////////////////////////////////////////////////////////////////////////////////////////////////
-#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 1882235e30..7427187958 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 429b9e1d5d..1110fddbd2 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 e8aae38994..d6169022ff 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 854ac32dd1..a2024ff6cd 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 fb46681f0f..eeef831df1 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::ElementList ElementList;
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 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ClipMaskCache, reporter, ctxInfo) {
#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 641ed013be..0bb5212581 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 c5c65f8468..a3e16c6aa5 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 6189bdfd53..86702a1f81 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 561dddd875..f33f8ba513 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 180bf2f8da..6ba1157829 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 d8dab25a90..e83988a4b1 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.