From 79aea6a147f87994963ea9a464647cd64e8d475d Mon Sep 17 00:00:00 2001 From: Mike Klein Date: Mon, 11 Jun 2018 10:45:26 -0400 Subject: trim #include from SkPostConfig.h Change-Id: I693ddcd4ade101ba4eb4102e03adce183aa1d672 Reviewed-on: https://skia-review.googlesource.com/133829 Reviewed-by: Mike Klein Commit-Queue: Mike Klein --- bench/GrMemoryPoolBench.cpp | 1 + bench/RefCntBench.cpp | 3 ++- include/core/SkPostConfig.h | 6 ------ include/gpu/GrResourceKey.h | 1 + include/private/SkTHash.h | 1 + src/codec/SkIcoCodec.cpp | 2 +- src/core/SkArenaAlloc.cpp | 1 + src/core/SkColorSpace.cpp | 1 + src/core/SkData.cpp | 1 + src/core/SkDescriptor.h | 1 + src/core/SkGlyphRun.cpp | 1 + src/core/SkMiniRecorder.cpp | 1 + src/core/SkMipMap.cpp | 1 + src/core/SkRWBuffer.cpp | 1 + src/core/SkRasterClipStack.h | 1 + src/core/SkRecorder.cpp | 1 + src/core/SkRemoteGlyphCache.cpp | 1 + src/core/SkScalerContext.cpp | 1 + src/core/SkString.cpp | 7 ++++--- src/core/SkTLList.h | 1 + src/core/SkTextBlob.cpp | 1 + src/core/SkThreadedBMPDevice.h | 1 + src/core/SkVertices.cpp | 1 + src/gpu/GrAllocator.h | 1 + src/gpu/GrShape.h | 1 + src/gpu/GrTRecorder.h | 1 + src/gpu/ccpr/GrCCSTLList.h | 1 + src/gpu/ops/GrAAFillRectOp.cpp | 1 + src/gpu/ops/GrSimpleMeshDrawOpHelper.h | 1 + src/gpu/ops/GrTextureOp.cpp | 1 + src/gpu/text/GrTextBlob.cpp | 1 + src/pdf/SkPDFTypes.cpp | 1 + src/pdf/SkPDFTypes.h | 1 + src/ports/SkFontMgr_FontConfigInterface.cpp | 1 + src/ports/SkOSFile_posix.cpp | 1 + src/ports/SkOSFile_win.cpp | 1 + src/utils/SkLua.cpp | 1 + src/utils/SkShadowUtils.cpp | 1 + tests/RecordTest.cpp | 1 + 39 files changed, 42 insertions(+), 11 deletions(-) diff --git a/bench/GrMemoryPoolBench.cpp b/bench/GrMemoryPoolBench.cpp index b4b05ccd2f..a71de9767c 100644 --- a/bench/GrMemoryPoolBench.cpp +++ b/bench/GrMemoryPoolBench.cpp @@ -12,6 +12,7 @@ #include "SkRandom.h" #include "SkTDArray.h" #include "SkTemplates.h" +#include // change this to 0 to compare GrMemoryPool to default new / delete #define OVERRIDE_NEW 1 diff --git a/bench/RefCntBench.cpp b/bench/RefCntBench.cpp index 5e9e3a0960..f6aa3de942 100644 --- a/bench/RefCntBench.cpp +++ b/bench/RefCntBench.cpp @@ -4,11 +4,12 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include #include "Benchmark.h" #include "SkAtomics.h" #include "SkRefCnt.h" #include "SkWeakRefCnt.h" +#include +#include enum { M = 2 diff --git a/include/core/SkPostConfig.h b/include/core/SkPostConfig.h index b2aa0f402f..046d6fa5cb 100644 --- a/include/core/SkPostConfig.h +++ b/include/core/SkPostConfig.h @@ -95,12 +95,6 @@ # endif #endif -/////////////////////////////////////////////////////////////////////////////// - -// TODO(mdempsky): Move elsewhere as appropriate. -#include - - /////////////////////////////////////////////////////////////////////////////// #ifdef SK_BUILD_FOR_WIN diff --git a/include/gpu/GrResourceKey.h b/include/gpu/GrResourceKey.h index ef319ad1fa..0240387a6b 100644 --- a/include/gpu/GrResourceKey.h +++ b/include/gpu/GrResourceKey.h @@ -14,6 +14,7 @@ #include "GrTypes.h" #include "SkData.h" #include "SkString.h" +#include uint32_t GrResourceKeyHash(const uint32_t* data, size_t size); diff --git a/include/private/SkTHash.h b/include/private/SkTHash.h index 231f39dcbc..d790284b0d 100644 --- a/include/private/SkTHash.h +++ b/include/private/SkTHash.h @@ -11,6 +11,7 @@ #include "SkChecksum.h" #include "SkTypes.h" #include "SkTemplates.h" +#include // Before trying to use SkTHashTable, look below to see if SkTHashMap or SkTHashSet works for you. // They're easier to use, usually perform the same, and have fewer sharp edges. diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp index af9125565a..8ff408815b 100644 --- a/src/codec/SkIcoCodec.cpp +++ b/src/codec/SkIcoCodec.cpp @@ -110,7 +110,7 @@ std::unique_ptr SkIcoCodec::MakeFromStream(std::unique_ptr st // Now will construct a candidate codec for each of the embedded images uint32_t bytesRead = kIcoDirectoryBytes + numImages * kIcoDirEntryBytes; std::unique_ptr, true>> codecs( - new (SkTArray, true>)(numImages)); + new SkTArray, true>(numImages)); for (uint32_t i = 0; i < numImages; i++) { uint32_t offset = directoryEntries[i].offset; uint32_t size = directoryEntries[i].size; diff --git a/src/core/SkArenaAlloc.cpp b/src/core/SkArenaAlloc.cpp index 66cff20a72..7dc727c99f 100644 --- a/src/core/SkArenaAlloc.cpp +++ b/src/core/SkArenaAlloc.cpp @@ -7,6 +7,7 @@ #include "SkArenaAlloc.h" #include +#include static char* end_chain(char*) { return nullptr; } diff --git a/src/core/SkColorSpace.cpp b/src/core/SkColorSpace.cpp index be399bda6f..3b08e29a89 100644 --- a/src/core/SkColorSpace.cpp +++ b/src/core/SkColorSpace.cpp @@ -9,6 +9,7 @@ #include "SkColorSpace_XYZ.h" #include "SkColorSpacePriv.h" #include "SkPoint3.h" +#include bool SkColorSpacePrimaries::toXYZD50(SkMatrix44* toXYZ_D50) const { if (!is_zero_to_one(fRX) || !is_zero_to_one(fRY) || diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp index 0e4d17f11d..253945ea56 100644 --- a/src/core/SkData.cpp +++ b/src/core/SkData.cpp @@ -11,6 +11,7 @@ #include "SkReadBuffer.h" #include "SkStream.h" #include "SkWriteBuffer.h" +#include SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) { fPtr = const_cast(ptr); diff --git a/src/core/SkDescriptor.h b/src/core/SkDescriptor.h index 164489049d..83532d1d06 100644 --- a/src/core/SkDescriptor.h +++ b/src/core/SkDescriptor.h @@ -12,6 +12,7 @@ #include "SkOpts.h" #include "SkTypes.h" #include +#include class SkDescriptor : SkNoncopyable { public: diff --git a/src/core/SkGlyphRun.cpp b/src/core/SkGlyphRun.cpp index ce4c907b5b..6209b58c69 100644 --- a/src/core/SkGlyphRun.cpp +++ b/src/core/SkGlyphRun.cpp @@ -8,6 +8,7 @@ #include "SkGlyphRun.h" #include +#include #include #include "SkDevice.h" diff --git a/src/core/SkMiniRecorder.cpp b/src/core/SkMiniRecorder.cpp index 6a2edf1f12..668942dfb9 100644 --- a/src/core/SkMiniRecorder.cpp +++ b/src/core/SkMiniRecorder.cpp @@ -14,6 +14,7 @@ #include "SkRecordDraw.h" #include "SkRectPriv.h" #include "SkTextBlob.h" +#include using namespace SkRecords; diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp index 51ff77f4bf..edb800f264 100644 --- a/src/core/SkMipMap.cpp +++ b/src/core/SkMipMap.cpp @@ -15,6 +15,7 @@ #include "SkPM4fPriv.h" #include "SkSRGB.h" #include "SkTypes.h" +#include // // ColorTypeFilter is the "Type" we pass to some downsample template functions. diff --git a/src/core/SkRWBuffer.cpp b/src/core/SkRWBuffer.cpp index 8c395a1fb5..ef33f91cc5 100644 --- a/src/core/SkRWBuffer.cpp +++ b/src/core/SkRWBuffer.cpp @@ -13,6 +13,7 @@ #include "SkStream.h" #include +#include // Force small chunks to be a page's worth static const size_t kMinAllocSize = 4096; diff --git a/src/core/SkRasterClipStack.h b/src/core/SkRasterClipStack.h index f3e3b17df7..fa55e461b7 100644 --- a/src/core/SkRasterClipStack.h +++ b/src/core/SkRasterClipStack.h @@ -11,6 +11,7 @@ #include "SkClipOp.h" #include "SkDeque.h" #include "SkRasterClip.h" +#include template class SkTStack { public: diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp index 271300065e..7d8a849518 100644 --- a/src/core/SkRecorder.cpp +++ b/src/core/SkRecorder.cpp @@ -12,6 +12,7 @@ #include "SkPicture.h" #include "SkRecorder.h" #include "SkSurface.h" +#include SkDrawableList::~SkDrawableList() { fArray.unrefAll(); diff --git a/src/core/SkRemoteGlyphCache.cpp b/src/core/SkRemoteGlyphCache.cpp index f85c0dfd6b..49688886c1 100644 --- a/src/core/SkRemoteGlyphCache.cpp +++ b/src/core/SkRemoteGlyphCache.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include diff --git a/src/core/SkScalerContext.cpp b/src/core/SkScalerContext.cpp index 1f5312089c..b4a356556b 100644 --- a/src/core/SkScalerContext.cpp +++ b/src/core/SkScalerContext.cpp @@ -30,6 +30,7 @@ #include "SkSurfacePriv.h" #include "SkTextFormatParams.h" #include "SkWriteBuffer.h" +#include /////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkString.cpp b/src/core/SkString.cpp index 707e8befb8..a6d9335318 100644 --- a/src/core/SkString.cpp +++ b/src/core/SkString.cpp @@ -5,12 +5,13 @@ * found in the LICENSE file. */ -#include "SkString.h" -#include -#include #include "SkAtomics.h" #include "SkSafeMath.h" +#include "SkString.h" #include "SkUtils.h" +#include +#include +#include // number of bytes (on the stack) to receive the printf result static const size_t kBufferSize = 1024; diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index 194879d6d1..b865538c27 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -12,6 +12,7 @@ #include "SkMalloc.h" #include "SkTypes.h" +#include #include /** Doubly-linked list of objects. The objects' lifetimes are controlled by the list. I.e. the diff --git a/src/core/SkTextBlob.cpp b/src/core/SkTextBlob.cpp index 556e090104..6e0cf64a8b 100644 --- a/src/core/SkTextBlob.cpp +++ b/src/core/SkTextBlob.cpp @@ -14,6 +14,7 @@ #include "SkWriteBuffer.h" #include +#include #if SK_SUPPORT_GPU #include "text/GrTextBlobCache.h" diff --git a/src/core/SkThreadedBMPDevice.h b/src/core/SkThreadedBMPDevice.h index 6defce5d8c..13d837424c 100644 --- a/src/core/SkThreadedBMPDevice.h +++ b/src/core/SkThreadedBMPDevice.h @@ -12,6 +12,7 @@ #include "SkDraw.h" #include "SkRectPriv.h" #include "SkTaskGroup2D.h" +#include class SkThreadedBMPDevice : public SkBitmapDevice { public: diff --git a/src/core/SkVertices.cpp b/src/core/SkVertices.cpp index abe2b4ce67..e23d65f7a9 100644 --- a/src/core/SkVertices.cpp +++ b/src/core/SkVertices.cpp @@ -12,6 +12,7 @@ #include "SkSafeMath.h" #include "SkSafeRange.h" #include "SkWriter32.h" +#include static int32_t gNextID = 1; static int32_t next_id() { diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h index 314e58a99a..b879b846d2 100644 --- a/src/gpu/GrAllocator.h +++ b/src/gpu/GrAllocator.h @@ -12,6 +12,7 @@ #include "GrTypes.h" #include "SkTArray.h" #include "SkTypes.h" +#include class GrAllocator : SkNoncopyable { public: diff --git a/src/gpu/GrShape.h b/src/gpu/GrShape.h index c333168b53..fc16c7d08e 100644 --- a/src/gpu/GrShape.h +++ b/src/gpu/GrShape.h @@ -14,6 +14,7 @@ #include "SkRRect.h" #include "SkTemplates.h" #include "SkTLazy.h" +#include /** * Represents a geometric shape (rrect or path) and the GrStyle that it should be rendered with. diff --git a/src/gpu/GrTRecorder.h b/src/gpu/GrTRecorder.h index c42d9e9751..74dd1380b0 100644 --- a/src/gpu/GrTRecorder.h +++ b/src/gpu/GrTRecorder.h @@ -9,6 +9,7 @@ #define GrTRecorder_DEFINED #include "SkTypes.h" +#include template class GrTRecorder; template struct GrTRecorderAllocWrapper; diff --git a/src/gpu/ccpr/GrCCSTLList.h b/src/gpu/ccpr/GrCCSTLList.h index 3b478e9842..aed61ea24e 100644 --- a/src/gpu/ccpr/GrCCSTLList.h +++ b/src/gpu/ccpr/GrCCSTLList.h @@ -9,6 +9,7 @@ #define GrCCSTLList_DEFINED #include "SkArenaAlloc.h" +#include /** * A singly-linked list whose head element is a local class member. This is required by diff --git a/src/gpu/ops/GrAAFillRectOp.cpp b/src/gpu/ops/GrAAFillRectOp.cpp index d32b858037..45f29524d5 100644 --- a/src/gpu/ops/GrAAFillRectOp.cpp +++ b/src/gpu/ops/GrAAFillRectOp.cpp @@ -18,6 +18,7 @@ #include "SkRect.h" #include "SkPointPriv.h" #include "ops/GrSimpleMeshDrawOpHelper.h" +#include GR_DECLARE_STATIC_UNIQUE_KEY(gAAFillRectIndexBufferKey); diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h index 020f25fce6..5aaf1fe13f 100644 --- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.h +++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.h @@ -11,6 +11,7 @@ #include "GrMeshDrawOp.h" #include "GrOpFlushState.h" #include "GrPipeline.h" +#include struct SkRect; diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp index ec20e245b9..68a5851afe 100644 --- a/src/gpu/ops/GrTextureOp.cpp +++ b/src/gpu/ops/GrTextureOp.cpp @@ -28,6 +28,7 @@ #include "glsl/GrGLSLGeometryProcessor.h" #include "glsl/GrGLSLVarying.h" #include "glsl/GrGLSLVertexGeoBuilder.h" +#include namespace { diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp index b6fc3ce170..00995d0239 100644 --- a/src/gpu/text/GrTextBlob.cpp +++ b/src/gpu/text/GrTextBlob.cpp @@ -18,6 +18,7 @@ #include "SkTextBlobRunIterator.h" #include "SkTextToPathIter.h" #include "ops/GrAtlasTextOp.h" +#include sk_sp GrTextBlob::Make(int glyphCount, int runCount) { // We allocate size for the GrTextBlob itself, plus size for the vertices array, diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp index 3a8120995c..56d19b11c0 100644 --- a/src/pdf/SkPDFTypes.cpp +++ b/src/pdf/SkPDFTypes.cpp @@ -12,6 +12,7 @@ #include "SkPDFUtils.h" #include "SkStream.h" #include "SkStreamPriv.h" +#include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index 10fe125aa6..bf3e266b8a 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -8,6 +8,7 @@ #ifndef SkPDFTypes_DEFINED #define SkPDFTypes_DEFINED +#include #include #include "SkRefCnt.h" diff --git a/src/ports/SkFontMgr_FontConfigInterface.cpp b/src/ports/SkFontMgr_FontConfigInterface.cpp index dacc054f6c..7710b76eb8 100644 --- a/src/ports/SkFontMgr_FontConfigInterface.cpp +++ b/src/ports/SkFontMgr_FontConfigInterface.cpp @@ -17,6 +17,7 @@ #include "SkTypeface.h" #include "SkTypefaceCache.h" #include "SkResourceCache.h" +#include SkStreamAsset* SkTypeface_FCI::onOpenStream(int* ttcIndex) const { *ttcIndex = this->getIdentity().fTTCIndex; diff --git a/src/ports/SkOSFile_posix.cpp b/src/ports/SkOSFile_posix.cpp index 9a1c30aa28..b1bf544087 100644 --- a/src/ports/SkOSFile_posix.cpp +++ b/src/ports/SkOSFile_posix.cpp @@ -12,6 +12,7 @@ #include "SkTypes.h" #include +#include #include #include #include diff --git a/src/ports/SkOSFile_win.cpp b/src/ports/SkOSFile_win.cpp index 5488712d39..f76b0bced4 100644 --- a/src/ports/SkOSFile_win.cpp +++ b/src/ports/SkOSFile_win.cpp @@ -15,6 +15,7 @@ #include "SkTFitsIn.h" #include +#include #include #include diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp index 36bd0b228b..53e8bb33a5 100644 --- a/src/utils/SkLua.cpp +++ b/src/utils/SkLua.cpp @@ -31,6 +31,7 @@ #include "SkSurface.h" #include "SkTextBlob.h" #include "SkTypeface.h" +#include extern "C" { #include "lua.h" diff --git a/src/utils/SkShadowUtils.cpp b/src/utils/SkShadowUtils.cpp index f0b1e8f4d7..2578a686d1 100644 --- a/src/utils/SkShadowUtils.cpp +++ b/src/utils/SkShadowUtils.cpp @@ -23,6 +23,7 @@ #include "SkString.h" #include "SkTLazy.h" #include "SkVertices.h" +#include #if SK_SUPPORT_GPU #include "GrShape.h" #include "effects/GrBlurredEdgeFragmentProcessor.h" diff --git a/tests/RecordTest.cpp b/tests/RecordTest.cpp index a67d7e8a2a..6474eb2342 100644 --- a/tests/RecordTest.cpp +++ b/tests/RecordTest.cpp @@ -12,6 +12,7 @@ #include "SkRecords.h" #include "SkShader.h" #include "Test.h" +#include // Sums the area of any DrawRect command it sees. -- cgit v1.2.3