Make header files self-sufficient
authorHal Canary <halcanary@google.com>
Tue, 7 Feb 2017 19:09:38 +0000 (14:09 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 10 Feb 2017 01:19:52 +0000 (01:19 +0000)
Change-Id: Ice7d761b1023da77e50e5d6aa597964f7d9aa1d8
Reviewed-on: https://skia-review.googlesource.com/8302
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Reed <reed@google.com>
41 files changed:
bench/gUniqueGlyphIDs.h
gm/SkAnimTimer.h
include/core/SkDrawable.h
include/core/SkLights.h
include/core/SkRSXform.h
include/core/SkRasterHandleAllocator.h
include/core/SkYUVSizeInfo.h
include/ports/SkFontMgr_android.h
include/ports/SkFontMgr_fontconfig.h
include/private/SkShadowParams.h
include/utils/SkLuaCanvas.h
src/android/SkBitmapRegionDecoderPriv.h
src/core/SkDeduper.h
src/core/SkICCPriv.h
src/core/SkImageInfoPriv.h
src/core/SkMatrixUtils.h
src/core/SkPictureContentInfo.h
src/core/SkPipe.h
src/core/SkRecordPattern.h
src/core/SkSpecialSurface.h
src/core/SkStringUtils.h
src/core/SkValidationUtils.h
src/gpu/GrAppliedClip.h
src/gpu/GrPathRenderingRenderTargetContext.h
src/gpu/ops/GrStencilPathOp.h
src/opts/SkBlurImageFilter_opts.h
src/opts/SkMorphologyImageFilter_opts.h
src/sfnt/SkTTCFHeader.h
src/sksl/ast/SkSLASTParameter.h
src/sksl/ast/SkSLASTType.h
src/sksl/ir/SkSLField.h
src/sksl/ir/SkSLFunctionReference.h
src/sksl/ir/SkSLIntLiteral.h
src/sksl/ir/SkSLInterfaceBlock.h
src/sksl/ir/SkSLPostfixExpression.h
src/sksl/ir/SkSLPrefixExpression.h
src/sksl/ir/SkSLSwizzle.h
src/sksl/ir/SkSLVarDeclarations.h
src/sksl/ir/SkSLVariableReference.h
src/utils/SkTextureCompressor_Utils.h
tests/PathOpsThreadedCommon.h

index fe1c67a..8132106 100644 (file)
@@ -5,6 +5,10 @@
  * found in the LICENSE file.
  */
 
+#ifndef gUniqueGlyphIDs_DEFINED
+#define gUniqueGlyphIDs_DEFINED
+
+#include <cstdint>
 
 /* runs of unique glyph IDs, with a 0xFFFF sentinel between different runs
  *
@@ -466,3 +470,4 @@ static const uint16_t gUniqueGlyphIDs[] = {
 1329, 2149, 2201, 2275, 2901, 3253, 3406, 3824, 9106, 9125, 9137, 9172, 12431, 0xFFFF,
 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 95, 97, 98, 105, 106, 107, 108, 109, 112, 113, 114, 116, 117, 120, 121, 122, 123, 124, 125, 126, 127, 131, 138, 139, 140, 169, 170, 171, 177, 178, 179, 180, 182, 188, 194, 198, 200, 208, 234, 240, 255, 259, 264, 429, 458, 484, 570, 571, 572, 573, 574, 575, 576, 577, 578, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 593, 594, 595, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 629, 630, 631, 632, 633, 1131, 1133, 1189, 1190, 1191, 1192, 1193, 1195, 1197, 1199, 1201, 1203, 1209, 1211, 1213, 1215, 1217, 1219, 1221, 1223, 1225, 1227, 1229, 1231, 1233, 1235, 1237, 1239, 1241, 1243, 1245, 1247, 1249, 1251, 1253, 1255, 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1273, 1275, 0xFFFF,
 0xFFFF };
+#endif  // gUniqueGlyphIDs_DEFINED
index 060de00..b7b9bbf 100644 (file)
@@ -5,6 +5,7 @@
  * found in the LICENSE file.
  */
 
+#include "SkScalar.h"
 #include "SkTime.h"
 
 #ifndef SkAnimTimer_DEFINED
index 6fec3fc..c5053a8 100644 (file)
@@ -9,6 +9,7 @@
 #define SkDrawable_DEFINED
 
 #include "SkFlattenable.h"
+#include "SkScalar.h"
 
 class SkCanvas;
 class SkMatrix;
index 954168d..d91d919 100644 (file)
 #define SkLights_DEFINED
 
 #include "../private/SkTArray.h"
+#include "SkImage.h"
 #include "SkPoint3.h"
 #include "SkRefCnt.h"
 
 class SkReadBuffer;
 class SkWriteBuffer;
-class SkImage;
 
 class SK_API SkLights  : public SkRefCnt {
 public:
index 7af6e67..dffbc59 100644 (file)
@@ -8,7 +8,8 @@
 #ifndef SkRSXform_DEFINED
 #define SkRSXform_DEFINED
 
-#include "SkScalar.h"
+#include "SkPoint.h"
+#include "SkSize.h"
 
 /**
  *  A compressed form of a rotation+scale matrix.
index 62796cb..e1cc830 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "SkImageInfo.h"
 
+class SkBitmap;
 class SkCanvas;
 class SkMatrix;
 
index 2c5a51d..19b5a8e 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SkYUVSizeInfo_DEFINED
 #define SkYUVSizeInfo_DEFINED
 
+#include "SkSize.h"
+
 struct SkYUVSizeInfo {
     enum {
         kY          = 0,
index e1a8fec..050fadd 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef SkFontMgr_android_DEFINED
 #define SkFontMgr_android_DEFINED
 
-#include "SkTypes.h"
+#include "SkRefCnt.h"
 
 class SkFontMgr;
 
index 75497cb..e0f4108 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef SkFontMgr_fontconfig_DEFINED
 #define SkFontMgr_fontconfig_DEFINED
 
-#include "SkTypes.h"
+#include "SkRefCnt.h"
 #include <fontconfig/fontconfig.h>
 
 class SkFontMgr;
index 3df0a44..65d6c06 100644 (file)
@@ -7,6 +7,8 @@
 #ifndef SkShadowParams_DEFINED
 #define SkShadowParams_DEFINED
 
+#include "SkScalar.h"
+
 /** \struct SkShadowParams
 
     This struct holds information needed for drawing shadows.
index 805c2e1..ce37413 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "SkCanvas.h"
 #include "SkString.h"
+#include "SkVertices.h"
 
 struct lua_State;
 
index baa891e..db7bd42 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SkBitmapRegionDecoderPriv_DEFINED
 #define SkBitmapRegionDecoderPriv_DEFINED
 
+#include "SkRect.h"
+
 enum SubsetType {
     kFullyInside_SubsetType,
     kPartiallyInside_SubsetType,
index f82f4fd..4ba685f 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef SkDeduper_DEFINED
 #define SkDeduper_DEFINED
 
-#include "SkTypes.h"
+#include "SkFlattenable.h"
 
 class SkImage;
 class SkPicture;
index bc8a9e9..4c656f1 100644 (file)
@@ -5,6 +5,11 @@
  * found in the LICENSE file.
  */
 
+#ifndef SkICCPriv_DEFINED
+#define SkICCPriv_DEFINED
+
+#include "SkTypes.h"
+
 // This is equal to the header size according to the ICC specification (128)
 // plus the size of the tag count (4).  We include the tag count since we
 // always require it to be present anyway.
@@ -44,3 +49,4 @@ enum ParaCurveType {
     kGABDE_ParaCurveType       = 3,
     kGABCDEF_ParaCurveType     = 4,
 };
+#endif  // SkICCPriv_DEFINED
index 81d7070..40209f8 100644 (file)
@@ -5,6 +5,11 @@
  * found in the LICENSE file.
  */
 
+#ifndef SkImageInfoPriv_DEFINED
+#define SkImageInfoPriv_DEFINED
+
+#include "SkImageInfo.h"
+
 /**
  *  Returns true if |info| contains a valid combination of width, height, colorType, alphaType,
  *  colorSpace.  Returns false otherwise.
@@ -85,3 +90,4 @@ static inline bool SkImageInfoValidConversion(const SkImageInfo& dst, const SkIm
 
     return true;
 }
+#endif  // SkImageInfoPriv_DEFINED
index 0e01fbe..c311a6c 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SkMatrixUtils_DEFINED
 #define SkMatrixUtils_DEFINED
 
+#include "SkPoint.h"
 #include "SkSize.h"
 
 class SkMatrix;
index 81c8a27..36cfa77 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SkPictureContentInfo_DEFINED
 #define SkPictureContentInfo_DEFINED
 
+#include "SkPaint.h"
 #include "SkTDArray.h"
 
 class GrContext;
index 1418387..027edfb 100644 (file)
@@ -9,16 +9,19 @@
 #define SkPipe_DEFINED
 
 #include "SkData.h"
+#include "SkImage.h"
+#include "SkPicture.h"
 
 class SkCanvas;
-class SkImage;
-class SkPicture;
-class SkTypefaceSerializer;
-class SkTypefaceDeserializer;
-class SkImageSerializer;
 class SkImageDeserializer;
+class SkImageSerializer;
+class SkTypeface;
+class SkTypefaceDeserializer;
+class SkTypefaceSerializer;
 class SkWStream;
 
+struct SkRect;
+
 class SkPipeSerializer {
 public:
     SkPipeSerializer();
index 45f4572..73fe763 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SkRecordPattern_DEFINED
 #define SkRecordPattern_DEFINED
 
+#include "SkRecord.h"
 #include "SkTLogic.h"
 
 namespace SkRecords {
index 2aa03dd..96b74a4 100644 (file)
@@ -8,13 +8,17 @@
 #ifndef SkSpecialSurface_DEFINED
 #define SkSpecialSurface_DEFINED
 
+#include "SkImageInfo.h"
 #include "SkRefCnt.h"
 #include "SkSurfaceProps.h"
 
+#if SK_SUPPORT_GPU
+#include "GrTypes.h"
+#endif
+
 class GrContext;
-struct GrSurfaceDesc;
+class SkBitmap;
 class SkCanvas;
-struct SkImageInfo;
 class SkSpecialImage;
 
 /**
index fd158c3..fecf833 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SkStringUtils_DEFINED
 #define SkStringUtils_DEFINED
 
+#include "SkScalar.h"
+
 class SkString;
 
 /**
index d71666c..5e2b91d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "SkBitmap.h"
 #include "SkBlendMode.h"
+#include "SkXfermodePriv.h"
 
 /** Returns true if coeff's value is in the SkXfermode::Coeff enum.
   */
index 27fbde0..ed75bec 100644 (file)
@@ -8,11 +8,10 @@
 #ifndef GrAppliedClip_DEFINED
 #define GrAppliedClip_DEFINED
 
+#include "GrFragmentProcessor.h"
 #include "GrScissorState.h"
 #include "GrWindowRectsState.h"
 
-class GrFragmentProcessor;
-
 /**
  * Produced by GrClip. It provides a set of modifications to the drawing state that are used to
  * create the final GrPipeline for a GrOp.
index d26f08e..420bbe8 100644 (file)
@@ -8,9 +8,7 @@
 #ifndef GrPathRenderingRenderTargetContext_DEFINED
 #define GrPathRenderingRenderTargetContext_DEFINED
 
-#include "GrRenderTargetContext.h"
-
-class GrStencilAndCoverTextContext;
+#include "text/GrStencilAndCoverTextContext.h"
 
 class GrPathRenderingRenderTargetContext : public GrRenderTargetContext {
 public:
index f21b524..462b626 100644 (file)
@@ -14,6 +14,7 @@
 #include "GrPath.h"
 #include "GrPathRendering.h"
 #include "GrRenderTarget.h"
+#include "GrStencilSettings.h"
 
 class GrStencilPathOp final : public GrOp {
 public:
index 497bcde..f953a2e 100644 (file)
@@ -9,7 +9,7 @@
 #define SkBlurImageFilter_opts_DEFINED
 
 #include "SkColorPriv.h"
-#include "SkTypes.h"
+#include "SkRect.h"
 
 #if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
     #include <immintrin.h>
index e30a9e4..0c29ff1 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SkMorphologyImageFilter_opts_DEFINED
 #define SkMorphologyImageFilter_opts_DEFINED
 
+#include "SkColor.h"
+
 namespace SK_OPTS_NS {
 
 enum MorphType { kDilate, kErode };
index 2dc77ee..71c6661 100644 (file)
@@ -9,6 +9,7 @@
 #define SkTTCFHeader_DEFINED
 
 #include "SkOTTableTypes.h"
+#include "SkSFNTHeader.h"
 
 #pragma pack(push, 1)
 
index 7b653ad..6bb13ac 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SKSL_ASTPARAMETER
 #define SKSL_ASTPARAMETER
 
+#include "SkSLASTPositionNode.h"
 #include "SkSLASTType.h"
 #include "../ir/SkSLModifiers.h"
 
index 8159400..9cbded1 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SKSL_ASTTYPE
 #define SKSL_ASTTYPE
 
+#include "SkSLASTPositionNode.h"
+
 namespace SkSL {
 
 /**
index f73b602..53d85e0 100644 (file)
@@ -12,6 +12,7 @@
 #include "SkSLPosition.h"
 #include "SkSLSymbol.h"
 #include "SkSLType.h"
+#include "SkSLVariable.h"
 
 namespace SkSL {
 
index ec1fc38..e95833d 100644 (file)
@@ -10,6 +10,7 @@
 
 #include "SkSLContext.h"
 #include "SkSLExpression.h"
+#include "SkSLFunctionDeclaration.h"
 
 namespace SkSL {
 
index 23325e6..b6a23d6 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SKSL_INTLITERAL
 #define SKSL_INTLITERAL
 
+#include "SkSLContext.h"
 #include "SkSLExpression.h"
 
 namespace SkSL {
index bc84396..0141953 100644 (file)
@@ -9,6 +9,7 @@
 #define SKSL_INTERFACEBLOCK
 
 #include "SkSLProgramElement.h"
+#include "SkSLSymbolTable.h"
 #include "SkSLVarDeclarations.h"
 
 namespace SkSL {
index 6c9fafe..05ff167 100644 (file)
@@ -9,6 +9,7 @@
 #define SKSL_POSTFIXEXPRESSION
 
 #include "SkSLExpression.h"
+#include "SkSLToken.h"
 
 namespace SkSL {
 
index b7db99a..dafe1e9 100644 (file)
@@ -9,6 +9,7 @@
 #define SKSL_PREFIXEXPRESSION
 
 #include "SkSLExpression.h"
+#include "SkSLToken.h"
 
 namespace SkSL {
 
index 8ad9001..0803f3b 100644 (file)
@@ -8,6 +8,7 @@
 #ifndef SKSL_SWIZZLE
 #define SKSL_SWIZZLE
 
+#include "SkSLContext.h"
 #include "SkSLExpression.h"
 #include "SkSLUtil.h"
 
index 490259a..5781230 100644 (file)
@@ -9,6 +9,7 @@
 #define SKSL_VARDECLARATIONS
 
 #include "SkSLExpression.h"
+#include "SkSLProgramElement.h"
 #include "SkSLStatement.h"
 #include "SkSLVariable.h"
 
index fecb04e..7d90511 100644 (file)
@@ -9,6 +9,9 @@
 #define SKSL_VARIABLEREFERENCE
 
 #include "SkSLExpression.h"
+#include "SkSLFloatLiteral.h"
+#include "SkSLIRGenerator.h"
+#include "SkSLIntLiteral.h"
 
 namespace SkSL {
 
index 9b115a2..6fb0d6b 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef SkTextureCompressorUtils_DEFINED
 #define SkTextureCompressorUtils_DEFINED
 
+#include <cstdint>
+
 namespace SkTextureCompressor {
 
     // In some compression formats used for grayscale alpha, i.e. coverage masks, three
index 6cc0c3f..1462aa2 100644 (file)
@@ -7,8 +7,10 @@
 #ifndef PathOpsThreadedCommon_DEFINED
 #define PathOpsThreadedCommon_DEFINED
 
+#include "SkBitmap.h"
 #include "SkGraphics.h"
 #include "SkPath.h"
+#include "SkPathOps.h"
 #include "SkString.h"
 #include "SkTDArray.h"