diff options
author | Hal Canary <halcanary@google.com> | 2018-06-11 21:44:01 -0400 |
---|---|---|
committer | Mike Klein <mtklein@google.com> | 2018-06-12 15:03:21 +0000 |
commit | 2a2f67592602b18527bc3fd449132d420cd5b62e (patch) | |
tree | 0f6078db2af3b904f08e8cc0118055bf1db621a5 /src | |
parent | 7c525e62d405d57ae7a7742cf607b9770a83a0ab (diff) |
SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09
Reviewed-on: https://skia-review.googlesource.com/133620
Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'src')
125 files changed, 307 insertions, 127 deletions
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp index d44258f9b0..fd95590bd1 100644 --- a/src/codec/SkJpegCodec.cpp +++ b/src/codec/SkJpegCodec.cpp @@ -14,6 +14,7 @@ #include "SkJpegInfo.h" #include "SkStream.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkTypes.h" // stdio is needed for libjpeg-turbo diff --git a/src/codec/SkWbmpCodec.cpp b/src/codec/SkWbmpCodec.cpp index b5fd591729..8d4beb12cb 100644 --- a/src/codec/SkWbmpCodec.cpp +++ b/src/codec/SkWbmpCodec.cpp @@ -5,13 +5,15 @@ * found in the LICENSE file. */ +#include "SkWbmpCodec.h" + #include "SkCodec.h" #include "SkCodecPriv.h" #include "SkColorData.h" #include "SkColorTable.h" #include "SkData.h" #include "SkStream.h" -#include "SkWbmpCodec.h" +#include "SkTo.h" // Each bit represents a pixel, so width is actually a number of bits. // A row will always be stored in bytes, so we round width up to the diff --git a/src/codec/SkWebpCodec.cpp b/src/codec/SkWebpCodec.cpp index 2f9420bd74..e26f46d074 100644 --- a/src/codec/SkWebpCodec.cpp +++ b/src/codec/SkWebpCodec.cpp @@ -5,6 +5,9 @@ * found in the LICENSE file. */ +#include "SkWebpCodec.h" + +#include "../jumper/SkJumper.h" #include "SkBitmap.h" #include "SkCanvas.h" #include "SkCodecAnimation.h" @@ -16,8 +19,7 @@ #include "SkSampler.h" #include "SkStreamPriv.h" #include "SkTemplates.h" -#include "SkWebpCodec.h" -#include "../jumper/SkJumper.h" +#include "SkTo.h" // A WebP decoder on top of (subset of) libwebp // For more information on WebP image format, and libwebp library, see: diff --git a/src/core/SkAAClip.cpp b/src/core/SkAAClip.cpp index 78c73931fe..54d6726e65 100644 --- a/src/core/SkAAClip.cpp +++ b/src/core/SkAAClip.cpp @@ -6,12 +6,14 @@ */ #include "SkAAClip.h" + #include "SkAtomics.h" #include "SkBlitter.h" #include "SkColorData.h" -#include "SkRectPriv.h" #include "SkPath.h" +#include "SkRectPriv.h" #include "SkScan.h" +#include "SkTo.h" #include "SkUtils.h" class AutoAAClipValidate { diff --git a/src/core/SkAlphaRuns.cpp b/src/core/SkAlphaRuns.cpp index 37f57c1fa8..c5c4d15834 100644 --- a/src/core/SkAlphaRuns.cpp +++ b/src/core/SkAlphaRuns.cpp @@ -5,8 +5,8 @@ * found in the LICENSE file. */ - #include "SkAntiRun.h" +#include "SkTo.h" #include "SkUtils.h" void SkAlphaRuns::reset(int width) { diff --git a/src/core/SkAnalyticEdge.cpp b/src/core/SkAnalyticEdge.cpp index e2da09023d..60c956aaf8 100644 --- a/src/core/SkAnalyticEdge.cpp +++ b/src/core/SkAnalyticEdge.cpp @@ -5,10 +5,11 @@ * found in the LICENSE file. */ - #include "SkAnalyticEdge.h" + #include "SkFDot6.h" #include "SkMathPriv.h" +#include "SkTo.h" // This will become a bottleneck for small ovals rendering if we call SkFixedDiv twice here. // Therefore, we'll let the outter function compute the slope once and send in the value. diff --git a/src/core/SkAnalyticEdge.h b/src/core/SkAnalyticEdge.h index 5e8403f5ec..b18ccac918 100644 --- a/src/core/SkAnalyticEdge.h +++ b/src/core/SkAnalyticEdge.h @@ -9,6 +9,7 @@ #define SkAnalyticEdge_DEFINED #include "SkEdge.h" +#include "SkTo.h" struct SkAnalyticEdge { // Similar to SkEdge, the conic edges will be converted to quadratic edges diff --git a/src/core/SkAntiRun.h b/src/core/SkAntiRun.h index 8b19036d6c..92aabff0cd 100644 --- a/src/core/SkAntiRun.h +++ b/src/core/SkAntiRun.h @@ -5,11 +5,11 @@ * found in the LICENSE file. */ - #ifndef SkAntiRun_DEFINED #define SkAntiRun_DEFINED #include "SkBlitter.h" +#include "SkTo.h" /** Sparse array of run-length-encoded alpha (supersampling coverage) values. Sparseness allows us to independently compose several paths into the diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp index 29a1a56aae..14bbe76eed 100644 --- a/src/core/SkBitmap.cpp +++ b/src/core/SkBitmap.cpp @@ -5,8 +5,9 @@ * found in the LICENSE file. */ -#include "SkAtomics.h" #include "SkBitmap.h" + +#include "SkAtomics.h" #include "SkColorData.h" #include "SkConvertPixels.h" #include "SkData.h" @@ -23,6 +24,7 @@ #include "SkRect.h" #include "SkScalar.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkUnPreMultiply.h" #include "SkWriteBuffer.h" #include "SkWritePixelsRec.h" diff --git a/src/core/SkBitmapProcState_matrixProcs.cpp b/src/core/SkBitmapProcState_matrixProcs.cpp index f9e3c82a00..2fd1b9b1b5 100644 --- a/src/core/SkBitmapProcState_matrixProcs.cpp +++ b/src/core/SkBitmapProcState_matrixProcs.cpp @@ -14,10 +14,11 @@ */ #include "SkBitmapProcState.h" +#include "SkBitmapProcState_utils.h" #include "SkShader.h" +#include "SkTo.h" #include "SkUtils.h" #include "SkUtilsArm.h" -#include "SkBitmapProcState_utils.h" /* returns 0...(n-1) given any x (positive or negative). diff --git a/src/core/SkBitmapProcState_utils.h b/src/core/SkBitmapProcState_utils.h index ec35ca108d..b40b45c4e6 100644 --- a/src/core/SkBitmapProcState_utils.h +++ b/src/core/SkBitmapProcState_utils.h @@ -8,6 +8,8 @@ #ifndef SkBitmapProcState_utils_DEFINED #define SkBitmapProcState_utils_DEFINED +#include "SkTo.h" + // Helper to ensure that when we shift down, we do it w/o sign-extension // so the caller doesn't have to manually mask off the top 16 bits // diff --git a/src/core/SkBlitter.cpp b/src/core/SkBlitter.cpp index ee6100ad40..7a45981b80 100644 --- a/src/core/SkBlitter.cpp +++ b/src/core/SkBlitter.cpp @@ -5,21 +5,23 @@ * found in the LICENSE file. */ -#include "SkArenaAlloc.h" #include "SkBlitter.h" + #include "SkAntiRun.h" +#include "SkArenaAlloc.h" #include "SkColor.h" #include "SkColorFilter.h" -#include "SkReadBuffer.h" -#include "SkWriteBuffer.h" #include "SkMask.h" #include "SkMaskFilterBase.h" #include "SkPaintPriv.h" +#include "SkReadBuffer.h" #include "SkRegionPriv.h" #include "SkShaderBase.h" #include "SkString.h" #include "SkTLazy.h" +#include "SkTo.h" #include "SkUtils.h" +#include "SkWriteBuffer.h" #include "SkXfermodeInterpretation.h" SkBlitter::~SkBlitter() {} diff --git a/src/core/SkBlitter.h b/src/core/SkBlitter.h index cf3edd31eb..fc3bf8bce6 100644 --- a/src/core/SkBlitter.h +++ b/src/core/SkBlitter.h @@ -15,6 +15,7 @@ #include "SkRect.h" #include "SkRegion.h" #include "SkShaderBase.h" +#include "SkTo.h" class SkArenaAlloc; class SkMatrix; diff --git a/src/core/SkBlurMask.cpp b/src/core/SkBlurMask.cpp index 4b8293c584..b36bc0c61e 100644 --- a/src/core/SkBlurMask.cpp +++ b/src/core/SkBlurMask.cpp @@ -5,15 +5,15 @@ * found in the LICENSE file. */ - #include "SkBlurMask.h" + +#include "SkTo.h" #include "SkColorPriv.h" #include "SkMaskBlurFilter.h" #include "SkMath.h" #include "SkTemplates.h" #include "SkEndian.h" - // This constant approximates the scaling done in the software path's // "high quality" mode, in SkBlurMask::Blur() (1 / sqrt(3)). // IMHO, it actually should be 1: we blur "less" than we should do diff --git a/src/core/SkBuffer.h b/src/core/SkBuffer.h index 7dfe2bb65e..0338e7601e 100644 --- a/src/core/SkBuffer.h +++ b/src/core/SkBuffer.h @@ -5,10 +5,11 @@ * found in the LICENSE file. */ - #ifndef SkBuffer_DEFINED #define SkBuffer_DEFINED +#include <limits> + #include "SkSafeMath.h" #include "SkScalar.h" #include "SkTypes.h" diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 8494bdb753..494bd3b837 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -5,53 +5,55 @@ * found in the LICENSE file. */ +#include "SkCanvas.h" + #include "SkArenaAlloc.h" #include "SkBitmapDevice.h" -#include "SkCanvas.h" #include "SkCanvasPriv.h" +#include "SkClipOpPriv.h" #include "SkClipStack.h" #include "SkColorFilter.h" #include "SkDraw.h" -#include "SkDrawable.h" #include "SkDrawFilter.h" #include "SkDrawLooper.h" +#include "SkDrawable.h" #include "SkGlyphCache.h" #include "SkGlyphRun.h" #include "SkImage.h" -#include "SkImage_Base.h" #include "SkImageFilter.h" #include "SkImageFilterCache.h" +#include "SkImage_Base.h" #include "SkLatticeIter.h" +#include "SkMSAN.h" #include "SkMakeUnique.h" #include "SkMatrixUtils.h" #include "SkMetaData.h" -#include "SkMSAN.h" #include "SkNoDrawCanvas.h" #include "SkNx.h" #include "SkPaintPriv.h" #include "SkPatchUtils.h" #include "SkPathEffect.h" #include "SkPicture.h" +#include "SkRRect.h" #include "SkRasterClip.h" #include "SkRasterHandleAllocator.h" -#include "SkRRect.h" #include "SkSpecialImage.h" #include "SkStrikeCache.h" #include "SkString.h" #include "SkSurface_Base.h" +#include "SkTLazy.h" #include "SkTextBlob.h" #include "SkTextFormatParams.h" -#include "SkTLazy.h" +#include "SkTo.h" #include "SkTraceEvent.h" +#include "SkVertices.h" + #include <new> #if SK_SUPPORT_GPU #include "GrContext.h" #include "SkGr.h" - #endif -#include "SkClipOpPriv.h" -#include "SkVertices.h" #define RETURN_ON_NULL(ptr) do { if (nullptr == (ptr)) return; } while (0) #define RETURN_ON_FALSE(pred) do { if (!(pred)) return; } while (0) diff --git a/src/core/SkColorData.h b/src/core/SkColorData.h index 3fc0113105..3e61c18ae3 100644 --- a/src/core/SkColorData.h +++ b/src/core/SkColorData.h @@ -15,6 +15,7 @@ #include "SkColor.h" #include "SkColorPriv.h" +#include "SkTo.h" ////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h index 83532d1d06..4bae7be8f6 100644 --- a/src/core/SkDescriptor.h +++ b/src/core/SkDescriptor.h @@ -10,7 +10,9 @@ #define SkDescriptor_DEFINED #include "SkOpts.h" +#include "SkTo.h" #include "SkTypes.h" + #include <memory> #include <new> diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp index aa9b1e2c34..aea08c55ab 100644 --- a/src/core/SkDevice.cpp +++ b/src/core/SkDevice.cpp @@ -6,6 +6,7 @@ */ #include "SkDevice.h" + #include "SkColorFilter.h" #include "SkDraw.h" #include "SkDrawFilter.h" @@ -28,6 +29,7 @@ #include "SkTLazy.h" #include "SkTextBlobRunIterator.h" #include "SkTextToPathIter.h" +#include "SkTo.h" #include "SkUtils.h" #include "SkVertices.h" diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp index e975ea2a4b..14c1063668 100644 --- a/src/core/SkDraw.cpp +++ b/src/core/SkDraw.cpp @@ -5,7 +5,7 @@ * found in the LICENSE file. */ -#define __STDC_LIMIT_MACROS +#include "SkDraw.h" #include "SkArenaAlloc.h" #include "SkAutoBlitterChoose.h" @@ -14,7 +14,6 @@ #include "SkCanvas.h" #include "SkColorData.h" #include "SkDevice.h" -#include "SkDraw.h" #include "SkDrawProcs.h" #include "SkFindAndPlaceGlyph.h" #include "SkMaskFilterBase.h" @@ -23,19 +22,20 @@ #include "SkPaint.h" #include "SkPathEffect.h" #include "SkPathPriv.h" +#include "SkRRect.h" #include "SkRasterClip.h" #include "SkRectPriv.h" -#include "SkRRect.h" #include "SkScalerContext.h" #include "SkScan.h" #include "SkShader.h" #include "SkString.h" #include "SkStroke.h" #include "SkStrokeRec.h" +#include "SkTLazy.h" #include "SkTemplates.h" #include "SkTextMapStateProc.h" #include "SkThreadedBMPDevice.h" -#include "SkTLazy.h" +#include "SkTo.h" #include "SkUtils.h" static SkPaint make_paint_with_image( diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp index 1bb8e9e0d4..0a19e53221 100644 --- a/src/core/SkEdge.cpp +++ b/src/core/SkEdge.cpp @@ -5,10 +5,11 @@ * found in the LICENSE file. */ - #include "SkEdge.h" + #include "SkFDot6.h" #include "SkMathPriv.h" +#include "SkTo.h" /* In setLine, setQuadratic, setCubic, the first thing we do is to convert diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h index 509c0c448a..7fc685136a 100644 --- a/src/core/SkEdge.h +++ b/src/core/SkEdge.h @@ -5,13 +5,13 @@ * found in the LICENSE file. */ - #ifndef SkEdge_DEFINED #define SkEdge_DEFINED -#include "SkRect.h" #include "SkFDot6.h" #include "SkMath.h" +#include "SkRect.h" +#include "SkTo.h" // This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary #define SkEdge_Compute_DY(top, y0) (SkLeftShift(top, 6) + 32 - (y0)) diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp index b7d80b047c..48c1bca5ac 100644 --- a/src/core/SkEdgeBuilder.cpp +++ b/src/core/SkEdgeBuilder.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 "SkEdgeBuilder.h" -#include "SkEdge.h" + #include "SkAnalyticEdge.h" +#include "SkEdge.h" #include "SkEdgeClipper.h" -#include "SkLineClipper.h" #include "SkGeometry.h" +#include "SkLineClipper.h" #include "SkPath.h" #include "SkPathPriv.h" +#include "SkTo.h" /////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkFDot6.h b/src/core/SkFDot6.h index 004666115e..57e7d6a924 100644 --- a/src/core/SkFDot6.h +++ b/src/core/SkFDot6.h @@ -5,13 +5,13 @@ * found in the LICENSE file. */ - #ifndef SkFDot6_DEFINED #define SkFDot6_DEFINED #include "SkFixed.h" -#include "SkScalar.h" #include "SkMath.h" +#include "SkScalar.h" +#include "SkTo.h" typedef int32_t SkFDot6; diff --git a/src/core/SkFont.cpp b/src/core/SkFont.cpp index 77259ff50c..bde8c4c80b 100644 --- a/src/core/SkFont.cpp +++ b/src/core/SkFont.cpp @@ -6,6 +6,8 @@ */ #include "SkFont.h" + +#include "SkTo.h" #include "SkTypeface.h" #include "SkUtils.h" diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h index 2381c3e9bc..748b87fab3 100644 --- a/src/core/SkGlyph.h +++ b/src/core/SkGlyph.h @@ -12,6 +12,7 @@ #include "SkChecksum.h" #include "SkFixed.h" #include "SkMask.h" +#include "SkTo.h" #include "SkTypes.h" class SkPath; diff --git a/src/core/SkGlyphRun.cpp b/src/core/SkGlyphRun.cpp index 6209b58c69..caea07a076 100644 --- a/src/core/SkGlyphRun.cpp +++ b/src/core/SkGlyphRun.cpp @@ -14,11 +14,12 @@ #include "SkDevice.h" #include "SkDraw.h" #include "SkGlyphCache.h" -#include "SkMakeUnique.h" #include "SkMSAN.h" +#include "SkMakeUnique.h" #include "SkPaint.h" #include "SkPaintPriv.h" #include "SkStrikeCache.h" +#include "SkTo.h" #include "SkUtils.h" static SkTypeface::Encoding convert_encoding(SkPaint::TextEncoding encoding) { diff --git a/src/core/SkIPoint16.h b/src/core/SkIPoint16.h index 27052b3f2a..735f1670cb 100644 --- a/src/core/SkIPoint16.h +++ b/src/core/SkIPoint16.h @@ -8,6 +8,7 @@ #ifndef SkIPoint16_DEFINED #define SkIPoint16_DEFINED +#include "SkTo.h" #include "SkTypes.h" /** \struct SkIPoint16 diff --git a/src/core/SkLineClipper.cpp b/src/core/SkLineClipper.cpp index 62da6d0bf4..73a18192c9 100644 --- a/src/core/SkLineClipper.cpp +++ b/src/core/SkLineClipper.cpp @@ -6,6 +6,7 @@ */ #include "SkLineClipper.h" +#include "SkTo.h" template <typename T> T pin_unsorted(T value, T limit0, T limit1) { if (limit1 < limit0) { diff --git a/src/core/SkMD5.h b/src/core/SkMD5.h index 8838d47ac0..5ae14e10c3 100644 --- a/src/core/SkMD5.h +++ b/src/core/SkMD5.h @@ -9,6 +9,7 @@ #define SkMD5_DEFINED #include "SkStream.h" +#include "SkTo.h" /* Calculate a 128-bit MD5 message-digest of the bytes sent to this stream. */ class SkMD5 : public SkWStream { diff --git a/src/core/SkMask.cpp b/src/core/SkMask.cpp index b3a6543706..7336116f93 100644 --- a/src/core/SkMask.cpp +++ b/src/core/SkMask.cpp @@ -6,8 +6,10 @@ */ #include "SkMask.h" + #include "SkMalloc.h" #include "SkSafeMath.h" +#include "SkTo.h" /** returns the product if it is positive and fits in 31 bits. Otherwise this returns 0. diff --git a/src/core/SkMaskBlurFilter.cpp b/src/core/SkMaskBlurFilter.cpp index ea3d8ab572..2c8cda5c97 100644 --- a/src/core/SkMaskBlurFilter.cpp +++ b/src/core/SkMaskBlurFilter.cpp @@ -5,13 +5,15 @@ * found in the LICENSE file. */ +#include "SkMaskBlurFilter.h" + #include "SkArenaAlloc.h" #include "SkColorPriv.h" #include "SkGaussFilter.h" #include "SkMalloc.h" -#include "SkMaskBlurFilter.h" #include "SkNx.h" #include "SkTemplates.h" +#include "SkTo.h" #include <cmath> #include <climits> diff --git a/src/core/SkMaskGamma.cpp b/src/core/SkMaskGamma.cpp index bbe72c4e35..e231d92d4b 100644 --- a/src/core/SkMaskGamma.cpp +++ b/src/core/SkMaskGamma.cpp @@ -5,11 +5,12 @@ * found in the LICENSE file. */ -#include "SkTypes.h" +#include "SkMaskGamma.h" #include "SkColor.h" #include "SkFloatingPoint.h" -#include "SkMaskGamma.h" +#include "SkTo.h" +#include "SkTypes.h" class SkLinearColorSpaceLuminance : public SkColorSpaceLuminance { SkScalar toLuma(SkScalar SkDEBUGCODE(gamma), SkScalar luminance) const override { diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index d3bdb38b78..cb4b792a6b 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -5,6 +5,8 @@ * found in the LICENSE file. */ +#include "SkMatrix.h" + #include "SkFloatBits.h" #include "SkMathPriv.h" #include "SkMatrixPriv.h" @@ -13,6 +15,7 @@ #include "SkPoint3.h" #include "SkRSXform.h" #include "SkString.h" +#include "SkTo.h" #include <stddef.h> static void normalize_perspective(SkScalar mat[9]) { diff --git a/src/core/SkMetaData.cpp b/src/core/SkMetaData.cpp index d1564e9fec..e960321700 100644 --- a/src/core/SkMetaData.cpp +++ b/src/core/SkMetaData.cpp @@ -5,11 +5,11 @@ * found in the LICENSE file. */ - #include "SkMetaData.h" #include "SkMalloc.h" #include "SkRefCnt.h" +#include "SkTo.h" struct PtrPair { void* fPtr; diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index edb800f264..f5696824b6 100644 --- a/src/core/SkMipMap.cpp +++ b/src/core/SkMipMap.cpp @@ -6,6 +6,7 @@ */ #include "SkMipMap.h" + #include "SkBitmap.h" #include "SkColorData.h" #include "SkHalf.h" @@ -14,6 +15,7 @@ #include "SkNx.h" #include "SkPM4fPriv.h" #include "SkSRGB.h" +#include "SkTo.h" #include "SkTypes.h" #include <new> diff --git a/src/core/SkNx.h b/src/core/SkNx.h index 953654063a..1636dde774 100644 --- a/src/core/SkNx.h +++ b/src/core/SkNx.h @@ -11,6 +11,8 @@ #include "SkSafe_math.h" #include "SkScalar.h" #include "SkTypes.h" + +#include <algorithm> #include <limits> #include <type_traits> diff --git a/src/core/SkOverdrawCanvas.cpp b/src/core/SkOverdrawCanvas.cpp index e5bf5a6325..25bc7fb160 100644 --- a/src/core/SkOverdrawCanvas.cpp +++ b/src/core/SkOverdrawCanvas.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ +#include "SkOverdrawCanvas.h" + #include "SkColorFilter.h" -#include "SkDrawable.h" #include "SkDrawShadowInfo.h" +#include "SkDrawable.h" #include "SkFindAndPlaceGlyph.h" #include "SkImagePriv.h" #include "SkLatticeIter.h" -#include "SkOverdrawCanvas.h" #include "SkPatchUtils.h" #include "SkPath.h" #include "SkRRect.h" @@ -19,6 +20,7 @@ #include "SkStrikeCache.h" #include "SkTextBlob.h" #include "SkTextBlobRunIterator.h" +#include "SkTo.h" namespace { class ProcessOneGlyphBounds { diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp index c76b98121e..7643bab737 100644 --- a/src/core/SkPaint.cpp +++ b/src/core/SkPaint.cpp @@ -6,22 +6,22 @@ */ #include "SkPaint.h" -#include "SkPaintPriv.h" + #include "SkColorFilter.h" #include "SkData.h" #include "SkDraw.h" #include "SkFontDescriptor.h" -#include "SkGraphics.h" #include "SkGlyphCache.h" +#include "SkGraphics.h" #include "SkImageFilter.h" #include "SkMaskFilter.h" #include "SkMaskGamma.h" #include "SkMutex.h" -#include "SkReadBuffer.h" -#include "SkWriteBuffer.h" #include "SkOpts.h" #include "SkPaintDefaults.h" +#include "SkPaintPriv.h" #include "SkPathEffect.h" +#include "SkReadBuffer.h" #include "SkSafeRange.h" #include "SkScalar.h" #include "SkScalerContext.h" @@ -31,12 +31,14 @@ #include "SkStroke.h" #include "SkStrokeRec.h" #include "SkSurfacePriv.h" +#include "SkTLazy.h" #include "SkTextBlob.h" #include "SkTextBlobRunIterator.h" #include "SkTextFormatParams.h" #include "SkTextToPathIter.h" -#include "SkTLazy.h" +#include "SkTo.h" #include "SkTypeface.h" +#include "SkWriteBuffer.h" static inline uint32_t set_clear_mask(uint32_t bits, bool cond, uint32_t mask) { return cond ? bits | mask : bits & ~mask; diff --git a/src/core/SkPath.cpp b/src/core/SkPath.cpp index 510efd6d9d..cabc116ea1 100644 --- a/src/core/SkPath.cpp +++ b/src/core/SkPath.cpp @@ -5,7 +5,8 @@ * found in the LICENSE file. */ -#include <cmath> +#include "SkPath.h" + #include "SkBuffer.h" #include "SkCubicClipper.h" #include "SkData.h" @@ -17,6 +18,9 @@ #include "SkPointPriv.h" #include "SkRRect.h" #include "SkSafeMath.h" +#include "SkTo.h" + +#include <cmath> static float poly_eval(float A, float B, float C, float t) { return (A * t + B) * t + C; diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp index 58782df260..20d3131607 100644 --- a/src/core/SkPathRef.cpp +++ b/src/core/SkPathRef.cpp @@ -5,13 +5,15 @@ * found in the LICENSE file. */ +#include "SkPathRef.h" + #include "SkBuffer.h" #include "SkNx.h" #include "SkOnce.h" #include "SkPath.h" -#include "SkPathRef.h" #include "SkPathPriv.h" #include "SkSafeMath.h" +#include "SkTo.h" // Conic weights must be 0 < weight <= finite static bool validate_conic_weights(const SkScalar weights[], int count) { diff --git a/src/core/SkPath_serial.cpp b/src/core/SkPath_serial.cpp index e538a462db..6a372e6dcd 100644 --- a/src/core/SkPath_serial.cpp +++ b/src/core/SkPath_serial.cpp @@ -5,7 +5,6 @@ * found in the LICENSE file. */ -#include <cmath> #include "SkBuffer.h" #include "SkData.h" #include "SkMath.h" @@ -13,6 +12,9 @@ #include "SkPathRef.h" #include "SkRRect.h" #include "SkSafeMath.h" +#include "SkTo.h" + +#include <cmath> enum SerializationOffsets { kType_SerializationShift = 28, // requires 4 bits diff --git a/src/core/SkPicture.cpp b/src/core/SkPicture.cpp index 34fa558ef5..ad83031546 100644 --- a/src/core/SkPicture.cpp +++ b/src/core/SkPicture.cpp @@ -5,6 +5,8 @@ * found in the LICENSE file. */ +#include "SkPicture.h" + #include "SkAtomics.h" #include "SkImageGenerator.h" #include "SkMathPriv.h" @@ -15,6 +17,7 @@ #include "SkPictureRecord.h" #include "SkPictureRecorder.h" #include "SkSerialProcs.h" +#include "SkTo.h" // When we read/write the SkPictInfo via a stream, we have a sentinel byte right after the info. // Note: in the read/write buffer versions, we have a slightly different convention: diff --git a/src/core/SkPictureData.cpp b/src/core/SkPictureData.cpp index 3d34b27bf6..bd2be63621 100644 --- a/src/core/SkPictureData.cpp +++ b/src/core/SkPictureData.cpp @@ -5,18 +5,20 @@ * found in the LICENSE file. */ -#include <new> +#include "SkPictureData.h" #include "SkAutoMalloc.h" #include "SkImageGenerator.h" #include "SkMakeUnique.h" -#include "SkPictureData.h" #include "SkPictureRecord.h" #include "SkPicturePriv.h" #include "SkReadBuffer.h" #include "SkTextBlob.h" #include "SkTypeface.h" #include "SkWriteBuffer.h" +#include "SkTo.h" + +#include <new> #if SK_SUPPORT_GPU #include "GrContext.h" diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp index 32748c109c..87c8c4d2fb 100644 --- a/src/core/SkPictureRecord.cpp +++ b/src/core/SkPictureRecord.cpp @@ -6,7 +6,9 @@ */ #include "SkPictureRecord.h" + #include "SkCanvasPriv.h" +#include "SkClipOpPriv.h" #include "SkDrawShadowInfo.h" #include "SkImage_Base.h" #include "SkMatrixPriv.h" @@ -14,9 +16,9 @@ #include "SkPixelRef.h" #include "SkRRect.h" #include "SkRSXform.h" -#include "SkTextBlob.h" #include "SkTSearch.h" -#include "SkClipOpPriv.h" +#include "SkTextBlob.h" +#include "SkTo.h" #define HEAP_BLOCK_SIZE 4096 diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h index 9490f533ef..ad2dbdfd24 100644 --- a/src/core/SkPictureRecord.h +++ b/src/core/SkPictureRecord.h @@ -16,6 +16,7 @@ #include "SkTArray.h" #include "SkTDArray.h" #include "SkTHash.h" +#include "SkTo.h" #include "SkVertices.h" #include "SkWriter32.h" diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp index 446f25b2f2..aad9e34222 100644 --- a/src/core/SkPixmap.cpp +++ b/src/core/SkPixmap.cpp @@ -5,14 +5,16 @@ * found in the LICENSE file. */ +#include "SkPixmap.h" + #include "SkBitmap.h" #include "SkCanvas.h" #include "SkColorData.h" #include "SkConvertPixels.h" #include "SkData.h" +#include "SkHalf.h" #include "SkImageInfoPriv.h" #include "SkImageShader.h" -#include "SkHalf.h" #include "SkMask.h" #include "SkNx.h" #include "SkPM4f.h" @@ -20,6 +22,7 @@ #include "SkReadPixelsRec.h" #include "SkSurface.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkUnPreMultiply.h" #include "SkUtils.h" diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp index ef33f91cc5..69e4a2ec73 100644 --- a/src/core/SkRWBuffer.cpp +++ b/src/core/SkRWBuffer.cpp @@ -8,9 +8,10 @@ #include "SkRWBuffer.h" #include "SkAtomics.h" -#include "SkMalloc.h" #include "SkMakeUnique.h" +#include "SkMalloc.h" #include "SkStream.h" +#include "SkTo.h" #include <atomic> #include <new> diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp index aa6b6e94c2..8b37bef24f 100644 --- a/src/core/SkRasterPipelineBlitter.cpp +++ b/src/core/SkRasterPipelineBlitter.cpp @@ -5,9 +5,10 @@ * found in the LICENSE file. */ +#include "../jumper/SkJumper.h" #include "SkArenaAlloc.h" -#include "SkBlitter.h" #include "SkBlendModePriv.h" +#include "SkBlitter.h" #include "SkColor.h" #include "SkColorFilter.h" #include "SkColorSpaceXformer.h" @@ -17,8 +18,8 @@ #include "SkRasterPipeline.h" #include "SkShader.h" #include "SkShaderBase.h" +#include "SkTo.h" #include "SkUtils.h" -#include "../jumper/SkJumper.h" class SkRasterPipelineBlitter final : public SkBlitter { public: diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index 7d8a849518..65dcd7bb4b 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -5,13 +5,16 @@ * found in the LICENSE file. */ +#include "SkRecorder.h" + #include "SkBigPicture.h" #include "SkCanvasPriv.h" #include "SkImage.h" #include "SkPatchUtils.h" #include "SkPicture.h" -#include "SkRecorder.h" #include "SkSurface.h" +#include "SkTo.h" + #include <new> SkDrawableList::~SkDrawableList() { diff --git a/src/core/SkRegion.cpp b/src/core/SkRegion.cpp index a7e04fc8c4..6ae8e5b5f9 100644 --- a/src/core/SkRegion.cpp +++ b/src/core/SkRegion.cpp @@ -5,11 +5,13 @@ * found in the LICENSE file. */ +#include "SkRegion.h" #include "SkAtomics.h" #include "SkRegionPriv.h" #include "SkSafeMath.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkUtils.h" /* Region Layout diff --git a/src/core/SkRegionPriv.h b/src/core/SkRegionPriv.h index 08db564174..e0e46b2c1d 100644 --- a/src/core/SkRegionPriv.h +++ b/src/core/SkRegionPriv.h @@ -5,7 +5,6 @@ * found in the LICENSE file. */ - #ifndef SkRegionPriv_DEFINED #define SkRegionPriv_DEFINED @@ -13,6 +12,7 @@ #include "SkAtomics.h" #include "SkMalloc.h" +#include "SkTo.h" inline bool SkRegionValueIsSentinel(int32_t value) { return value == (int32_t)SkRegion::kRunTypeSentinel; diff --git a/src/core/SkRegion_path.cpp b/src/core/SkRegion_path.cpp index 4fb6826f95..e54e251fa9 100644 --- a/src/core/SkRegion_path.cpp +++ b/src/core/SkRegion_path.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ -#include "SkRegionPriv.h" #include "SkBlitter.h" +#include "SkPath.h" +#include "SkRegionPriv.h" #include "SkSafeMath.h" #include "SkScan.h" -#include "SkTSort.h" #include "SkTDArray.h" -#include "SkPath.h" +#include "SkTSort.h" +#include "SkTo.h" // The rgnbuilder caller *seems* to pass short counts, possible often seens early failure, so // we may not want to promote this to a "std" routine just yet. diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp index 5928b48b07..0e8ceb1947 100644 --- a/src/core/SkResourceCache.cpp +++ b/src/core/SkResourceCache.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ +#include "SkResourceCache.h" + #include "SkDiscardableMemory.h" #include "SkMessageBus.h" #include "SkMipMap.h" #include "SkMutex.h" #include "SkOpts.h" -#include "SkResourceCache.h" +#include "SkTo.h" #include "SkTraceMemoryDump.h" #include <stddef.h> diff --git a/src/core/SkSafeMath.h b/src/core/SkSafeMath.h index f54be32fce..c092272175 100644 --- a/src/core/SkSafeMath.h +++ b/src/core/SkSafeMath.h @@ -8,6 +8,7 @@ #ifndef SkSafeMath_DEFINED #define SkSafeMath_DEFINED +#include "SkTFitsIn.h" #include "SkTypes.h" #include <limits> diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index b4a356556b..3089ee9755 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -29,6 +29,7 @@ #include "SkStrokeRec.h" #include "SkSurfacePriv.h" #include "SkTextFormatParams.h" +#include "SkTo.h" #include "SkWriteBuffer.h" #include <new> diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index 5e7f232ff7..bd649e7aef 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -20,6 +20,7 @@ #include "SkScanPriv.h" #include "SkTSort.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkUtils.h" /////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkScan_AntiPath.cpp b/src/core/SkScan_AntiPath.cpp index 45bc2e2ea6..9c64f32496 100644 --- a/src/core/SkScan_AntiPath.cpp +++ b/src/core/SkScan_AntiPath.cpp @@ -5,15 +5,16 @@ * found in the LICENSE file. */ - #include "SkScanPriv.h" + +#include "SkAntiRun.h" +#include "SkBlitter.h" +#include "SkCoverageDelta.h" +#include "SkMatrix.h" #include "SkPath.h" #include "SkPathPriv.h" -#include "SkMatrix.h" -#include "SkBlitter.h" #include "SkRegion.h" -#include "SkAntiRun.h" -#include "SkCoverageDelta.h" +#include "SkTo.h" #define SHIFT SK_SUPERSAMPLE_SHIFT #define SCALE (1 << SHIFT) diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp index a552253ffa..37faed4850 100644 --- a/src/core/SkScan_Antihair.cpp +++ b/src/core/SkScan_Antihair.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ - #include "SkScan.h" + #include "SkBlitter.h" #include "SkColorData.h" +#include "SkFDot6.h" #include "SkLineClipper.h" #include "SkRasterClip.h" -#include "SkFDot6.h" +#include "SkTo.h" /* Our attempt to compute the worst case "bounds" for the horizontal and vertical cases has some numerical bug in it, and we sometimes undervalue diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp index 57fd7f5d02..f8f43502bb 100644 --- a/src/core/SkStream.cpp +++ b/src/core/SkStream.cpp @@ -6,15 +6,17 @@ */ #include "SkStream.h" -#include "SkStreamPriv.h" + #include "SkData.h" #include "SkFixed.h" #include "SkMakeUnique.h" +#include "SkOSFile.h" #include "SkSafeMath.h" +#include "SkStreamPriv.h" #include "SkString.h" -#include "SkOSFile.h" -#include "SkTypes.h" #include "SkTFitsIn.h" +#include "SkTo.h" +#include "SkTypes.h" #include <limits> diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index a6d9335318..7820f1d5bf 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -5,10 +5,13 @@ * found in the LICENSE file. */ +#include "SkString.h" + #include "SkAtomics.h" #include "SkSafeMath.h" -#include "SkString.h" +#include "SkTo.h" #include "SkUtils.h" + #include <cstdio> #include <new> #include <stdarg.h> diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp index 4568dc1610..f08ea2b211 100644 --- a/src/core/SkStroke.cpp +++ b/src/core/SkStroke.cpp @@ -6,9 +6,11 @@ */ #include "SkStrokerPriv.h" + #include "SkGeometry.h" #include "SkPathPriv.h" #include "SkPointPriv.h" +#include "SkTo.h" enum { kTangent_RecursiveLimit, diff --git a/src/core/SkStroke.h b/src/core/SkStroke.h index f93efdee0f..09783b73d9 100644 --- a/src/core/SkStroke.h +++ b/src/core/SkStroke.h @@ -8,10 +8,11 @@ #ifndef SkStroke_DEFINED #define SkStroke_DEFINED +#include "SkPaint.h" #include "SkPath.h" #include "SkPoint.h" -#include "SkPaint.h" #include "SkStrokerPriv.h" +#include "SkTo.h" #ifdef SK_DEBUG extern bool gDebugStrokerErrorSet; diff --git a/src/core/SkTSort.h b/src/core/SkTSort.h index e76f5c93f7..a97baf9446 100644 --- a/src/core/SkTSort.h +++ b/src/core/SkTSort.h @@ -5,12 +5,12 @@ * found in the LICENSE file. */ - #ifndef SkTSort_DEFINED #define SkTSort_DEFINED -#include "SkTypes.h" #include "SkMathPriv.h" +#include "SkTo.h" +#include "SkTypes.h" /* A comparison functor which performs the comparison 'a < b'. */ template <typename T> struct SkTCompareLT { diff --git a/src/core/SkTime.cpp b/src/core/SkTime.cpp index 7988925bb3..b70b89c2dd 100644 --- a/src/core/SkTime.cpp +++ b/src/core/SkTime.cpp @@ -5,10 +5,13 @@ * found in the LICENSE file. */ +#include "SkTime.h" + #include "SkLeanWindows.h" #include "SkString.h" -#include "SkTime.h" +#include "SkTo.h" #include "SkTypes.h" + #include <chrono> void SkTime::DateTime::toISO8601(SkString* dst) const { diff --git a/src/core/SkUtils.cpp b/src/core/SkUtils.cpp index 0b92510bb0..e6fafa0b07 100644 --- a/src/core/SkUtils.cpp +++ b/src/core/SkUtils.cpp @@ -5,9 +5,10 @@ * found in the LICENSE file. */ - #include "SkUtils.h" +#include "SkTo.h" + /* 0xxxxxxx 1 total 10xxxxxx // never a leading byte 110xxxxx 2 total @@ -413,4 +414,4 @@ int SkUTFN_CountUnichars( const char SkHexadecimalDigits::gUpper[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; const char SkHexadecimalDigits::gLower[16] = - { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
\ No newline at end of file + { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; diff --git a/src/core/SkVertices.cpp b/src/core/SkVertices.cpp index e23d65f7a9..4aa56c8e43 100644 --- a/src/core/SkVertices.cpp +++ b/src/core/SkVertices.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ -#include "SkAtomics.h" #include "SkVertices.h" + +#include "SkAtomics.h" #include "SkData.h" #include "SkReader32.h" #include "SkSafeMath.h" #include "SkSafeRange.h" +#include "SkTo.h" #include "SkWriter32.h" #include <new> diff --git a/src/core/SkWriteBuffer.cpp b/src/core/SkWriteBuffer.cpp index b793dbf2dc..a40e9abaa8 100644 --- a/src/core/SkWriteBuffer.cpp +++ b/src/core/SkWriteBuffer.cpp @@ -6,6 +6,7 @@ */ #include "SkWriteBuffer.h" + #include "SkBitmap.h" #include "SkData.h" #include "SkDeduper.h" @@ -14,6 +15,7 @@ #include "SkPixelRef.h" #include "SkPtrRecorder.h" #include "SkStream.h" +#include "SkTo.h" #include "SkTypeface.h" /////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkWriter32.cpp b/src/core/SkWriter32.cpp index 3261aad36f..b1638e413d 100644 --- a/src/core/SkWriter32.cpp +++ b/src/core/SkWriter32.cpp @@ -8,6 +8,8 @@ #include "SkMatrixPriv.h" #include "SkReader32.h" #include "SkString.h" +#include "SkTo.h" + #include "SkWriter32.h" void SkWriter32::writeMatrix(const SkMatrix& matrix) { diff --git a/src/core/SkWriter32.h b/src/core/SkWriter32.h index 2143c6b129..de33c5cb65 100644 --- a/src/core/SkWriter32.h +++ b/src/core/SkWriter32.h @@ -1,4 +1,3 @@ - /* * Copyright 2008 The Android Open Source Project * @@ -6,11 +5,9 @@ * found in the LICENSE file. */ - #ifndef SkWriter32_DEFINED #define SkWriter32_DEFINED -#include "../private/SkTemplates.h" #include "SkData.h" #include "SkMatrix.h" #include "SkPath.h" @@ -21,6 +18,8 @@ #include "SkRegion.h" #include "SkScalar.h" #include "SkStream.h" +#include "SkTemplates.h" +#include "SkTo.h" #include "SkTypes.h" class SK_API SkWriter32 : SkNoncopyable { diff --git a/src/effects/SkDashPathEffect.cpp b/src/effects/SkDashPathEffect.cpp index c1f5f0a2cc..830159253a 100644 --- a/src/effects/SkDashPathEffect.cpp +++ b/src/effects/SkDashPathEffect.cpp @@ -6,12 +6,14 @@ */ #include "SkDashPathEffect.h" + #include "SkDashImpl.h" #include "SkDashPathPriv.h" #include "SkFlattenablePriv.h" #include "SkReadBuffer.h" -#include "SkWriteBuffer.h" #include "SkStrokeRec.h" +#include "SkTo.h" +#include "SkWriteBuffer.h" SkDashImpl::SkDashImpl(const SkScalar intervals[], int count, SkScalar phase) : fPhase(0) diff --git a/src/effects/SkEmbossMask.cpp b/src/effects/SkEmbossMask.cpp index e081186564..d4e3741392 100644 --- a/src/effects/SkEmbossMask.cpp +++ b/src/effects/SkEmbossMask.cpp @@ -5,10 +5,11 @@ * found in the LICENSE file. */ - #include "SkEmbossMask.h" + #include "SkFixed.h" #include "SkMath.h" +#include "SkTo.h" static inline int nonzero_to_one(int x) { #if 0 diff --git a/src/effects/SkPackBits.cpp b/src/effects/SkPackBits.cpp index d2dfed9de1..e46590956c 100644 --- a/src/effects/SkPackBits.cpp +++ b/src/effects/SkPackBits.cpp @@ -4,8 +4,11 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #include "SkPackBits.h" +#include "SkTo.h" + size_t SkPackBits::ComputeMaxSize8(size_t srcSize) { // worst case is the number of 8bit values + 1 byte per (up to) 128 entries. return ((srcSize + 127) >> 7) + srcSize; diff --git a/src/effects/SkPaintFlagsDrawFilter.cpp b/src/effects/SkPaintFlagsDrawFilter.cpp index dc1c0074bc..12b8fbbf94 100644 --- a/src/effects/SkPaintFlagsDrawFilter.cpp +++ b/src/effects/SkPaintFlagsDrawFilter.cpp @@ -6,7 +6,9 @@ */ #include "SkPaintFlagsDrawFilter.h" + #include "SkPaint.h" +#include "SkTo.h" SkPaintFlagsDrawFilter::SkPaintFlagsDrawFilter(uint32_t clearFlags, uint32_t setFlags) { diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp index 5dbc784b0a..fa68d11e51 100644 --- a/src/effects/SkTableColorFilter.cpp +++ b/src/effects/SkTableColorFilter.cpp @@ -6,13 +6,15 @@ */ #include "SkTableColorFilter.h" -#include "SkPM4f.h" + #include "SkArenaAlloc.h" #include "SkBitmap.h" #include "SkColorData.h" +#include "SkPM4f.h" #include "SkRasterPipeline.h" #include "SkReadBuffer.h" #include "SkString.h" +#include "SkTo.h" #include "SkUnPreMultiply.h" #include "SkWriteBuffer.h" diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp index 92a6d04340..212aa364b5 100644 --- a/src/gpu/GrClipStackClip.cpp +++ b/src/gpu/GrClipStackClip.cpp @@ -13,18 +13,19 @@ #include "GrDrawingManager.h" #include "GrFixedClip.h" #include "GrGpuResourcePriv.h" -#include "GrRenderTargetContextPriv.h" #include "GrProxyProvider.h" -#include "GrStencilAttachment.h" +#include "GrRenderTargetContextPriv.h" #include "GrSWMaskHelper.h" +#include "GrStencilAttachment.h" #include "GrTextureProxy.h" -#include "effects/GrConvexPolyEffect.h" -#include "effects/GrRRectEffect.h" -#include "effects/GrTextureDomain.h" #include "SkClipOpPriv.h" #include "SkMakeUnique.h" #include "SkTaskGroup.h" +#include "SkTo.h" #include "SkTraceEvent.h" +#include "effects/GrConvexPolyEffect.h" +#include "effects/GrRRectEffect.h" +#include "effects/GrTextureDomain.h" typedef SkClipStack::Element Element; typedef GrReducedClip::InitialState InitialState; diff --git a/src/gpu/GrPathProcessor.cpp b/src/gpu/GrPathProcessor.cpp index 43c0bb07ca..0b4354c45b 100644 --- a/src/gpu/GrPathProcessor.cpp +++ b/src/gpu/GrPathProcessor.cpp @@ -6,7 +6,9 @@ */ #include "GrPathProcessor.h" + #include "GrShaderCaps.h" +#include "SkTo.h" #include "gl/GrGLGpu.h" #include "gl/GrGLVaryingHandler.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp index 0a558e06b9..b73a439688 100644 --- a/src/gpu/GrProgramDesc.cpp +++ b/src/gpu/GrProgramDesc.cpp @@ -4,7 +4,9 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #include "GrProgramDesc.h" + #include "GrPipeline.h" #include "GrPrimitiveProcessor.h" #include "GrProcessor.h" @@ -12,6 +14,7 @@ #include "GrShaderCaps.h" #include "GrTexturePriv.h" #include "SkChecksum.h" +#include "SkTo.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" diff --git a/src/gpu/GrProgramDesc.h b/src/gpu/GrProgramDesc.h index 68fdcdb964..f687876270 100644 --- a/src/gpu/GrProgramDesc.h +++ b/src/gpu/GrProgramDesc.h @@ -12,6 +12,7 @@ #include "GrTypesPriv.h" #include "SkOpts.h" #include "SkTArray.h" +#include "SkTo.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" class GrShaderCaps; diff --git a/src/gpu/GrRect.h b/src/gpu/GrRect.h index 95102a837b..8c44ed7705 100644 --- a/src/gpu/GrRect.h +++ b/src/gpu/GrRect.h @@ -8,6 +8,7 @@ #ifndef GrRect_DEFINED #define GrRect_DEFINED +#include "SkTo.h" #include "SkTypes.h" #include "SkRect.h" diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp index 8e41ba69a7..e8f9739aab 100644 --- a/src/gpu/GrResourceCache.cpp +++ b/src/gpu/GrResourceCache.cpp @@ -5,7 +5,6 @@ * found in the LICENSE file. */ - #include "GrResourceCache.h" #include "GrCaps.h" @@ -18,6 +17,7 @@ #include "SkMessageBus.h" #include "SkOpts.h" #include "SkTSort.h" +#include "SkTo.h" DECLARE_SKMESSAGEBUS_MESSAGE(GrUniqueKeyInvalidatedMessage); diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 210cefc7a7..ee8026c463 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -6,6 +6,7 @@ */ #include "SkGpuDevice.h" + #include "../private/SkShadowFlags.h" #include "GrBitmapTextureMaker.h" #include "GrBlurUtils.h" @@ -43,6 +44,7 @@ #include "SkSurface.h" #include "SkSurface_Gpu.h" #include "SkTLazy.h" +#include "SkTo.h" #include "SkUtils.h" #include "SkVertState.h" #include "SkVertices.h" diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index f4af7a4679..7a134da5c2 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -14,6 +14,7 @@ #include "GrProcessorAnalysis.h" #include "GrTypes.h" #include "GrXferProcessor.h" +#include "SkTo.h" #include "glsl/GrGLSLBlend.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLProgramDataManager.h" diff --git a/src/gpu/gl/GrGLCreateNullInterface.cpp b/src/gpu/gl/GrGLCreateNullInterface.cpp index 9df22659dd..a14fc67351 100644 --- a/src/gpu/gl/GrGLCreateNullInterface.cpp +++ b/src/gpu/gl/GrGLCreateNullInterface.cpp @@ -5,12 +5,13 @@ * found in the LICENSE file. */ - -#include "GrNonAtomicRef.h" -#include "gl/GrGLInterface.h" #include "GrGLTestInterface.h" +#include "GrNonAtomicRef.h" #include "SkMutex.h" #include "SkTDArray.h" +#include "SkTo.h" +#include "gl/GrGLInterface.h" + #include <type_traits> // added to suppress 'no previous prototype' warning and because this code is duplicated in diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 3e2c1b48b8..7a6d69bce2 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -7,7 +7,6 @@ #include "GrGLGpu.h" -#include <cmath> #include "../private/GrGLSL.h" #include "GrBackendSemaphore.h" #include "GrBackendSurface.h" @@ -35,10 +34,13 @@ #include "SkSLCompiler.h" #include "SkStrokeRec.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkTraceEvent.h" #include "SkTypes.h" #include "builders/GrGLShaderStringBuilder.h" +#include <cmath> + #define GL_CALL(X) GR_GL_CALL(this->glInterface(), X) #define GL_CALL_RET(RET, X) GR_GL_CALL_RET(this->glInterface(), RET, X) diff --git a/src/gpu/ops/GrOp.cpp b/src/gpu/ops/GrOp.cpp index 798d29d358..f020cdef67 100644 --- a/src/gpu/ops/GrOp.cpp +++ b/src/gpu/ops/GrOp.cpp @@ -9,6 +9,7 @@ #include "GrMemoryPool.h" #include "SkSpinlock.h" +#include "SkTo.h" // TODO I noticed a small benefit to using a larger exclusive pool for ops. Its very small, but // seems to be mostly consistent. There is a lot in flux right now, but we should really revisit diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp index 2301930e93..98228c5709 100644 --- a/src/gpu/ops/GrTextureOp.cpp +++ b/src/gpu/ops/GrTextureOp.cpp @@ -6,6 +6,7 @@ */ #include "GrTextureOp.h" + #include "GrAppliedClip.h" #include "GrCaps.h" #include "GrContext.h" @@ -26,6 +27,7 @@ #include "SkMatrixPriv.h" #include "SkPoint.h" #include "SkPoint3.h" +#include "SkTo.h" #include "glsl/GrGLSLColorSpaceXformHelper.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" #include "glsl/GrGLSLGeometryProcessor.h" diff --git a/src/gpu/text/GrTextContext.cpp b/src/gpu/text/GrTextContext.cpp index 2fc1f5bca4..b63b726079 100644 --- a/src/gpu/text/GrTextContext.cpp +++ b/src/gpu/text/GrTextContext.cpp @@ -4,7 +4,9 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ + #include "GrTextContext.h" + #include "GrCaps.h" #include "GrContext.h" #include "GrContextPriv.h" @@ -15,14 +17,14 @@ #include "SkDrawFilter.h" #include "SkDrawProcs.h" #include "SkFindAndPlaceGlyph.h" +#include "SkGlyphRun.h" #include "SkGr.h" #include "SkGraphics.h" -#include "SkGlyphRun.h" #include "SkMakeUnique.h" #include "SkMaskFilterBase.h" #include "SkPaintPriv.h" #include "SkTextMapStateProc.h" - +#include "SkTo.h" #include "ops/GrMeshDrawOp.h" // DF sizes and thresholds for usage of the small and medium sizes. For example, above diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index a99931188d..dd98125015 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -16,7 +16,6 @@ #include "GrPipeline.h" #include "GrRenderTargetPriv.h" #include "GrTexturePriv.h" - #include "GrVkAMDMemoryAllocator.h" #include "GrVkCommandBuffer.h" #include "GrVkGpuCommandBuffer.h" @@ -33,15 +32,13 @@ #include "GrVkTextureRenderTarget.h" #include "GrVkTransferBuffer.h" #include "GrVkVertexBuffer.h" - #include "SkConvertPixels.h" #include "SkMipMap.h" - +#include "SkSLCompiler.h" +#include "SkTo.h" #include "vk/GrVkInterface.h" #include "vk/GrVkTypes.h" -#include "SkSLCompiler.h" - #if !defined(SK_BUILD_FOR_WIN) #include <unistd.h> #endif // !defined(SK_BUILD_FOR_WIN) diff --git a/src/opts/SkBitmapProcState_matrixProcs_neon.cpp b/src/opts/SkBitmapProcState_matrixProcs_neon.cpp index 1efd1eddfe..4f166fb977 100644 --- a/src/opts/SkBitmapProcState_matrixProcs_neon.cpp +++ b/src/opts/SkBitmapProcState_matrixProcs_neon.cpp @@ -5,9 +5,10 @@ */ #include "SkBitmapProcState.h" +#include "SkBitmapProcState_utils.h" #include "SkShader.h" +#include "SkTo.h" #include "SkUtilsArm.h" -#include "SkBitmapProcState_utils.h" #include <arm_neon.h> diff --git a/src/opts/SkBitmapProcState_opts_SSE2.cpp b/src/opts/SkBitmapProcState_opts_SSE2.cpp index efe8f4dd2e..2484123767 100644 --- a/src/opts/SkBitmapProcState_opts_SSE2.cpp +++ b/src/opts/SkBitmapProcState_opts_SSE2.cpp @@ -5,13 +5,15 @@ * found in the LICENSE file. */ -#include <emmintrin.h> #include "SkBitmapProcState_opts_SSE2.h" #include "SkBitmapProcState_utils.h" #include "SkColorData.h" #include "SkPaint.h" +#include "SkTo.h" #include "SkUtils.h" +#include <emmintrin.h> + void S32_opaque_D32_filter_DX_SSE2(const SkBitmapProcState& s, const uint32_t* xy, int count, uint32_t* colors) { diff --git a/src/pdf/SkClusterator.cpp b/src/pdf/SkClusterator.cpp index 3d6800bf30..6c56eb6b45 100644 --- a/src/pdf/SkClusterator.cpp +++ b/src/pdf/SkClusterator.cpp @@ -7,6 +7,7 @@ #include "SkClusterator.h" +#include "SkTo.h" #include "SkUtils.h" static bool is_reversed(const uint32_t* clusters, uint32_t count) { diff --git a/src/pdf/SkDeflate.cpp b/src/pdf/SkDeflate.cpp index 6952ec4f11..be3e182cd1 100644 --- a/src/pdf/SkDeflate.cpp +++ b/src/pdf/SkDeflate.cpp @@ -5,11 +5,12 @@ * found in the LICENSE file. */ +#include "SkDeflate.h" #include "SkData.h" -#include "SkDeflate.h" #include "SkMakeUnique.h" #include "SkMalloc.h" +#include "SkTo.h" #include "SkTraceEvent.h" #include "zlib.h" diff --git a/src/pdf/SkJpegInfo.cpp b/src/pdf/SkJpegInfo.cpp index df99de4e93..72e659e71a 100644 --- a/src/pdf/SkJpegInfo.cpp +++ b/src/pdf/SkJpegInfo.cpp @@ -7,6 +7,8 @@ #include "SkJpegInfo.h" +#include "SkTo.h" + #ifndef SK_HAS_JPEG_LIBRARY namespace { diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp index 9d86d90bed..38e5327610 100644 --- a/src/pdf/SkPDFBitmap.cpp +++ b/src/pdf/SkPDFBitmap.cpp @@ -16,6 +16,7 @@ #include "SkPDFTypes.h" #include "SkPDFUtils.h" #include "SkStream.h" +#include "SkTo.h" #include "SkUnPreMultiply.h" bool image_compute_is_opaque(const SkImage* image) { diff --git a/src/pdf/SkPDFConvertType1FontStream.cpp b/src/pdf/SkPDFConvertType1FontStream.cpp index 387f0efacf..74e148c867 100644 --- a/src/pdf/SkPDFConvertType1FontStream.cpp +++ b/src/pdf/SkPDFConvertType1FontStream.cpp @@ -6,7 +6,9 @@ */ #include "SkPDFConvertType1FontStream.h" + #include "SkTemplates.h" +#include "SkTo.h" #include <ctype.h> diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index f4c034e1ef..4f214c12f0 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -45,6 +45,7 @@ #include "SkTemplates.h" #include "SkTextBlobRunIterator.h" #include "SkTextFormatParams.h" +#include "SkTo.h" #include "SkUtils.h" #include "SkXfermodeInterpretation.h" diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index 8219ad385e..577bac7252 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -13,6 +13,7 @@ #include "SkPDFDevice.h" #include "SkPDFUtils.h" #include "SkStream.h" +#include "SkTo.h" SkPDFObjectSerializer::SkPDFObjectSerializer() : fBaseOffset(0), fNextToBeSerialized(0) {} diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 3b89f62cbe..4556bcd2b3 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ +#include "SkPDFFont.h" + #include "SkData.h" #include "SkGlyphCache.h" #include "SkMakeUnique.h" #include "SkPDFCanon.h" #include "SkPDFConvertType1FontStream.h" #include "SkPDFDevice.h" -#include "SkPDFFont.h" #include "SkPDFMakeCIDGlyphWidthsArray.h" #include "SkPDFMakeToUnicodeCmap.h" #include "SkPDFUtils.h" @@ -19,6 +20,7 @@ #include "SkRefCnt.h" #include "SkScalar.h" #include "SkStream.h" +#include "SkTo.h" #include "SkTypes.h" #include "SkUtils.h" diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp index cab071c747..b44c1144cc 100644 --- a/src/pdf/SkPDFGraphicState.cpp +++ b/src/pdf/SkPDFGraphicState.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ +#include "SkPDFGraphicState.h" + #include "SkData.h" -#include "SkPaint.h" #include "SkPDFCanon.h" #include "SkPDFFormXObject.h" -#include "SkPDFGraphicState.h" #include "SkPDFUtils.h" +#include "SkPaint.h" +#include "SkTo.h" static const char* as_pdf_blend_mode_name(SkBlendMode mode) { // PDF32000.book section 11.3.5 "Blend Mode" diff --git a/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp b/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp index 4d5471d9b3..62902c1e23 100644 --- a/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp +++ b/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp @@ -5,10 +5,12 @@ * found in the LICENSE file. */ -#include "SkBitSet.h" #include "SkPDFMakeCIDGlyphWidthsArray.h" -#include "SkPaint.h" + +#include "SkBitSet.h" #include "SkGlyphCache.h" +#include "SkPaint.h" +#include "SkTo.h" // TODO(halcanary): Write unit tests for SkPDFMakeCIDGlyphWidthsArray(). diff --git a/src/pdf/SkPDFMakeToUnicodeCmap.cpp b/src/pdf/SkPDFMakeToUnicodeCmap.cpp index c93aa6f2c5..4f383e1028 100644 --- a/src/pdf/SkPDFMakeToUnicodeCmap.cpp +++ b/src/pdf/SkPDFMakeToUnicodeCmap.cpp @@ -6,7 +6,9 @@ */ #include "SkPDFMakeToUnicodeCmap.h" + #include "SkPDFUtils.h" +#include "SkTo.h" #include "SkUtils.h" static void append_tounicode_header(SkDynamicMemoryWStream* cmap, diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp index ccb3ef38b5..9234f44ac1 100644 --- a/src/pdf/SkPDFMetadata.cpp +++ b/src/pdf/SkPDFMetadata.cpp @@ -5,10 +5,12 @@ * found in the LICENSE file. */ +#include "SkPDFMetadata.h" + #include "SkMD5.h" #include "SkMilestone.h" -#include "SkPDFMetadata.h" #include "SkPDFTypes.h" +#include "SkTo.h" #include "SkUtils.h" #include <utility> diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp index 56d19b11c0..9e83c7a4c2 100644 --- a/src/pdf/SkPDFTypes.cpp +++ b/src/pdf/SkPDFTypes.cpp @@ -5,13 +5,16 @@ * found in the LICENSE file. */ +#include "SkPDFTypes.h" + #include "SkData.h" #include "SkDeflate.h" #include "SkMakeUnique.h" -#include "SkPDFTypes.h" #include "SkPDFUtils.h" #include "SkStream.h" #include "SkStreamPriv.h" +#include "SkTo.h" + #include <new> //////////////////////////////////////////////////////////////////////////////// diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index bf3e266b8a..434f8ba082 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -14,6 +14,7 @@ #include "SkRefCnt.h" #include "SkScalar.h" #include "SkTHash.h" +#include "SkTo.h" #include "SkTypes.h" class SkData; diff --git a/src/pipe/SkPipeCanvas.cpp b/src/pipe/SkPipeCanvas.cpp index 911595c47c..d66953c5bd 100644 --- a/src/pipe/SkPipeCanvas.cpp +++ b/src/pipe/SkPipeCanvas.cpp @@ -5,21 +5,23 @@ * found in the LICENSE file. */ +#include "SkPipeCanvas.h" + #include "SkAutoMalloc.h" #include "SkCanvasPriv.h" #include "SkColorFilter.h" -#include "SkDrawable.h" #include "SkDrawLooper.h" #include "SkDrawShadowInfo.h" +#include "SkDrawable.h" #include "SkImageFilter.h" #include "SkMaskFilter.h" #include "SkPathEffect.h" -#include "SkPipeCanvas.h" #include "SkPipeFormat.h" #include "SkRSXform.h" #include "SkShader.h" #include "SkStream.h" #include "SkTextBlob.h" +#include "SkTo.h" #include "SkTypeface.h" template <typename T> void write_rrect(T* writer, const SkRRect& rrect) { diff --git a/src/ports/SkFontHost_FreeType.cpp b/src/ports/SkFontHost_FreeType.cpp index 3e8e9576dd..e75ef2d6a4 100644 --- a/src/ports/SkFontHost_FreeType.cpp +++ b/src/ports/SkFontHost_FreeType.cpp @@ -15,10 +15,10 @@ #include "SkFontHost_FreeType_common.h" #include "SkGlyph.h" #include "SkMakeUnique.h" +#include "SkMalloc.h" #include "SkMask.h" #include "SkMaskGamma.h" #include "SkMatrix22.h" -#include "SkMalloc.h" #include "SkMutex.h" #include "SkOTUtils.h" #include "SkPath.h" @@ -26,6 +26,8 @@ #include "SkStream.h" #include "SkString.h" #include "SkTemplates.h" +#include "SkTo.h" + #include <memory> #include <ft2build.h> diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp index 2a7a4baaac..5627304956 100644 --- a/src/ports/SkFontHost_FreeType_common.cpp +++ b/src/ports/SkFontHost_FreeType_common.cpp @@ -13,6 +13,7 @@ #include "SkFDot6.h" #include "SkFontHost_FreeType_common.h" #include "SkPath.h" +#include "SkTo.h" #include <ft2build.h> #include FT_FREETYPE_H diff --git a/src/ports/SkFontHost_mac.cpp b/src/ports/SkFontHost_mac.cpp index 3cc51d43f6..4c06e960a6 100644 --- a/src/ports/SkFontHost_mac.cpp +++ b/src/ports/SkFontHost_mac.cpp @@ -42,6 +42,7 @@ #include "SkStream.h" #include "SkString.h" #include "SkTemplates.h" +#include "SkTo.h" #include "SkTypefaceCache.h" #include "SkTypeface_mac.h" #include "SkUtils.h" diff --git a/src/ports/SkFontHost_win.cpp b/src/ports/SkFontHost_win.cpp index f1da8053f2..d98e68fc9f 100644 --- a/src/ports/SkFontHost_win.cpp +++ b/src/ports/SkFontHost_win.cpp @@ -19,21 +19,21 @@ #include "SkMakeUnique.h" #include "SkMaskGamma.h" #include "SkMatrix22.h" -#include "SkOnce.h" #include "SkOTTable_OS_2.h" #include "SkOTTable_maxp.h" #include "SkOTTable_name.h" #include "SkOTUtils.h" +#include "SkOnce.h" #include "SkPath.h" #include "SkSFNTHeader.h" #include "SkStream.h" #include "SkString.h" #include "SkTemplates.h" -#include "SkTypeface_win.h" +#include "SkTo.h" #include "SkTypefaceCache.h" +#include "SkTypeface_win.h" #include "SkUtils.h" -#include "SkTypes.h" #include <tchar.h> #include <usp10.h> #include <objbase.h> diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp index 98d8ca812e..fa6b9101ea 100644 --- a/src/ports/SkScalerContext_win_dw.cpp +++ b/src/ports/SkScalerContext_win_dw.cpp @@ -10,9 +10,9 @@ #undef GetGlyphIndices -#include "SkDraw.h" #include "SkDWrite.h" #include "SkDWriteGeometrySink.h" +#include "SkDraw.h" #include "SkEndian.h" #include "SkGlyph.h" #include "SkHRESULT.h" @@ -29,6 +29,7 @@ #include "SkScalerContext_win_dw.h" #include "SkSharedMutex.h" #include "SkTScopedComPtr.h" +#include "SkTo.h" #include "SkTypeface_win_dw.h" #include <dwrite.h> diff --git a/src/ports/SkTypeface_win_dw.cpp b/src/ports/SkTypeface_win_dw.cpp index 281355e6a0..aa88c4c911 100644 --- a/src/ports/SkTypeface_win_dw.cpp +++ b/src/ports/SkTypeface_win_dw.cpp @@ -18,14 +18,15 @@ #include "SkDWriteFontFileStream.h" #include "SkFontDescriptor.h" #include "SkFontStream.h" +#include "SkOTTable_OS_2.h" #include "SkOTTable_fvar.h" #include "SkOTTable_head.h" #include "SkOTTable_hhea.h" -#include "SkOTTable_OS_2.h" #include "SkOTTable_post.h" #include "SkOTUtils.h" #include "SkScalerContext.h" #include "SkScalerContext_win_dw.h" +#include "SkTo.h" #include "SkTypeface_win_dw.h" #include "SkUtils.h" diff --git a/src/sfnt/SkOTUtils.cpp b/src/sfnt/SkOTUtils.cpp index f46f86c2c0..1bd051cca5 100644 --- a/src/sfnt/SkOTUtils.cpp +++ b/src/sfnt/SkOTUtils.cpp @@ -15,6 +15,7 @@ #include "SkOTTable_name.h" #include "SkSFNTHeader.h" #include "SkStream.h" +#include "SkTo.h" extern const uint8_t SK_OT_GlyphData_NoOutline[] = { 0x0,0x0, //SkOTTableGlyphData::numberOfContours diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp index 3462f7cd6b..d552803e73 100644 --- a/src/svg/SkSVGDevice.cpp +++ b/src/svg/SkSVGDevice.cpp @@ -25,6 +25,7 @@ #include "SkShader.h" #include "SkStream.h" #include "SkTHash.h" +#include "SkTo.h" #include "SkTypeface.h" #include "SkUtils.h" #include "SkXMLWriter.h" diff --git a/src/utils/SkInterpolator.cpp b/src/utils/SkInterpolator.cpp index d64316d845..141adaf29f 100644 --- a/src/utils/SkInterpolator.cpp +++ b/src/utils/SkInterpolator.cpp @@ -8,9 +8,10 @@ #include "SkInterpolator.h" #include "SkFixed.h" -#include "SkMath.h" #include "SkMalloc.h" +#include "SkMath.h" #include "SkTSearch.h" +#include "SkTo.h" SkInterpolatorBase::SkInterpolatorBase() { fStorage = nullptr; diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp index 53e8bb33a5..887e251ff2 100644 --- a/src/utils/SkLua.cpp +++ b/src/utils/SkLua.cpp @@ -30,6 +30,7 @@ #include "SkString.h" #include "SkSurface.h" #include "SkTextBlob.h" +#include "SkTo.h" #include "SkTypeface.h" #include <new> diff --git a/src/utils/SkLuaCanvas.cpp b/src/utils/SkLuaCanvas.cpp index 53e462af0d..c7e3064c9b 100644 --- a/src/utils/SkLuaCanvas.cpp +++ b/src/utils/SkLuaCanvas.cpp @@ -9,6 +9,7 @@ #include "SkLua.h" #include "SkStringUtils.h" +#include "SkTo.h" extern "C" { #include "lua.h" diff --git a/src/utils/SkMultiPictureDocument.cpp b/src/utils/SkMultiPictureDocument.cpp index 493e6d4cfc..f7081e6d56 100644 --- a/src/utils/SkMultiPictureDocument.cpp +++ b/src/utils/SkMultiPictureDocument.cpp @@ -6,6 +6,7 @@ */ #include "SkMultiPictureDocument.h" + #include "SkMultiPictureDocumentPriv.h" #include "SkNWayCanvas.h" #include "SkPicture.h" @@ -13,6 +14,7 @@ #include "SkSerialProcs.h" #include "SkStream.h" #include "SkTArray.h" +#include "SkTo.h" #include <limits.h> diff --git a/src/utils/SkPatchUtils.cpp b/src/utils/SkPatchUtils.cpp index 8fafd149d4..a28abdf807 100644 --- a/src/utils/SkPatchUtils.cpp +++ b/src/utils/SkPatchUtils.cpp @@ -10,6 +10,7 @@ #include "SkColorData.h" #include "SkGeometry.h" #include "SkPM4f.h" +#include "SkTo.h" namespace { enum CubicCtrlPts { diff --git a/src/utils/mac/SkCreateCGImageRef.cpp b/src/utils/mac/SkCreateCGImageRef.cpp index 95c48b1ae5..623b3e7b17 100644 --- a/src/utils/mac/SkCreateCGImageRef.cpp +++ b/src/utils/mac/SkCreateCGImageRef.cpp @@ -8,9 +8,10 @@ #include "SkTypes.h" #if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS) -#include "SkCGUtils.h" #include "SkBitmap.h" +#include "SkCGUtils.h" #include "SkColorData.h" +#include "SkTo.h" static CGBitmapInfo ComputeCGAlphaInfo_RGBA(SkAlphaType at) { CGBitmapInfo info = kCGBitmapByteOrder32Big; diff --git a/src/views/SkView.cpp b/src/views/SkView.cpp index 6c9098848c..26ee1eae13 100644 --- a/src/views/SkView.cpp +++ b/src/views/SkView.cpp @@ -6,7 +6,9 @@ */ #include "SkView.h" + #include "SkCanvas.h" +#include "SkTo.h" static inline uint32_t SkSetClearShift(uint32_t bits, bool cond, unsigned shift) { SkASSERT((int)cond == 0 || (int)cond == 1); diff --git a/src/xml/SkDOM.cpp b/src/xml/SkDOM.cpp index 2e37dd7807..e6c343515f 100644 --- a/src/xml/SkDOM.cpp +++ b/src/xml/SkDOM.cpp @@ -5,9 +5,10 @@ * found in the LICENSE file. */ - #include "SkDOM.h" + #include "SkStream.h" +#include "SkTo.h" #include "SkXMLParser.h" #include "SkXMLWriter.h" diff --git a/src/xml/SkXMLParser.cpp b/src/xml/SkXMLParser.cpp index 23c4e672b5..36e1ab3ea0 100644 --- a/src/xml/SkXMLParser.cpp +++ b/src/xml/SkXMLParser.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ +#include "SkXMLParser.h" + #include "expat.h" #include "SkStream.h" #include "SkString.h" +#include "SkTo.h" #include "SkTypes.h" -#include "SkXMLParser.h" static char const* const gErrorStrings[] = { "empty or missing file ", diff --git a/src/xml/SkXMLWriter.cpp b/src/xml/SkXMLWriter.cpp index 67dcf59d1d..0be9c5560a 100644 --- a/src/xml/SkXMLWriter.cpp +++ b/src/xml/SkXMLWriter.cpp @@ -6,7 +6,9 @@ */ #include "SkXMLWriter.h" + #include "SkStream.h" +#include "SkTo.h" SkXMLWriter::SkXMLWriter(bool doEscapeMarkup) : fDoEscapeMarkup(doEscapeMarkup) {} diff --git a/src/xps/SkXPSDevice.cpp b/src/xps/SkXPSDevice.cpp index ef5f48881d..36d1bd171f 100644 --- a/src/xps/SkXPSDevice.cpp +++ b/src/xps/SkXPSDevice.cpp @@ -49,6 +49,7 @@ #include "SkTLazy.h" #include "SkTScopedComPtr.h" #include "SkTTCFHeader.h" +#include "SkTo.h" #include "SkTypefacePriv.h" #include "SkUtils.h" #include "SkVertices.h" |