aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-06-13 09:42:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-13 13:45:47 +0000
commitfdcfb8b7c23fbf18f872d2c31d27978235033876 (patch)
tree3e3ad1c6ffe8647f45b08a560ab99384437dc2ba
parentbb9ee9b4aa7d80e8a85832a462a3123060d4bd64 (diff)
Revert "SkTypes: extract SkTo"
This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
-rw-r--r--bench/BitmapRectBench.cpp2
-rw-r--r--bench/PDFBench.cpp1
-rw-r--r--experimental/svg/model/SkSVGDOM.cpp7
-rw-r--r--experimental/svg/model/SkSVGRenderContext.cpp4
-rw-r--r--fuzz/Fuzz.h3
-rw-r--r--fuzz/FuzzCanvas.cpp3
-rw-r--r--gm/blurrect.cpp3
-rw-r--r--gm/dftext.cpp6
-rw-r--r--gm/getpostextpath.cpp2
-rw-r--r--gm/imagefromyuvtextures.cpp1
-rw-r--r--gm/pdf_never_embed.cpp1
-rw-r--r--gm/scaledemoji.cpp1
-rw-r--r--gm/tallstretchedbitmaps.cpp2
-rw-r--r--gm/texteffects.cpp2
-rw-r--r--include/core/SkColorPriv.h1
-rw-r--r--include/core/SkImageInfo.h2
-rw-r--r--include/core/SkMath.h2
-rw-r--r--include/core/SkMatrix.h1
-rw-r--r--include/core/SkPaint.h1
-rw-r--r--include/core/SkPath.h1
-rw-r--r--include/core/SkStream.h1
-rw-r--r--include/core/SkString.h4
-rw-r--r--include/core/SkTypes.h20
-rw-r--r--include/gpu/GrResourceKey.h2
-rw-r--r--include/private/SkFixed.h4
-rw-r--r--include/private/SkPathRef.h7
-rw-r--r--include/private/SkTDArray.h4
-rw-r--r--include/private/SkTo.h28
-rw-r--r--include/utils/SkInterpolator.h2
-rw-r--r--modules/skjson/src/SkJSON.cpp1
-rw-r--r--modules/skottie/src/Skottie.cpp11
-rw-r--r--modules/skottie/src/SkottieAdapter.cpp3
-rw-r--r--modules/sksg/include/SkSGGroup.h2
-rw-r--r--modules/sksg/tests/SGTest.cpp6
-rw-r--r--modules/skshaper/src/SkShaper_harfbuzz.cpp1
-rw-r--r--modules/skshaper/src/SkShaper_primitive.cpp3
-rw-r--r--samplecode/SampleHairline.cpp12
-rw-r--r--samplecode/SamplePathClip.cpp10
-rw-r--r--src/codec/SkJpegCodec.cpp1
-rw-r--r--src/codec/SkWbmpCodec.cpp4
-rw-r--r--src/codec/SkWebpCodec.cpp6
-rw-r--r--src/core/SkAAClip.cpp2
-rw-r--r--src/core/SkAlphaRuns.cpp2
-rw-r--r--src/core/SkAnalyticEdge.cpp3
-rw-r--r--src/core/SkAnalyticEdge.h1
-rw-r--r--src/core/SkAntiRun.h2
-rw-r--r--src/core/SkBitmap.cpp4
-rw-r--r--src/core/SkBitmapProcState_matrixProcs.cpp3
-rw-r--r--src/core/SkBitmapProcState_utils.h2
-rw-r--r--src/core/SkBlitter.cpp8
-rw-r--r--src/core/SkBlitter.h1
-rw-r--r--src/core/SkBlurMask.cpp4
-rw-r--r--src/core/SkBuffer.h3
-rw-r--r--src/core/SkCanvas.cpp20
-rw-r--r--src/core/SkColorData.h1
-rw-r--r--src/core/SkDescriptor.h2
-rw-r--r--src/core/SkDevice.cpp2
-rw-r--r--src/core/SkDraw.cpp8
-rw-r--r--src/core/SkEdge.cpp3
-rw-r--r--src/core/SkEdge.h4
-rw-r--r--src/core/SkEdgeBuilder.cpp7
-rw-r--r--src/core/SkFDot6.h4
-rw-r--r--src/core/SkFont.cpp2
-rw-r--r--src/core/SkGlyph.h1
-rw-r--r--src/core/SkGlyphRun.cpp3
-rw-r--r--src/core/SkIPoint16.h1
-rw-r--r--src/core/SkLineClipper.cpp1
-rw-r--r--src/core/SkMD5.h1
-rw-r--r--src/core/SkMask.cpp2
-rw-r--r--src/core/SkMaskBlurFilter.cpp4
-rw-r--r--src/core/SkMaskGamma.cpp5
-rw-r--r--src/core/SkMatrix.cpp3
-rw-r--r--src/core/SkMetaData.cpp2
-rw-r--r--src/core/SkMipMap.cpp2
-rw-r--r--src/core/SkNx.h2
-rw-r--r--src/core/SkOverdrawCanvas.cpp6
-rw-r--r--src/core/SkPaint.cpp12
-rw-r--r--src/core/SkPath.cpp6
-rw-r--r--src/core/SkPathRef.cpp4
-rw-r--r--src/core/SkPath_serial.cpp4
-rw-r--r--src/core/SkPicture.cpp3
-rw-r--r--src/core/SkPictureData.cpp6
-rw-r--r--src/core/SkPictureRecord.cpp6
-rw-r--r--src/core/SkPictureRecord.h1
-rw-r--r--src/core/SkPixmap.cpp5
-rw-r--r--src/core/SkRWBuffer.cpp3
-rw-r--r--src/core/SkRasterPipelineBlitter.cpp5
-rw-r--r--src/core/SkRecorder.cpp5
-rw-r--r--src/core/SkRegion.cpp2
-rw-r--r--src/core/SkRegionPriv.h2
-rw-r--r--src/core/SkRegion_path.cpp7
-rw-r--r--src/core/SkResourceCache.cpp4
-rw-r--r--src/core/SkSafeMath.h1
-rw-r--r--src/core/SkScalerContext.cpp1
-rw-r--r--src/core/SkScan_AAAPath.cpp1
-rw-r--r--src/core/SkScan_AntiPath.cpp11
-rw-r--r--src/core/SkScan_Antihair.cpp5
-rw-r--r--src/core/SkStream.cpp8
-rw-r--r--src/core/SkString.cpp5
-rw-r--r--src/core/SkStroke.cpp2
-rw-r--r--src/core/SkStroke.h3
-rw-r--r--src/core/SkTSort.h4
-rw-r--r--src/core/SkTime.cpp5
-rw-r--r--src/core/SkUtils.cpp5
-rw-r--r--src/core/SkVertices.cpp4
-rw-r--r--src/core/SkWriteBuffer.cpp2
-rw-r--r--src/core/SkWriter32.cpp2
-rw-r--r--src/core/SkWriter32.h5
-rw-r--r--src/effects/SkDashPathEffect.cpp4
-rw-r--r--src/effects/SkEmbossMask.cpp3
-rw-r--r--src/effects/SkPackBits.cpp3
-rw-r--r--src/effects/SkPaintFlagsDrawFilter.cpp2
-rw-r--r--src/effects/SkTableColorFilter.cpp4
-rw-r--r--src/gpu/GrClipStackClip.cpp11
-rw-r--r--src/gpu/GrPathProcessor.cpp2
-rw-r--r--src/gpu/GrProgramDesc.cpp3
-rw-r--r--src/gpu/GrProgramDesc.h1
-rw-r--r--src/gpu/GrRect.h1
-rw-r--r--src/gpu/GrResourceCache.cpp2
-rw-r--r--src/gpu/SkGpuDevice.cpp2
-rw-r--r--src/gpu/effects/GrPorterDuffXferProcessor.cpp1
-rw-r--r--src/gpu/gl/GrGLCreateNullInterface.cpp7
-rw-r--r--src/gpu/gl/GrGLGpu.cpp4
-rw-r--r--src/gpu/ops/GrOp.cpp1
-rw-r--r--src/gpu/ops/GrTextureOp.cpp2
-rw-r--r--src/gpu/text/GrTextContext.cpp6
-rw-r--r--src/gpu/vk/GrVkGpu.cpp7
-rw-r--r--src/opts/SkBitmapProcState_matrixProcs_neon.cpp3
-rw-r--r--src/opts/SkBitmapProcState_opts_SSE2.cpp4
-rw-r--r--src/pdf/SkClusterator.cpp1
-rw-r--r--src/pdf/SkDeflate.cpp3
-rw-r--r--src/pdf/SkJpegInfo.cpp2
-rw-r--r--src/pdf/SkPDFBitmap.cpp1
-rw-r--r--src/pdf/SkPDFConvertType1FontStream.cpp2
-rw-r--r--src/pdf/SkPDFDevice.cpp1
-rw-r--r--src/pdf/SkPDFDocument.cpp1
-rw-r--r--src/pdf/SkPDFFont.cpp4
-rw-r--r--src/pdf/SkPDFGraphicState.cpp6
-rw-r--r--src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp6
-rw-r--r--src/pdf/SkPDFMakeToUnicodeCmap.cpp2
-rw-r--r--src/pdf/SkPDFMetadata.cpp4
-rw-r--r--src/pdf/SkPDFTypes.cpp5
-rw-r--r--src/pdf/SkPDFTypes.h1
-rw-r--r--src/pipe/SkPipeCanvas.cpp6
-rw-r--r--src/ports/SkFontHost_FreeType.cpp4
-rw-r--r--src/ports/SkFontHost_FreeType_common.cpp1
-rw-r--r--src/ports/SkFontHost_mac.cpp1
-rw-r--r--src/ports/SkFontHost_win.cpp6
-rw-r--r--src/ports/SkScalerContext_win_dw.cpp3
-rw-r--r--src/ports/SkTypeface_win_dw.cpp3
-rw-r--r--src/sfnt/SkOTUtils.cpp1
-rw-r--r--src/svg/SkSVGDevice.cpp1
-rw-r--r--src/utils/SkInterpolator.cpp3
-rw-r--r--src/utils/SkLua.cpp1
-rw-r--r--src/utils/SkLuaCanvas.cpp1
-rw-r--r--src/utils/SkMultiPictureDocument.cpp2
-rw-r--r--src/utils/SkPatchUtils.cpp1
-rw-r--r--src/utils/mac/SkCreateCGImageRef.cpp1
-rw-r--r--src/views/SkView.cpp2
-rw-r--r--src/xml/SkDOM.cpp3
-rw-r--r--src/xml/SkXMLParser.cpp4
-rw-r--r--src/xml/SkXMLWriter.cpp2
-rw-r--r--src/xps/SkXPSDevice.cpp1
-rw-r--r--tests/Float16Test.cpp5
-rw-r--r--tests/MathTest.cpp1
-rw-r--r--tests/PDFDeflateWStreamTest.cpp1
-rw-r--r--tests/PDFGlyphsToUnicodeTest.cpp1
-rw-r--r--tests/PDFPrimitivesTest.cpp3
-rw-r--r--tests/PaintTest.cpp1
-rw-r--r--tests/PathTest.cpp3
-rw-r--r--tests/ReadWriteAlphaTest.cpp1
-rw-r--r--tests/SVGDeviceTest.cpp2
-rw-r--r--tests/SkBase64Test.cpp1
-rw-r--r--tests/SkPEGTest.cpp1
-rw-r--r--tests/SkRasterPipelineTest.cpp5
-rw-r--r--tests/StreamTest.cpp1
-rw-r--r--tests/TextBlobTest.cpp1
-rw-r--r--tests/Time.cpp1
-rw-r--r--tools/fonts/SkTestTypeface.cpp3
-rw-r--r--tools/gpu/GrTest.cpp5
-rw-r--r--tools/gpu/gl/debug/DebugGLTestContext.cpp5
-rw-r--r--tools/sk_app/android/surface_glue_android.cpp1
-rw-r--r--tools/skpinfo.cpp5
-rw-r--r--tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp1
-rw-r--r--tools/viewer/Viewer.cpp8
185 files changed, 203 insertions, 450 deletions
diff --git a/bench/BitmapRectBench.cpp b/bench/BitmapRectBench.cpp
index 0e5d3627f2..789a725e11 100644
--- a/bench/BitmapRectBench.cpp
+++ b/bench/BitmapRectBench.cpp
@@ -4,7 +4,6 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
#include "Benchmark.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
@@ -12,7 +11,6 @@
#include "SkPaint.h"
#include "SkRandom.h"
#include "SkString.h"
-#include "SkTo.h"
static void draw_into_bitmap(const SkBitmap& bm) {
const int w = bm.width();
diff --git a/bench/PDFBench.cpp b/bench/PDFBench.cpp
index 44b96a73dd..4cda80bd6e 100644
--- a/bench/PDFBench.cpp
+++ b/bench/PDFBench.cpp
@@ -16,7 +16,6 @@
#include "SkPixmap.h"
#include "SkRandom.h"
#include "SkStream.h"
-#include "SkTo.h"
namespace {
struct WStreamWriteTextBenchmark : public Benchmark {
diff --git a/experimental/svg/model/SkSVGDOM.cpp b/experimental/svg/model/SkSVGDOM.cpp
index 758a3ede12..5b4dc6626f 100644
--- a/experimental/svg/model/SkSVGDOM.cpp
+++ b/experimental/svg/model/SkSVGDOM.cpp
@@ -8,11 +8,12 @@
#include "SkCanvas.h"
#include "SkDOM.h"
#include "SkParsePath.h"
+#include "SkString.h"
#include "SkSVGAttributeParser.h"
#include "SkSVGCircle.h"
#include "SkSVGClipPath.h"
-#include "SkSVGDOM.h"
#include "SkSVGDefs.h"
+#include "SkSVGDOM.h"
#include "SkSVGEllipse.h"
#include "SkSVGG.h"
#include "SkSVGLine.h"
@@ -24,14 +25,12 @@
#include "SkSVGRadialGradient.h"
#include "SkSVGRect.h"
#include "SkSVGRenderContext.h"
-#include "SkSVGSVG.h"
#include "SkSVGStop.h"
+#include "SkSVGSVG.h"
#include "SkSVGTypes.h"
#include "SkSVGUse.h"
#include "SkSVGValue.h"
-#include "SkString.h"
#include "SkTSearch.h"
-#include "SkTo.h"
namespace {
diff --git a/experimental/svg/model/SkSVGRenderContext.cpp b/experimental/svg/model/SkSVGRenderContext.cpp
index cab5a00ea9..2b7ba2cf2c 100644
--- a/experimental/svg/model/SkSVGRenderContext.cpp
+++ b/experimental/svg/model/SkSVGRenderContext.cpp
@@ -5,15 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkSVGRenderContext.h"
-
#include "SkCanvas.h"
#include "SkDashPathEffect.h"
#include "SkPath.h"
#include "SkSVGAttribute.h"
#include "SkSVGNode.h"
+#include "SkSVGRenderContext.h"
#include "SkSVGTypes.h"
-#include "SkTo.h"
namespace {
diff --git a/fuzz/Fuzz.h b/fuzz/Fuzz.h
index 32ec990326..3ffe47db2d 100644
--- a/fuzz/Fuzz.h
+++ b/fuzz/Fuzz.h
@@ -8,12 +8,11 @@
#ifndef Fuzz_DEFINED
#define Fuzz_DEFINED
-#include "../tools/Registry.h"
#include "SkData.h"
+#include "../tools/Registry.h"
#include "SkMalloc.h"
#include "SkTypes.h"
-#include <limits>
#include <cmath>
#include <signal.h>
#include <limits>
diff --git a/fuzz/FuzzCanvas.cpp b/fuzz/FuzzCanvas.cpp
index f63ddb12f8..903eb29858 100644
--- a/fuzz/FuzzCanvas.cpp
+++ b/fuzz/FuzzCanvas.cpp
@@ -17,7 +17,6 @@
#include "SkImageFilter.h"
#include "SkMaskFilter.h"
#include "SkNullCanvas.h"
-#include "SkOSFile.h"
#include "SkPathEffect.h"
#include "SkPicturePriv.h"
#include "SkPictureRecorder.h"
@@ -25,8 +24,8 @@
#include "SkRSXform.h"
#include "SkRegion.h"
#include "SkSurface.h"
-#include "SkTo.h"
#include "SkTypeface.h"
+#include "SkOSFile.h"
// EFFECTS
#include "Sk1DPathEffect.h"
diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp
index c2724bdedb..a718cdeac6 100644
--- a/gm/blurrect.cpp
+++ b/gm/blurrect.cpp
@@ -5,12 +5,11 @@
* found in the LICENSE file.
*/
+#include "gm.h"
#include "SkBlurMask.h"
#include "SkCanvas.h"
#include "SkMaskFilter.h"
#include "SkPath.h"
-#include "SkTo.h"
-#include "gm.h"
#define STROKE_WIDTH SkIntToScalar(10)
diff --git a/gm/dftext.cpp b/gm/dftext.cpp
index ae57aa8eb2..ab8d1e6840 100644
--- a/gm/dftext.cpp
+++ b/gm/dftext.cpp
@@ -4,15 +4,13 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
+#include "gm.h"
+#include "sk_tool_utils.h"
#include "Resources.h"
#include "SkCanvas.h"
#include "SkStream.h"
#include "SkSurface.h"
-#include "SkTo.h"
#include "SkTypeface.h"
-#include "gm.h"
-#include "sk_tool_utils.h"
class DFTextGM : public skiagm::GM {
public:
diff --git a/gm/getpostextpath.cpp b/gm/getpostextpath.cpp
index 1fcce5fca5..eac570ac58 100644
--- a/gm/getpostextpath.cpp
+++ b/gm/getpostextpath.cpp
@@ -7,13 +7,11 @@
#include "gm.h"
#include "sk_tool_utils.h"
-
#include "SkCanvas.h"
#include "SkPaint.h"
#include "SkPath.h"
#include "SkRandom.h"
#include "SkTemplates.h"
-#include "SkTo.h"
static void strokePath(SkCanvas* canvas, const SkPath& path) {
SkPaint paint;
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp
index 4139ca802b..8a26a0066e 100644
--- a/gm/imagefromyuvtextures.cpp
+++ b/gm/imagefromyuvtextures.cpp
@@ -16,7 +16,6 @@
#include "SkBitmap.h"
#include "SkGradientShader.h"
#include "SkImage.h"
-#include "SkTo.h"
namespace skiagm {
class ImageFromYUVTextures : public GM {
diff --git a/gm/pdf_never_embed.cpp b/gm/pdf_never_embed.cpp
index adaf78b450..e090c5a5b8 100644
--- a/gm/pdf_never_embed.cpp
+++ b/gm/pdf_never_embed.cpp
@@ -6,7 +6,6 @@
*/
#include "Resources.h"
-#include "SkTo.h"
#include "SkTypeface.h"
#include "gm.h"
diff --git a/gm/scaledemoji.cpp b/gm/scaledemoji.cpp
index b71c470902..ac8b3c6d51 100644
--- a/gm/scaledemoji.cpp
+++ b/gm/scaledemoji.cpp
@@ -11,7 +11,6 @@
#include "Resources.h"
#include "SkCanvas.h"
#include "SkStream.h"
-#include "SkTo.h"
#include "SkTypeface.h"
namespace skiagm {
diff --git a/gm/tallstretchedbitmaps.cpp b/gm/tallstretchedbitmaps.cpp
index a16f54ac96..b70ae3dc35 100644
--- a/gm/tallstretchedbitmaps.cpp
+++ b/gm/tallstretchedbitmaps.cpp
@@ -6,12 +6,10 @@
*/
#include "gm.h"
-
#include "SkCanvas.h"
#include "SkGradientShader.h"
#include "SkPath.h"
#include "SkRandom.h"
-#include "SkTo.h"
int make_bm(SkBitmap* bm, int height) {
constexpr int kRadius = 22;
diff --git a/gm/texteffects.cpp b/gm/texteffects.cpp
index 74675d7289..de149ae9d4 100644
--- a/gm/texteffects.cpp
+++ b/gm/texteffects.cpp
@@ -7,12 +7,10 @@
#include "gm.h"
#include "sk_tool_utils.h"
-
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkReadBuffer.h"
#include "SkTextBlob.h"
-#include "SkTo.h"
#include "SkWriteBuffer.h"
#include "Sk2DPathEffect.h"
diff --git a/include/core/SkColorPriv.h b/include/core/SkColorPriv.h
index 188ce6a172..0cd02e8034 100644
--- a/include/core/SkColorPriv.h
+++ b/include/core/SkColorPriv.h
@@ -8,7 +8,6 @@
#ifndef SkColorPriv_DEFINED
#define SkColorPriv_DEFINED
-#include "../private/SkTo.h"
#include "SkColor.h"
#include "SkMath.h"
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h
index 80a51cf242..f09b8d6b03 100644
--- a/include/core/SkImageInfo.h
+++ b/include/core/SkImageInfo.h
@@ -22,9 +22,7 @@
#include "SkMath.h"
#include "SkRect.h"
#include "SkSize.h"
-
#include "../private/SkTFitsIn.h"
-#include "../private/SkTo.h"
class SkReadBuffer;
class SkWriteBuffer;
diff --git a/include/core/SkMath.h b/include/core/SkMath.h
index 19ab2f8c68..fb551abb40 100644
--- a/include/core/SkMath.h
+++ b/include/core/SkMath.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2006 The Android Open Source Project
*
@@ -9,7 +10,6 @@
#ifndef SkMath_DEFINED
#define SkMath_DEFINED
-#include "../private/SkTo.h"
#include "SkTypes.h"
// 64bit -> 32bit utilities
diff --git a/include/core/SkMatrix.h b/include/core/SkMatrix.h
index 84f805c637..4fadf984a4 100644
--- a/include/core/SkMatrix.h
+++ b/include/core/SkMatrix.h
@@ -19,7 +19,6 @@
#define SkMatrix_DEFINED
#include "../private/SkMacros.h"
-#include "../private/SkTo.h"
#include "SkRect.h"
struct SkRSXform;
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 3d471d15ff..4c82e50f00 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -18,7 +18,6 @@
#ifndef SkPaint_DEFINED
#define SkPaint_DEFINED
-#include "../private/SkTo.h"
#include "SkBlendMode.h"
#include "SkColor.h"
#include "SkFilterQuality.h"
diff --git a/include/core/SkPath.h b/include/core/SkPath.h
index 9906827ba8..64ab531536 100644
--- a/include/core/SkPath.h
+++ b/include/core/SkPath.h
@@ -20,7 +20,6 @@
#include "SkMatrix.h"
#include "../private/SkPathRef.h"
-#include "../private/SkTo.h"
class SkAutoPathBoundsUpdate;
class SkData;
diff --git a/include/core/SkStream.h b/include/core/SkStream.h
index d73c8a097e..2d9f9db120 100644
--- a/include/core/SkStream.h
+++ b/include/core/SkStream.h
@@ -8,7 +8,6 @@
#ifndef SkStream_DEFINED
#define SkStream_DEFINED
-#include "../private/SkTo.h"
#include "SkData.h"
#include "SkRefCnt.h"
#include "SkScalar.h"
diff --git a/include/core/SkString.h b/include/core/SkString.h
index aa3292abfe..c2fd9c0e36 100644
--- a/include/core/SkString.h
+++ b/include/core/SkString.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2006 The Android Open Source Project
*
@@ -10,9 +11,8 @@
#define SkString_DEFINED
#include "../private/SkTArray.h"
-#include "../private/SkTo.h"
-#include "SkRefCnt.h"
#include "SkScalar.h"
+#include "SkRefCnt.h"
#include <atomic>
#include <stdarg.h>
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index ba747ef2f1..3e9dea6b21 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -102,6 +102,26 @@ typedef int S16CPU;
*/
typedef unsigned U16CPU;
+/**
+ * Meant to be a small version of bool, for storage purposes. Will be 0 or 1
+ */
+typedef uint8_t SkBool8;
+
+#include "../private/SkTFitsIn.h"
+template <typename D, typename S> constexpr D SkTo(S s) {
+ return SkASSERT(SkTFitsIn<D>(s)),
+ static_cast<D>(s);
+}
+#define SkToS8(x) SkTo<int8_t>(x)
+#define SkToU8(x) SkTo<uint8_t>(x)
+#define SkToS16(x) SkTo<int16_t>(x)
+#define SkToU16(x) SkTo<uint16_t>(x)
+#define SkToS32(x) SkTo<int32_t>(x)
+#define SkToU32(x) SkTo<uint32_t>(x)
+#define SkToInt(x) SkTo<int>(x)
+#define SkToUInt(x) SkTo<unsigned>(x)
+#define SkToSizeT(x) SkTo<size_t>(x)
+
/** Returns 0 or 1 based on the condition
*/
#define SkToBool(cond) ((cond) != 0)
diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h
index 90b84d72bf..0240387a6b 100644
--- a/include/gpu/GrResourceKey.h
+++ b/include/gpu/GrResourceKey.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2014 Google Inc.
*
@@ -10,7 +11,6 @@
#include "../private/SkOnce.h"
#include "../private/SkTemplates.h"
-#include "../private/SkTo.h"
#include "GrTypes.h"
#include "SkData.h"
#include "SkString.h"
diff --git a/include/private/SkFixed.h b/include/private/SkFixed.h
index 0d15e02aa9..15062f55b3 100644
--- a/include/private/SkFixed.h
+++ b/include/private/SkFixed.h
@@ -8,9 +8,9 @@
#ifndef SkFixed_DEFINED
#define SkFixed_DEFINED
-#include "SkSafe_math.h"
#include "SkScalar.h"
-#include "SkTo.h"
+#include "SkSafe_math.h"
+
#include "SkTypes.h"
/** \file SkFixed.h
diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h
index 5a5a04118c..5f64f1ae07 100644
--- a/include/private/SkPathRef.h
+++ b/include/private/SkPathRef.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2012 Google Inc.
*
@@ -8,16 +9,14 @@
#ifndef SkPathRef_DEFINED
#define SkPathRef_DEFINED
-#include "SkAtomics.h"
+#include "../private/SkAtomics.h"
+#include "../private/SkTDArray.h"
#include "SkMatrix.h"
#include "SkPoint.h"
#include "SkRRect.h"
#include "SkRect.h"
#include "SkRefCnt.h"
-#include "SkTDArray.h"
#include "SkTemplates.h"
-#include "SkTo.h"
-
#include <limits>
class SkRBuffer;
diff --git a/include/private/SkTDArray.h b/include/private/SkTDArray.h
index dd3212d0dd..b030dc5627 100644
--- a/include/private/SkTDArray.h
+++ b/include/private/SkTDArray.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2006 The Android Open Source Project
*
@@ -9,9 +10,8 @@
#ifndef SkTDArray_DEFINED
#define SkTDArray_DEFINED
-#include "SkMalloc.h"
-#include "SkTo.h"
#include "SkTypes.h"
+#include "SkMalloc.h"
template <typename T> class SkTDArray {
public:
diff --git a/include/private/SkTo.h b/include/private/SkTo.h
deleted file mode 100644
index 9b5b7fd164..0000000000
--- a/include/private/SkTo.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright 2018 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-#ifndef SkTo_DEFINED
-#define SkTo_DEFINED
-
-#include "SkTypes.h"
-#include "SkTFitsIn.h"
-
-template <typename D, typename S> constexpr D SkTo(S s) {
- return SkASSERT(SkTFitsIn<D>(s)),
- static_cast<D>(s);
-}
-
-template <typename S> constexpr int8_t SkToS8(S x) { return SkTo<int8_t>(x); }
-template <typename S> constexpr uint8_t SkToU8(S x) { return SkTo<uint8_t>(x); }
-template <typename S> constexpr int16_t SkToS16(S x) { return SkTo<int16_t>(x); }
-template <typename S> constexpr uint16_t SkToU16(S x) { return SkTo<uint16_t>(x); }
-template <typename S> constexpr int32_t SkToS32(S x) { return SkTo<int32_t>(x); }
-template <typename S> constexpr uint32_t SkToU32(S x) { return SkTo<uint32_t>(x); }
-template <typename S> constexpr int SkToInt(S x) { return SkTo<int>(x); }
-template <typename S> constexpr unsigned SkToUInt(S x) { return SkTo<unsigned>(x); }
-template <typename S> constexpr size_t SkToSizeT(S x) { return SkTo<size_t>(x); }
-
-#endif // SkTo_DEFINED
diff --git a/include/utils/SkInterpolator.h b/include/utils/SkInterpolator.h
index f426263be7..31d50eeac7 100644
--- a/include/utils/SkInterpolator.h
+++ b/include/utils/SkInterpolator.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2006 The Android Open Source Project
*
@@ -9,7 +10,6 @@
#ifndef SkInterpolator_DEFINED
#define SkInterpolator_DEFINED
-#include "../private/SkTo.h"
#include "SkScalar.h"
class SK_API SkInterpolatorBase : SkNoncopyable {
diff --git a/modules/skjson/src/SkJSON.cpp b/modules/skjson/src/SkJSON.cpp
index 8af85ba695..c9a4d7c51d 100644
--- a/modules/skjson/src/SkJSON.cpp
+++ b/modules/skjson/src/SkJSON.cpp
@@ -9,7 +9,6 @@
#include "SkStream.h"
#include "SkString.h"
-#include "SkTo.h"
#include <cmath>
#include <vector>
diff --git a/modules/skottie/src/Skottie.cpp b/modules/skottie/src/Skottie.cpp
index 229b5c600a..93c71e936a 100644
--- a/modules/skottie/src/Skottie.cpp
+++ b/modules/skottie/src/Skottie.cpp
@@ -8,6 +8,10 @@
#include "Skottie.h"
#include "SkCanvas.h"
+#include "SkottieAdapter.h"
+#include "SkottieAnimator.h"
+#include "SkottieJson.h"
+#include "SkottieValue.h"
#include "SkData.h"
#include "SkImage.h"
#include "SkMakeUnique.h"
@@ -34,13 +38,8 @@
#include "SkSGTrimEffect.h"
#include "SkStream.h"
#include "SkTArray.h"
-#include "SkTHash.h"
#include "SkTime.h"
-#include "SkTo.h"
-#include "SkottieAdapter.h"
-#include "SkottieAnimator.h"
-#include "SkottieJson.h"
-#include "SkottieValue.h"
+#include "SkTHash.h"
#include <cmath>
#include <vector>
diff --git a/modules/skottie/src/SkottieAdapter.cpp b/modules/skottie/src/SkottieAdapter.cpp
index 2caf570eff..a01599ccf6 100644
--- a/modules/skottie/src/SkottieAdapter.cpp
+++ b/modules/skottie/src/SkottieAdapter.cpp
@@ -8,6 +8,7 @@
#include "SkottieAdapter.h"
#include "SkMatrix.h"
+#include "SkottieValue.h"
#include "SkPath.h"
#include "SkRRect.h"
#include "SkSGGradient.h"
@@ -15,8 +16,6 @@
#include "SkSGRect.h"
#include "SkSGTransform.h"
#include "SkSGTrimEffect.h"
-#include "SkTo.h"
-#include "SkottieValue.h"
#include <cmath>
diff --git a/modules/sksg/include/SkSGGroup.h b/modules/sksg/include/SkSGGroup.h
index b32f9af24f..482f10db8c 100644
--- a/modules/sksg/include/SkSGGroup.h
+++ b/modules/sksg/include/SkSGGroup.h
@@ -9,8 +9,8 @@
#define SkSGGroup_DEFINED
#include "SkSGRenderNode.h"
+
#include "SkTArray.h"
-#include "SkTo.h"
namespace sksg {
diff --git a/modules/sksg/tests/SGTest.cpp b/modules/sksg/tests/SGTest.cpp
index e098171db8..1228e666e7 100644
--- a/modules/sksg/tests/SGTest.cpp
+++ b/modules/sksg/tests/SGTest.cpp
@@ -5,19 +5,17 @@
* found in the LICENSE file.
*/
-#include "SkTypes.h"
+#include "SkRect.h"
+#include "SkRectPriv.h"
#if !defined(SK_BUILD_FOR_GOOGLE3)
-#include "SkRect.h"
-#include "SkRectPriv.h"
#include "SkSGColor.h"
#include "SkSGDraw.h"
#include "SkSGGroup.h"
#include "SkSGInvalidationController.h"
#include "SkSGRect.h"
#include "SkSGTransform.h"
-#include "SkTo.h"
#include "Test.h"
diff --git a/modules/skshaper/src/SkShaper_harfbuzz.cpp b/modules/skshaper/src/SkShaper_harfbuzz.cpp
index 94c899d01e..40414d9a79 100644
--- a/modules/skshaper/src/SkShaper_harfbuzz.cpp
+++ b/modules/skshaper/src/SkShaper_harfbuzz.cpp
@@ -23,7 +23,6 @@
#include "SkTLazy.h"
#include "SkTemplates.h"
#include "SkTextBlob.h"
-#include "SkTo.h"
#include "SkTypeface.h"
#include "SkUtils.h"
diff --git a/modules/skshaper/src/SkShaper_primitive.cpp b/modules/skshaper/src/SkShaper_primitive.cpp
index e6b42771c0..06a8bec41c 100644
--- a/modules/skshaper/src/SkShaper_primitive.cpp
+++ b/modules/skshaper/src/SkShaper_primitive.cpp
@@ -4,12 +4,9 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
#include "SkShaper.h"
-
#include "SkStream.h"
#include "SkTextBlob.h"
-#include "SkTo.h"
#include "SkTypeface.h"
struct SkShaper::Impl {
diff --git a/samplecode/SampleHairline.cpp b/samplecode/SampleHairline.cpp
index b90e99e719..51fff8df79 100644
--- a/samplecode/SampleHairline.cpp
+++ b/samplecode/SampleHairline.cpp
@@ -7,10 +7,9 @@
#include "SampleCode.h"
#include "SkAnimTimer.h"
+#include "SkView.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
-#include "SkColorFilter.h"
-#include "SkColorPriv.h"
#include "SkCornerPathEffect.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
@@ -18,12 +17,13 @@
#include "SkRandom.h"
#include "SkRegion.h"
#include "SkShader.h"
-#include "SkStream.h"
+#include "SkUtils.h"
+#include "SkColorPriv.h"
+#include "SkColorFilter.h"
#include "SkTime.h"
-#include "SkTo.h"
#include "SkTypeface.h"
-#include "SkUtils.h"
-#include "SkView.h"
+#include "SkStream.h"
+#include "SkColorPriv.h"
static SkRandom gRand;
diff --git a/samplecode/SamplePathClip.cpp b/samplecode/SamplePathClip.cpp
index 2db72c9f75..029b1c9dc9 100644
--- a/samplecode/SamplePathClip.cpp
+++ b/samplecode/SamplePathClip.cpp
@@ -4,21 +4,19 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
#include "SampleCode.h"
+#include "SkView.h"
#include "SkCanvas.h"
-#include "SkColorFilter.h"
-#include "SkColorPriv.h"
#include "SkGradientShader.h"
#include "SkGraphics.h"
#include "SkPath.h"
#include "SkRegion.h"
#include "SkShader.h"
+#include "SkUtils.h"
+#include "SkColorPriv.h"
+#include "SkColorFilter.h"
#include "SkTime.h"
-#include "SkTo.h"
#include "SkTypeface.h"
-#include "SkUtils.h"
-#include "SkView.h"
class PathClipView : public SampleView {
public:
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
index fd95590bd1..d44258f9b0 100644
--- a/src/codec/SkJpegCodec.cpp
+++ b/src/codec/SkJpegCodec.cpp
@@ -14,7 +14,6 @@
#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 8d4beb12cb..b5fd591729 100644
--- a/src/codec/SkWbmpCodec.cpp
+++ b/src/codec/SkWbmpCodec.cpp
@@ -5,15 +5,13 @@
* 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 "SkTo.h"
+#include "SkWbmpCodec.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 e26f46d074..2f9420bd74 100644
--- a/src/codec/SkWebpCodec.cpp
+++ b/src/codec/SkWebpCodec.cpp
@@ -5,9 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkWebpCodec.h"
-
-#include "../jumper/SkJumper.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkCodecAnimation.h"
@@ -19,7 +16,8 @@
#include "SkSampler.h"
#include "SkStreamPriv.h"
#include "SkTemplates.h"
-#include "SkTo.h"
+#include "SkWebpCodec.h"
+#include "../jumper/SkJumper.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 46c09e0ca5..fc8f7715c9 100644
--- a/src/core/SkAAClip.cpp
+++ b/src/core/SkAAClip.cpp
@@ -6,7 +6,6 @@
*/
#include "SkAAClip.h"
-
#include "SkAtomics.h"
#include "SkBlitter.h"
#include "SkColorData.h"
@@ -14,7 +13,6 @@
#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 c5c4d15834..37f57c1fa8 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 60c956aaf8..e2da09023d 100644
--- a/src/core/SkAnalyticEdge.cpp
+++ b/src/core/SkAnalyticEdge.cpp
@@ -5,11 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkAnalyticEdge.h"
+#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 b18ccac918..5e8403f5ec 100644
--- a/src/core/SkAnalyticEdge.h
+++ b/src/core/SkAnalyticEdge.h
@@ -9,7 +9,6 @@
#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 92aabff0cd..8b19036d6c 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 14bbe76eed..29a1a56aae 100644
--- a/src/core/SkBitmap.cpp
+++ b/src/core/SkBitmap.cpp
@@ -5,9 +5,8 @@
* found in the LICENSE file.
*/
-#include "SkBitmap.h"
-
#include "SkAtomics.h"
+#include "SkBitmap.h"
#include "SkColorData.h"
#include "SkConvertPixels.h"
#include "SkData.h"
@@ -24,7 +23,6 @@
#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 2fd1b9b1b5..f9e3c82a00 100644
--- a/src/core/SkBitmapProcState_matrixProcs.cpp
+++ b/src/core/SkBitmapProcState_matrixProcs.cpp
@@ -14,11 +14,10 @@
*/
#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 b40b45c4e6..ec35ca108d 100644
--- a/src/core/SkBitmapProcState_utils.h
+++ b/src/core/SkBitmapProcState_utils.h
@@ -8,8 +8,6 @@
#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 7a45981b80..ee6100ad40 100644
--- a/src/core/SkBlitter.cpp
+++ b/src/core/SkBlitter.cpp
@@ -5,23 +5,21 @@
* 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 fc3bf8bce6..cf3edd31eb 100644
--- a/src/core/SkBlitter.h
+++ b/src/core/SkBlitter.h
@@ -15,7 +15,6 @@
#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 b36bc0c61e..4b8293c584 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 "SkBlurMask.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 0338e7601e..7dfe2bb65e 100644
--- a/src/core/SkBuffer.h
+++ b/src/core/SkBuffer.h
@@ -5,11 +5,10 @@
* 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 494bd3b837..8494bdb753 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -5,55 +5,53 @@
* 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 "SkTo.h"
+#include "SkTLazy.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 3e61c18ae3..3fc0113105 100644
--- a/src/core/SkColorData.h
+++ b/src/core/SkColorData.h
@@ -15,7 +15,6 @@
#include "SkColor.h"
#include "SkColorPriv.h"
-#include "SkTo.h"
//////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h
index 7f1939dcc2..84672e59a1 100644
--- a/src/core/SkDescriptor.h
+++ b/src/core/SkDescriptor.h
@@ -10,9 +10,7 @@
#include "SkMacros.h"
#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 aea08c55ab..aa9b1e2c34 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -6,7 +6,6 @@
*/
#include "SkDevice.h"
-
#include "SkColorFilter.h"
#include "SkDraw.h"
#include "SkDrawFilter.h"
@@ -29,7 +28,6 @@
#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 58489b9ec8..69eadbe1d5 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -5,7 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkDraw.h"
+#define __STDC_LIMIT_MACROS
#include "SkArenaAlloc.h"
#include "SkAutoBlitterChoose.h"
@@ -14,6 +14,7 @@
#include "SkCanvas.h"
#include "SkColorData.h"
#include "SkDevice.h"
+#include "SkDraw.h"
#include "SkDrawProcs.h"
#include "SkFindAndPlaceGlyph.h"
#include "SkMaskFilterBase.h"
@@ -23,20 +24,19 @@
#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 "SkTo.h"
+#include "SkTLazy.h"
#include "SkUtils.h"
static SkPaint make_paint_with_image(
diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp
index 0a19e53221..1bb8e9e0d4 100644
--- a/src/core/SkEdge.cpp
+++ b/src/core/SkEdge.cpp
@@ -5,11 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkEdge.h"
+#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 7fc685136a..509c0c448a 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 48c1bca5ac..b7d80b047c 100644
--- a/src/core/SkEdgeBuilder.cpp
+++ b/src/core/SkEdgeBuilder.cpp
@@ -4,17 +4,14 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-
#include "SkEdgeBuilder.h"
-
-#include "SkAnalyticEdge.h"
#include "SkEdge.h"
+#include "SkAnalyticEdge.h"
#include "SkEdgeClipper.h"
-#include "SkGeometry.h"
#include "SkLineClipper.h"
+#include "SkGeometry.h"
#include "SkPath.h"
#include "SkPathPriv.h"
-#include "SkTo.h"
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/SkFDot6.h b/src/core/SkFDot6.h
index 57e7d6a924..004666115e 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 "SkMath.h"
#include "SkScalar.h"
-#include "SkTo.h"
+#include "SkMath.h"
typedef int32_t SkFDot6;
diff --git a/src/core/SkFont.cpp b/src/core/SkFont.cpp
index bde8c4c80b..77259ff50c 100644
--- a/src/core/SkFont.cpp
+++ b/src/core/SkFont.cpp
@@ -6,8 +6,6 @@
*/
#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 2b3adafd74..06c0e422ce 100644
--- a/src/core/SkGlyph.h
+++ b/src/core/SkGlyph.h
@@ -12,7 +12,6 @@
#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 caea07a076..6209b58c69 100644
--- a/src/core/SkGlyphRun.cpp
+++ b/src/core/SkGlyphRun.cpp
@@ -14,12 +14,11 @@
#include "SkDevice.h"
#include "SkDraw.h"
#include "SkGlyphCache.h"
-#include "SkMSAN.h"
#include "SkMakeUnique.h"
+#include "SkMSAN.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 735f1670cb..27052b3f2a 100644
--- a/src/core/SkIPoint16.h
+++ b/src/core/SkIPoint16.h
@@ -8,7 +8,6 @@
#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 73a18192c9..62da6d0bf4 100644
--- a/src/core/SkLineClipper.cpp
+++ b/src/core/SkLineClipper.cpp
@@ -6,7 +6,6 @@
*/
#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 5ae14e10c3..8838d47ac0 100644
--- a/src/core/SkMD5.h
+++ b/src/core/SkMD5.h
@@ -9,7 +9,6 @@
#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 7336116f93..b3a6543706 100644
--- a/src/core/SkMask.cpp
+++ b/src/core/SkMask.cpp
@@ -6,10 +6,8 @@
*/
#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 2c8cda5c97..ea3d8ab572 100644
--- a/src/core/SkMaskBlurFilter.cpp
+++ b/src/core/SkMaskBlurFilter.cpp
@@ -5,15 +5,13 @@
* 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 e231d92d4b..bbe72c4e35 100644
--- a/src/core/SkMaskGamma.cpp
+++ b/src/core/SkMaskGamma.cpp
@@ -5,12 +5,11 @@
* found in the LICENSE file.
*/
-#include "SkMaskGamma.h"
+#include "SkTypes.h"
#include "SkColor.h"
#include "SkFloatingPoint.h"
-#include "SkTo.h"
-#include "SkTypes.h"
+#include "SkMaskGamma.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 cb4b792a6b..d3bdb38b78 100644
--- a/src/core/SkMatrix.cpp
+++ b/src/core/SkMatrix.cpp
@@ -5,8 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkMatrix.h"
-
#include "SkFloatBits.h"
#include "SkMathPriv.h"
#include "SkMatrixPriv.h"
@@ -15,7 +13,6 @@
#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 e960321700..d1564e9fec 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 f5696824b6..edb800f264 100644
--- a/src/core/SkMipMap.cpp
+++ b/src/core/SkMipMap.cpp
@@ -6,7 +6,6 @@
*/
#include "SkMipMap.h"
-
#include "SkBitmap.h"
#include "SkColorData.h"
#include "SkHalf.h"
@@ -15,7 +14,6 @@
#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 1636dde774..953654063a 100644
--- a/src/core/SkNx.h
+++ b/src/core/SkNx.h
@@ -11,8 +11,6 @@
#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 25bc7fb160..e5bf5a6325 100644
--- a/src/core/SkOverdrawCanvas.cpp
+++ b/src/core/SkOverdrawCanvas.cpp
@@ -5,14 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkOverdrawCanvas.h"
-
#include "SkColorFilter.h"
-#include "SkDrawShadowInfo.h"
#include "SkDrawable.h"
+#include "SkDrawShadowInfo.h"
#include "SkFindAndPlaceGlyph.h"
#include "SkImagePriv.h"
#include "SkLatticeIter.h"
+#include "SkOverdrawCanvas.h"
#include "SkPatchUtils.h"
#include "SkPath.h"
#include "SkRRect.h"
@@ -20,7 +19,6 @@
#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 7643bab737..c76b98121e 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 "SkGlyphCache.h"
#include "SkGraphics.h"
+#include "SkGlyphCache.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,14 +31,12 @@
#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 "SkTo.h"
+#include "SkTLazy.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 e38d736294..d80ceeefe2 100644
--- a/src/core/SkPath.cpp
+++ b/src/core/SkPath.cpp
@@ -5,8 +5,7 @@
* found in the LICENSE file.
*/
-#include "SkPath.h"
-
+#include <cmath>
#include "SkBuffer.h"
#include "SkCubicClipper.h"
#include "SkData.h"
@@ -19,9 +18,6 @@
#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 20d3131607..58782df260 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -5,15 +5,13 @@
* 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 6a372e6dcd..e538a462db 100644
--- a/src/core/SkPath_serial.cpp
+++ b/src/core/SkPath_serial.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+#include <cmath>
#include "SkBuffer.h"
#include "SkData.h"
#include "SkMath.h"
@@ -12,9 +13,6 @@
#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 ad83031546..34fa558ef5 100644
--- a/src/core/SkPicture.cpp
+++ b/src/core/SkPicture.cpp
@@ -5,8 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkPicture.h"
-
#include "SkAtomics.h"
#include "SkImageGenerator.h"
#include "SkMathPriv.h"
@@ -17,7 +15,6 @@
#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 bd2be63621..3d34b27bf6 100644
--- a/src/core/SkPictureData.cpp
+++ b/src/core/SkPictureData.cpp
@@ -5,20 +5,18 @@
* found in the LICENSE file.
*/
-#include "SkPictureData.h"
+#include <new>
#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 87c8c4d2fb..32748c109c 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -6,9 +6,7 @@
*/
#include "SkPictureRecord.h"
-
#include "SkCanvasPriv.h"
-#include "SkClipOpPriv.h"
#include "SkDrawShadowInfo.h"
#include "SkImage_Base.h"
#include "SkMatrixPriv.h"
@@ -16,9 +14,9 @@
#include "SkPixelRef.h"
#include "SkRRect.h"
#include "SkRSXform.h"
-#include "SkTSearch.h"
#include "SkTextBlob.h"
-#include "SkTo.h"
+#include "SkTSearch.h"
+#include "SkClipOpPriv.h"
#define HEAP_BLOCK_SIZE 4096
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index ad2dbdfd24..9490f533ef 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -16,7 +16,6 @@
#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 aad9e34222..446f25b2f2 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -5,16 +5,14 @@
* 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"
@@ -22,7 +20,6 @@
#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 69e4a2ec73..ef33f91cc5 100644
--- a/src/core/SkRWBuffer.cpp
+++ b/src/core/SkRWBuffer.cpp
@@ -8,10 +8,9 @@
#include "SkRWBuffer.h"
#include "SkAtomics.h"
-#include "SkMakeUnique.h"
#include "SkMalloc.h"
+#include "SkMakeUnique.h"
#include "SkStream.h"
-#include "SkTo.h"
#include <atomic>
#include <new>
diff --git a/src/core/SkRasterPipelineBlitter.cpp b/src/core/SkRasterPipelineBlitter.cpp
index 8b37bef24f..aa6b6e94c2 100644
--- a/src/core/SkRasterPipelineBlitter.cpp
+++ b/src/core/SkRasterPipelineBlitter.cpp
@@ -5,10 +5,9 @@
* found in the LICENSE file.
*/
-#include "../jumper/SkJumper.h"
#include "SkArenaAlloc.h"
-#include "SkBlendModePriv.h"
#include "SkBlitter.h"
+#include "SkBlendModePriv.h"
#include "SkColor.h"
#include "SkColorFilter.h"
#include "SkColorSpaceXformer.h"
@@ -18,8 +17,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 65dcd7bb4b..7d8a849518 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -5,16 +5,13 @@
* 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 3d48f3696b..1330067e92 100644
--- a/src/core/SkRegion.cpp
+++ b/src/core/SkRegion.cpp
@@ -5,14 +5,12 @@
* found in the LICENSE file.
*/
-#include "SkRegion.h"
#include "SkAtomics.h"
#include "SkMacros.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 e0e46b2c1d..08db564174 100644
--- a/src/core/SkRegionPriv.h
+++ b/src/core/SkRegionPriv.h
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+
#ifndef SkRegionPriv_DEFINED
#define SkRegionPriv_DEFINED
@@ -12,7 +13,6 @@
#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 e54e251fa9..4fb6826f95 100644
--- a/src/core/SkRegion_path.cpp
+++ b/src/core/SkRegion_path.cpp
@@ -5,14 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkBlitter.h"
-#include "SkPath.h"
#include "SkRegionPriv.h"
+#include "SkBlitter.h"
#include "SkSafeMath.h"
#include "SkScan.h"
-#include "SkTDArray.h"
#include "SkTSort.h"
-#include "SkTo.h"
+#include "SkTDArray.h"
+#include "SkPath.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 0e8ceb1947..5928b48b07 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -5,14 +5,12 @@
* found in the LICENSE file.
*/
-#include "SkResourceCache.h"
-
#include "SkDiscardableMemory.h"
#include "SkMessageBus.h"
#include "SkMipMap.h"
#include "SkMutex.h"
#include "SkOpts.h"
-#include "SkTo.h"
+#include "SkResourceCache.h"
#include "SkTraceMemoryDump.h"
#include <stddef.h>
diff --git a/src/core/SkSafeMath.h b/src/core/SkSafeMath.h
index c092272175..f54be32fce 100644
--- a/src/core/SkSafeMath.h
+++ b/src/core/SkSafeMath.h
@@ -8,7 +8,6 @@
#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 3089ee9755..b4a356556b 100644
--- a/src/core/SkScalerContext.cpp
+++ b/src/core/SkScalerContext.cpp
@@ -29,7 +29,6 @@
#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 bd649e7aef..5e7f232ff7 100644
--- a/src/core/SkScan_AAAPath.cpp
+++ b/src/core/SkScan_AAAPath.cpp
@@ -20,7 +20,6 @@
#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 9c64f32496..45bc2e2ea6 100644
--- a/src/core/SkScan_AntiPath.cpp
+++ b/src/core/SkScan_AntiPath.cpp
@@ -5,16 +5,15 @@
* found in the LICENSE file.
*/
-#include "SkScanPriv.h"
-#include "SkAntiRun.h"
-#include "SkBlitter.h"
-#include "SkCoverageDelta.h"
-#include "SkMatrix.h"
+#include "SkScanPriv.h"
#include "SkPath.h"
#include "SkPathPriv.h"
+#include "SkMatrix.h"
+#include "SkBlitter.h"
#include "SkRegion.h"
-#include "SkTo.h"
+#include "SkAntiRun.h"
+#include "SkCoverageDelta.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 37faed4850..a552253ffa 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -5,14 +5,13 @@
* found in the LICENSE file.
*/
-#include "SkScan.h"
+#include "SkScan.h"
#include "SkBlitter.h"
#include "SkColorData.h"
-#include "SkFDot6.h"
#include "SkLineClipper.h"
#include "SkRasterClip.h"
-#include "SkTo.h"
+#include "SkFDot6.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 f8f43502bb..57fd7f5d02 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -6,17 +6,15 @@
*/
#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 "SkTFitsIn.h"
-#include "SkTo.h"
+#include "SkOSFile.h"
#include "SkTypes.h"
+#include "SkTFitsIn.h"
#include <limits>
diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp
index 7820f1d5bf..a6d9335318 100644
--- a/src/core/SkString.cpp
+++ b/src/core/SkString.cpp
@@ -5,13 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkString.h"
-
#include "SkAtomics.h"
#include "SkSafeMath.h"
-#include "SkTo.h"
+#include "SkString.h"
#include "SkUtils.h"
-
#include <cstdio>
#include <new>
#include <stdarg.h>
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp
index bb216d12d1..3452c7712d 100644
--- a/src/core/SkStroke.cpp
+++ b/src/core/SkStroke.cpp
@@ -6,12 +6,10 @@
*/
#include "SkStrokerPriv.h"
-
#include "SkGeometry.h"
#include "SkMacros.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 189b5cf0d9..b2865726a3 100644
--- a/src/core/SkStroke.h
+++ b/src/core/SkStroke.h
@@ -8,11 +8,10 @@
#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 a97baf9446..e76f5c93f7 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 "SkMathPriv.h"
-#include "SkTo.h"
#include "SkTypes.h"
+#include "SkMathPriv.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 b70b89c2dd..7988925bb3 100644
--- a/src/core/SkTime.cpp
+++ b/src/core/SkTime.cpp
@@ -5,13 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkTime.h"
-
#include "SkLeanWindows.h"
#include "SkString.h"
-#include "SkTo.h"
+#include "SkTime.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 e6fafa0b07..0b92510bb0 100644
--- a/src/core/SkUtils.cpp
+++ b/src/core/SkUtils.cpp
@@ -5,9 +5,8 @@
* found in the LICENSE file.
*/
-#include "SkUtils.h"
-#include "SkTo.h"
+#include "SkUtils.h"
/* 0xxxxxxx 1 total
10xxxxxx // never a leading byte
@@ -414,4 +413,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' };
+ { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; \ No newline at end of file
diff --git a/src/core/SkVertices.cpp b/src/core/SkVertices.cpp
index 4aa56c8e43..e23d65f7a9 100644
--- a/src/core/SkVertices.cpp
+++ b/src/core/SkVertices.cpp
@@ -5,14 +5,12 @@
* found in the LICENSE file.
*/
-#include "SkVertices.h"
-
#include "SkAtomics.h"
+#include "SkVertices.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 a40e9abaa8..b793dbf2dc 100644
--- a/src/core/SkWriteBuffer.cpp
+++ b/src/core/SkWriteBuffer.cpp
@@ -6,7 +6,6 @@
*/
#include "SkWriteBuffer.h"
-
#include "SkBitmap.h"
#include "SkData.h"
#include "SkDeduper.h"
@@ -15,7 +14,6 @@
#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 b1638e413d..3261aad36f 100644
--- a/src/core/SkWriter32.cpp
+++ b/src/core/SkWriter32.cpp
@@ -8,8 +8,6 @@
#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 de33c5cb65..2143c6b129 100644
--- a/src/core/SkWriter32.h
+++ b/src/core/SkWriter32.h
@@ -1,3 +1,4 @@
+
/*
* Copyright 2008 The Android Open Source Project
*
@@ -5,9 +6,11 @@
* found in the LICENSE file.
*/
+
#ifndef SkWriter32_DEFINED
#define SkWriter32_DEFINED
+#include "../private/SkTemplates.h"
#include "SkData.h"
#include "SkMatrix.h"
#include "SkPath.h"
@@ -18,8 +21,6 @@
#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 830159253a..c1f5f0a2cc 100644
--- a/src/effects/SkDashPathEffect.cpp
+++ b/src/effects/SkDashPathEffect.cpp
@@ -6,14 +6,12 @@
*/
#include "SkDashPathEffect.h"
-
#include "SkDashImpl.h"
#include "SkDashPathPriv.h"
#include "SkFlattenablePriv.h"
#include "SkReadBuffer.h"
-#include "SkStrokeRec.h"
-#include "SkTo.h"
#include "SkWriteBuffer.h"
+#include "SkStrokeRec.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 d4e3741392..e081186564 100644
--- a/src/effects/SkEmbossMask.cpp
+++ b/src/effects/SkEmbossMask.cpp
@@ -5,11 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkEmbossMask.h"
+#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 e46590956c..d2dfed9de1 100644
--- a/src/effects/SkPackBits.cpp
+++ b/src/effects/SkPackBits.cpp
@@ -4,11 +4,8 @@
* 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 12b8fbbf94..dc1c0074bc 100644
--- a/src/effects/SkPaintFlagsDrawFilter.cpp
+++ b/src/effects/SkPaintFlagsDrawFilter.cpp
@@ -6,9 +6,7 @@
*/
#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 fa68d11e51..5dbc784b0a 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -6,15 +6,13 @@
*/
#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 212aa364b5..92a6d04340 100644
--- a/src/gpu/GrClipStackClip.cpp
+++ b/src/gpu/GrClipStackClip.cpp
@@ -13,19 +13,18 @@
#include "GrDrawingManager.h"
#include "GrFixedClip.h"
#include "GrGpuResourcePriv.h"
-#include "GrProxyProvider.h"
#include "GrRenderTargetContextPriv.h"
-#include "GrSWMaskHelper.h"
+#include "GrProxyProvider.h"
#include "GrStencilAttachment.h"
+#include "GrSWMaskHelper.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 0b4354c45b..43c0bb07ca 100644
--- a/src/gpu/GrPathProcessor.cpp
+++ b/src/gpu/GrPathProcessor.cpp
@@ -6,9 +6,7 @@
*/
#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 b73a439688..0a558e06b9 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -4,9 +4,7 @@
* 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"
@@ -14,7 +12,6 @@
#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 f687876270..68fdcdb964 100644
--- a/src/gpu/GrProgramDesc.h
+++ b/src/gpu/GrProgramDesc.h
@@ -12,7 +12,6 @@
#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 8c44ed7705..95102a837b 100644
--- a/src/gpu/GrRect.h
+++ b/src/gpu/GrRect.h
@@ -8,7 +8,6 @@
#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 e8f9739aab..8e41ba69a7 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+
#include "GrResourceCache.h"
#include "GrCaps.h"
@@ -17,7 +18,6 @@
#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 ee8026c463..210cefc7a7 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -6,7 +6,6 @@
*/
#include "SkGpuDevice.h"
-
#include "../private/SkShadowFlags.h"
#include "GrBitmapTextureMaker.h"
#include "GrBlurUtils.h"
@@ -44,7 +43,6 @@
#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 7a134da5c2..f4af7a4679 100644
--- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp
+++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp
@@ -14,7 +14,6 @@
#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 a14fc67351..9df22659dd 100644
--- a/src/gpu/gl/GrGLCreateNullInterface.cpp
+++ b/src/gpu/gl/GrGLCreateNullInterface.cpp
@@ -5,13 +5,12 @@
* found in the LICENSE file.
*/
-#include "GrGLTestInterface.h"
+
#include "GrNonAtomicRef.h"
+#include "gl/GrGLInterface.h"
+#include "GrGLTestInterface.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 7a6d69bce2..3e2c1b48b8 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -7,6 +7,7 @@
#include "GrGLGpu.h"
+#include <cmath>
#include "../private/GrGLSL.h"
#include "GrBackendSemaphore.h"
#include "GrBackendSurface.h"
@@ -34,13 +35,10 @@
#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 f020cdef67..798d29d358 100644
--- a/src/gpu/ops/GrOp.cpp
+++ b/src/gpu/ops/GrOp.cpp
@@ -9,7 +9,6 @@
#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 98228c5709..2301930e93 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -6,7 +6,6 @@
*/
#include "GrTextureOp.h"
-
#include "GrAppliedClip.h"
#include "GrCaps.h"
#include "GrContext.h"
@@ -27,7 +26,6 @@
#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 b63b726079..2fc1f5bca4 100644
--- a/src/gpu/text/GrTextContext.cpp
+++ b/src/gpu/text/GrTextContext.cpp
@@ -4,9 +4,7 @@
* 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"
@@ -17,14 +15,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 dd98125015..a99931188d 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -16,6 +16,7 @@
#include "GrPipeline.h"
#include "GrRenderTargetPriv.h"
#include "GrTexturePriv.h"
+
#include "GrVkAMDMemoryAllocator.h"
#include "GrVkCommandBuffer.h"
#include "GrVkGpuCommandBuffer.h"
@@ -32,13 +33,15 @@
#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 4f166fb977..1efd1eddfe 100644
--- a/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
+++ b/src/opts/SkBitmapProcState_matrixProcs_neon.cpp
@@ -5,10 +5,9 @@
*/
#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 2484123767..efe8f4dd2e 100644
--- a/src/opts/SkBitmapProcState_opts_SSE2.cpp
+++ b/src/opts/SkBitmapProcState_opts_SSE2.cpp
@@ -5,15 +5,13 @@
* 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 6c56eb6b45..3d6800bf30 100644
--- a/src/pdf/SkClusterator.cpp
+++ b/src/pdf/SkClusterator.cpp
@@ -7,7 +7,6 @@
#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 be3e182cd1..6952ec4f11 100644
--- a/src/pdf/SkDeflate.cpp
+++ b/src/pdf/SkDeflate.cpp
@@ -5,12 +5,11 @@
* 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 72e659e71a..df99de4e93 100644
--- a/src/pdf/SkJpegInfo.cpp
+++ b/src/pdf/SkJpegInfo.cpp
@@ -7,8 +7,6 @@
#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 38e5327610..9d86d90bed 100644
--- a/src/pdf/SkPDFBitmap.cpp
+++ b/src/pdf/SkPDFBitmap.cpp
@@ -16,7 +16,6 @@
#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 74e148c867..387f0efacf 100644
--- a/src/pdf/SkPDFConvertType1FontStream.cpp
+++ b/src/pdf/SkPDFConvertType1FontStream.cpp
@@ -6,9 +6,7 @@
*/
#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 4f214c12f0..f4c034e1ef 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -45,7 +45,6 @@
#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 577bac7252..8219ad385e 100644
--- a/src/pdf/SkPDFDocument.cpp
+++ b/src/pdf/SkPDFDocument.cpp
@@ -13,7 +13,6 @@
#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 16f78a66ea..cbb627f797 100644
--- a/src/pdf/SkPDFFont.cpp
+++ b/src/pdf/SkPDFFont.cpp
@@ -5,8 +5,6 @@
* found in the LICENSE file.
*/
-#include "SkPDFFont.h"
-
#include "SkData.h"
#include "SkGlyphCache.h"
#include "SkMacros.h"
@@ -14,6 +12,7 @@
#include "SkPDFCanon.h"
#include "SkPDFConvertType1FontStream.h"
#include "SkPDFDevice.h"
+#include "SkPDFFont.h"
#include "SkPDFMakeCIDGlyphWidthsArray.h"
#include "SkPDFMakeToUnicodeCmap.h"
#include "SkPDFUtils.h"
@@ -21,7 +20,6 @@
#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 b44c1144cc..cab071c747 100644
--- a/src/pdf/SkPDFGraphicState.cpp
+++ b/src/pdf/SkPDFGraphicState.cpp
@@ -5,14 +5,12 @@
* 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 62902c1e23..4d5471d9b3 100644
--- a/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp
+++ b/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp
@@ -5,12 +5,10 @@
* found in the LICENSE file.
*/
-#include "SkPDFMakeCIDGlyphWidthsArray.h"
-
#include "SkBitSet.h"
-#include "SkGlyphCache.h"
+#include "SkPDFMakeCIDGlyphWidthsArray.h"
#include "SkPaint.h"
-#include "SkTo.h"
+#include "SkGlyphCache.h"
// TODO(halcanary): Write unit tests for SkPDFMakeCIDGlyphWidthsArray().
diff --git a/src/pdf/SkPDFMakeToUnicodeCmap.cpp b/src/pdf/SkPDFMakeToUnicodeCmap.cpp
index 4f383e1028..c93aa6f2c5 100644
--- a/src/pdf/SkPDFMakeToUnicodeCmap.cpp
+++ b/src/pdf/SkPDFMakeToUnicodeCmap.cpp
@@ -6,9 +6,7 @@
*/
#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 9234f44ac1..ccb3ef38b5 100644
--- a/src/pdf/SkPDFMetadata.cpp
+++ b/src/pdf/SkPDFMetadata.cpp
@@ -5,12 +5,10 @@
* 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 9e83c7a4c2..56d19b11c0 100644
--- a/src/pdf/SkPDFTypes.cpp
+++ b/src/pdf/SkPDFTypes.cpp
@@ -5,16 +5,13 @@
* 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 434f8ba082..bf3e266b8a 100644
--- a/src/pdf/SkPDFTypes.h
+++ b/src/pdf/SkPDFTypes.h
@@ -14,7 +14,6 @@
#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 d66953c5bd..911595c47c 100644
--- a/src/pipe/SkPipeCanvas.cpp
+++ b/src/pipe/SkPipeCanvas.cpp
@@ -5,23 +5,21 @@
* 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 e75ef2d6a4..3e8e9576dd 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,8 +26,6 @@
#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 5627304956..2a7a4baaac 100644
--- a/src/ports/SkFontHost_FreeType_common.cpp
+++ b/src/ports/SkFontHost_FreeType_common.cpp
@@ -13,7 +13,6 @@
#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 4c06e960a6..3cc51d43f6 100644
--- a/src/ports/SkFontHost_mac.cpp
+++ b/src/ports/SkFontHost_mac.cpp
@@ -42,7 +42,6 @@
#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 85e92ce840..93e1cadbf3 100644
--- a/src/ports/SkFontHost_win.cpp
+++ b/src/ports/SkFontHost_win.cpp
@@ -20,21 +20,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 "SkTo.h"
-#include "SkTypefaceCache.h"
#include "SkTypeface_win.h"
+#include "SkTypefaceCache.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 fa6b9101ea..98d8ca812e 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,7 +29,6 @@
#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 a7bad0d24e..d67350af09 100644
--- a/src/ports/SkTypeface_win_dw.cpp
+++ b/src/ports/SkTypeface_win_dw.cpp
@@ -18,15 +18,14 @@
#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 1bd051cca5..f46f86c2c0 100644
--- a/src/sfnt/SkOTUtils.cpp
+++ b/src/sfnt/SkOTUtils.cpp
@@ -15,7 +15,6 @@
#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 d552803e73..3462f7cd6b 100644
--- a/src/svg/SkSVGDevice.cpp
+++ b/src/svg/SkSVGDevice.cpp
@@ -25,7 +25,6 @@
#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 141adaf29f..d64316d845 100644
--- a/src/utils/SkInterpolator.cpp
+++ b/src/utils/SkInterpolator.cpp
@@ -8,10 +8,9 @@
#include "SkInterpolator.h"
#include "SkFixed.h"
-#include "SkMalloc.h"
#include "SkMath.h"
+#include "SkMalloc.h"
#include "SkTSearch.h"
-#include "SkTo.h"
SkInterpolatorBase::SkInterpolatorBase() {
fStorage = nullptr;
diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
index 887e251ff2..53e8bb33a5 100644
--- a/src/utils/SkLua.cpp
+++ b/src/utils/SkLua.cpp
@@ -30,7 +30,6 @@
#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 c7e3064c9b..53e462af0d 100644
--- a/src/utils/SkLuaCanvas.cpp
+++ b/src/utils/SkLuaCanvas.cpp
@@ -9,7 +9,6 @@
#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 f7081e6d56..493e6d4cfc 100644
--- a/src/utils/SkMultiPictureDocument.cpp
+++ b/src/utils/SkMultiPictureDocument.cpp
@@ -6,7 +6,6 @@
*/
#include "SkMultiPictureDocument.h"
-
#include "SkMultiPictureDocumentPriv.h"
#include "SkNWayCanvas.h"
#include "SkPicture.h"
@@ -14,7 +13,6 @@
#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 a28abdf807..8fafd149d4 100644
--- a/src/utils/SkPatchUtils.cpp
+++ b/src/utils/SkPatchUtils.cpp
@@ -10,7 +10,6 @@
#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 300e23b216..e7a78b0fa6 100644
--- a/src/utils/mac/SkCreateCGImageRef.cpp
+++ b/src/utils/mac/SkCreateCGImageRef.cpp
@@ -12,7 +12,6 @@
#include "SkCGUtils.h"
#include "SkColorData.h"
#include "SkMacros.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 26ee1eae13..6c9098848c 100644
--- a/src/views/SkView.cpp
+++ b/src/views/SkView.cpp
@@ -6,9 +6,7 @@
*/
#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 e6c343515f..2e37dd7807 100644
--- a/src/xml/SkDOM.cpp
+++ b/src/xml/SkDOM.cpp
@@ -5,10 +5,9 @@
* found in the LICENSE file.
*/
-#include "SkDOM.h"
+#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 36e1ab3ea0..23c4e672b5 100644
--- a/src/xml/SkXMLParser.cpp
+++ b/src/xml/SkXMLParser.cpp
@@ -5,14 +5,12 @@
* 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 0be9c5560a..67dcf59d1d 100644
--- a/src/xml/SkXMLWriter.cpp
+++ b/src/xml/SkXMLWriter.cpp
@@ -6,9 +6,7 @@
*/
#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 36d1bd171f..ef5f48881d 100644
--- a/src/xps/SkXPSDevice.cpp
+++ b/src/xps/SkXPSDevice.cpp
@@ -49,7 +49,6 @@
#include "SkTLazy.h"
#include "SkTScopedComPtr.h"
#include "SkTTCFHeader.h"
-#include "SkTo.h"
#include "SkTypefacePriv.h"
#include "SkUtils.h"
#include "SkVertices.h"
diff --git a/tests/Float16Test.cpp b/tests/Float16Test.cpp
index 85f0ad59a6..e67d8f1e79 100644
--- a/tests/Float16Test.cpp
+++ b/tests/Float16Test.cpp
@@ -5,15 +5,14 @@
* found in the LICENSE file.
*/
+#include "Test.h"
#include "SkAutoPixmapStorage.h"
#include "SkColor.h"
#include "SkHalf.h"
#include "SkOpts.h"
-#include "SkPM4f.h"
#include "SkPixmap.h"
+#include "SkPM4f.h"
#include "SkRandom.h"
-#include "SkTo.h"
-#include "Test.h"
#include <cmath>
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 857440c9f9..b5d933d987 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -13,7 +13,6 @@
#include "SkMathPriv.h"
#include "SkPoint.h"
#include "SkRandom.h"
-#include "SkTo.h"
#include "Test.h"
static void test_clz(skiatest::Reporter* reporter) {
diff --git a/tests/PDFDeflateWStreamTest.cpp b/tests/PDFDeflateWStreamTest.cpp
index d32828c29e..3d734c81a1 100644
--- a/tests/PDFDeflateWStreamTest.cpp
+++ b/tests/PDFDeflateWStreamTest.cpp
@@ -11,7 +11,6 @@
#include "SkDeflate.h"
#include "SkRandom.h"
-#include "SkTo.h"
namespace {
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp
index cf69705eb1..2aeedf0330 100644
--- a/tests/PDFGlyphsToUnicodeTest.cpp
+++ b/tests/PDFGlyphsToUnicodeTest.cpp
@@ -13,7 +13,6 @@
#include "SkData.h"
#include "SkPDFMakeToUnicodeCmap.h"
#include "SkStream.h"
-#include "SkTo.h"
static const int kMaximumGlyphCount = SK_MaxU16 + 1;
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index f23c8e34df..d25adea16f 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -14,8 +14,8 @@
#include "SkCanvas.h"
#include "SkClusterator.h"
#include "SkData.h"
-#include "SkDeflate.h"
#include "SkDocument.h"
+#include "SkDeflate.h"
#include "SkImageEncoder.h"
#include "SkImageFilterPriv.h"
#include "SkMakeUnique.h"
@@ -29,7 +29,6 @@
#include "SkScalar.h"
#include "SkSpecialImage.h"
#include "SkStream.h"
-#include "SkTo.h"
#include "SkTypes.h"
#include "sk_tool_utils.h"
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index 2794058ceb..e52308c159 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -13,7 +13,6 @@
#include "SkPath.h"
#include "SkRandom.h"
#include "SkReadBuffer.h"
-#include "SkTo.h"
#include "SkTypeface.h"
#include "SkUtils.h"
#include "SkWriteBuffer.h"
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 30d27c1e1b..565e8d817b 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -21,12 +21,11 @@
#include "SkStream.h"
#include "SkStrokeRec.h"
#include "SkSurface.h"
-#include "SkTo.h"
#include "SkWriter32.h"
#include "Test.h"
-
#include <cmath>
+
static void set_radii(SkVector radii[4], int index, float rad) {
sk_bzero(radii, sizeof(SkVector) * 4);
radii[index].set(rad, rad);
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index d7f4d54ae1..0dc1fc090c 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -18,7 +18,6 @@
#include "ProxyUtils.h"
#include "SkCanvas.h"
#include "SkSurface.h"
-#include "SkTo.h"
// This was made indivisible by 4 to ensure we test setting GL_PACK_ALIGNMENT properly.
static const int X_SIZE = 13;
diff --git a/tests/SVGDeviceTest.cpp b/tests/SVGDeviceTest.cpp
index 4d1d414bf9..6cf533fa1b 100644
--- a/tests/SVGDeviceTest.cpp
+++ b/tests/SVGDeviceTest.cpp
@@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
+
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkData.h"
@@ -13,7 +14,6 @@
#include "SkParse.h"
#include "SkShader.h"
#include "SkStream.h"
-#include "SkTo.h"
#include "Test.h"
#include <string.h>
diff --git a/tests/SkBase64Test.cpp b/tests/SkBase64Test.cpp
index 30bfbce28b..d855ef57ad 100644
--- a/tests/SkBase64Test.cpp
+++ b/tests/SkBase64Test.cpp
@@ -6,7 +6,6 @@
*/
#include "SkBase64.h"
-#include "SkTo.h"
#include "Test.h"
diff --git a/tests/SkPEGTest.cpp b/tests/SkPEGTest.cpp
index 2b51dfd5c5..6773c1b8ca 100644
--- a/tests/SkPEGTest.cpp
+++ b/tests/SkPEGTest.cpp
@@ -9,7 +9,6 @@
#if defined(SK_XML)
#include "SkPEG.h"
-#include "SkTo.h"
using namespace skpeg;
diff --git a/tests/SkRasterPipelineTest.cpp b/tests/SkRasterPipelineTest.cpp
index 4c7658719b..e54c8c8039 100644
--- a/tests/SkRasterPipelineTest.cpp
+++ b/tests/SkRasterPipelineTest.cpp
@@ -5,11 +5,10 @@
* found in the LICENSE file.
*/
-#include "../src/jumper/SkJumper.h"
+#include "Test.h"
#include "SkHalf.h"
#include "SkRasterPipeline.h"
-#include "SkTo.h"
-#include "Test.h"
+#include "../src/jumper/SkJumper.h"
DEF_TEST(SkRasterPipeline, r) {
// Build and run a simple pipeline to exercise SkRasterPipeline,
diff --git a/tests/StreamTest.cpp b/tests/StreamTest.cpp
index 3372ee878a..7cf8d92bc5 100644
--- a/tests/StreamTest.cpp
+++ b/tests/StreamTest.cpp
@@ -14,7 +14,6 @@
#include "SkRandom.h"
#include "SkStream.h"
#include "SkStreamPriv.h"
-#include "SkTo.h"
#include "Test.h"
#include <functional>
diff --git a/tests/TextBlobTest.cpp b/tests/TextBlobTest.cpp
index c94955838c..6aabc45a2a 100644
--- a/tests/TextBlobTest.cpp
+++ b/tests/TextBlobTest.cpp
@@ -8,7 +8,6 @@
#include "SkPaint.h"
#include "SkPoint.h"
#include "SkTextBlobRunIterator.h"
-#include "SkTo.h"
#include "SkTypeface.h"
#include "Test.h"
diff --git a/tests/Time.cpp b/tests/Time.cpp
index 5a07f08925..f6bf9ff3f5 100644
--- a/tests/Time.cpp
+++ b/tests/Time.cpp
@@ -6,7 +6,6 @@
*/
#include "SkTime.h"
-#include "SkTo.h"
#include "Test.h"
// Sanity checks for the GetDateTime function.
diff --git a/tools/fonts/SkTestTypeface.cpp b/tools/fonts/SkTestTypeface.cpp
index 79108ce150..bf3a1a3e9e 100644
--- a/tools/fonts/SkTestTypeface.cpp
+++ b/tools/fonts/SkTestTypeface.cpp
@@ -19,9 +19,8 @@
#include "SkRect.h"
#include "SkScalerContext.h"
#include "SkString.h"
-#include "SkTDArray.h"
#include "SkTestTypeface.h"
-#include "SkTo.h"
+#include "SkTDArray.h"
#include "SkUtils.h"
#include <utility>
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index 00abd957e0..14ba7a0035 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -5,6 +5,8 @@
* found in the LICENSE file.
*/
+#include "GrTest.h"
+#include <algorithm>
#include "GrBackendSurface.h"
#include "GrContextOptions.h"
#include "GrContextPriv.h"
@@ -18,17 +20,14 @@
#include "GrResourceCache.h"
#include "GrSemaphore.h"
#include "GrSurfaceContextPriv.h"
-#include "GrTest.h"
#include "GrTexture.h"
#include "SkGr.h"
#include "SkImage_Gpu.h"
#include "SkMathPriv.h"
#include "SkString.h"
-#include "SkTo.h"
#include "ops/GrMeshDrawOp.h"
#include "text/GrGlyphCache.h"
#include "text/GrTextBlobCache.h"
-#include <algorithm>
namespace GrTest {
diff --git a/tools/gpu/gl/debug/DebugGLTestContext.cpp b/tools/gpu/gl/debug/DebugGLTestContext.cpp
index 59f3c93fa2..2b05693366 100644
--- a/tools/gpu/gl/debug/DebugGLTestContext.cpp
+++ b/tools/gpu/gl/debug/DebugGLTestContext.cpp
@@ -1,3 +1,4 @@
+
/*
* Copyright 2012 Google Inc.
*
@@ -15,10 +16,10 @@
#include "GrTextureObj.h"
#include "GrTextureUnitObj.h"
#include "GrVertexArrayObj.h"
-#include "SkMutex.h"
-#include "SkTo.h"
#include "gl/GrGLTestInterface.h"
+#include "SkMutex.h"
+
namespace {
// Helper macro to make creating an object (where you need to get back a derived type) easier
diff --git a/tools/sk_app/android/surface_glue_android.cpp b/tools/sk_app/android/surface_glue_android.cpp
index 04f8eeaa4c..9766d3a56d 100644
--- a/tools/sk_app/android/surface_glue_android.cpp
+++ b/tools/sk_app/android/surface_glue_android.cpp
@@ -22,7 +22,6 @@
#include "../Application.h"
#include "ResourceFactory.h"
-#include "SkTo.h"
#include "SkTypes.h"
#include "SkUtils.h"
#include "Window_android.h"
diff --git a/tools/skpinfo.cpp b/tools/skpinfo.cpp
index 53ea8f326d..93834bb3a8 100644
--- a/tools/skpinfo.cpp
+++ b/tools/skpinfo.cpp
@@ -6,12 +6,11 @@
*/
#include "SkCommandLineFlags.h"
-#include "SkFontDescriptor.h"
#include "SkPicture.h"
-#include "SkPictureCommon.h"
#include "SkPictureData.h"
+#include "SkPictureCommon.h"
#include "SkStream.h"
-#include "SkTo.h"
+#include "SkFontDescriptor.h"
DEFINE_string2(input, i, "", "skp on which to report");
DEFINE_bool2(version, v, true, "version");
diff --git a/tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp b/tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp
index 4eb01d4fac..b59af6a8d4 100644
--- a/tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp
+++ b/tools/skqp/jni/org_skia_skqp_SkQPRunner.cpp
@@ -16,7 +16,6 @@
#include "ResourceFactory.h"
#include "SkOSPath.h"
#include "SkStream.h"
-#include "SkTo.h"
#include "gm_knowledge.h"
#include "gm_runner.h"
#include "skqp_asset_manager.h"
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 5a5489e67d..65280bc4af 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -5,6 +5,9 @@
* found in the LICENSE file.
*/
+#include "Viewer.h"
+#include <stdlib.h>
+#include <map>
#include "BisectSlide.h"
#include "GMSlide.h"
#include "GrContext.h"
@@ -34,15 +37,10 @@
#include "SkTaskGroup.h"
#include "SkTestFontMgr.h"
#include "SkThreadedBMPDevice.h"
-#include "SkTo.h"
#include "SvgSlide.h"
-#include "Viewer.h"
#include "ccpr/GrCoverageCountingPathRenderer.h"
#include "imgui.h"
-#include <stdlib.h>
-#include <map>
-
#if defined(SK_HAS_SKSG)
#include "SlideDir.h"
#endif