From 2a2f67592602b18527bc3fd449132d420cd5b62e Mon Sep 17 00:00:00 2001 From: Hal Canary Date: Mon, 11 Jun 2018 21:44:01 -0400 Subject: SkTypes: extract SkTo Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein --- src/pdf/SkClusterator.cpp | 1 + src/pdf/SkDeflate.cpp | 3 ++- src/pdf/SkJpegInfo.cpp | 2 ++ src/pdf/SkPDFBitmap.cpp | 1 + src/pdf/SkPDFConvertType1FontStream.cpp | 2 ++ src/pdf/SkPDFDevice.cpp | 1 + src/pdf/SkPDFDocument.cpp | 1 + src/pdf/SkPDFFont.cpp | 4 +++- src/pdf/SkPDFGraphicState.cpp | 6 ++++-- src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp | 6 ++++-- src/pdf/SkPDFMakeToUnicodeCmap.cpp | 2 ++ src/pdf/SkPDFMetadata.cpp | 4 +++- src/pdf/SkPDFTypes.cpp | 5 ++++- src/pdf/SkPDFTypes.h | 1 + 14 files changed, 31 insertions(+), 8 deletions(-) (limited to 'src/pdf') diff --git a/src/pdf/SkClusterator.cpp b/src/pdf/SkClusterator.cpp index 3d6800bf30..6c56eb6b45 100644 --- a/src/pdf/SkClusterator.cpp +++ b/src/pdf/SkClusterator.cpp @@ -7,6 +7,7 @@ #include "SkClusterator.h" +#include "SkTo.h" #include "SkUtils.h" static bool is_reversed(const uint32_t* clusters, uint32_t count) { diff --git a/src/pdf/SkDeflate.cpp b/src/pdf/SkDeflate.cpp index 6952ec4f11..be3e182cd1 100644 --- a/src/pdf/SkDeflate.cpp +++ b/src/pdf/SkDeflate.cpp @@ -5,11 +5,12 @@ * found in the LICENSE file. */ +#include "SkDeflate.h" #include "SkData.h" -#include "SkDeflate.h" #include "SkMakeUnique.h" #include "SkMalloc.h" +#include "SkTo.h" #include "SkTraceEvent.h" #include "zlib.h" diff --git a/src/pdf/SkJpegInfo.cpp b/src/pdf/SkJpegInfo.cpp index df99de4e93..72e659e71a 100644 --- a/src/pdf/SkJpegInfo.cpp +++ b/src/pdf/SkJpegInfo.cpp @@ -7,6 +7,8 @@ #include "SkJpegInfo.h" +#include "SkTo.h" + #ifndef SK_HAS_JPEG_LIBRARY namespace { diff --git a/src/pdf/SkPDFBitmap.cpp b/src/pdf/SkPDFBitmap.cpp index 9d86d90bed..38e5327610 100644 --- a/src/pdf/SkPDFBitmap.cpp +++ b/src/pdf/SkPDFBitmap.cpp @@ -16,6 +16,7 @@ #include "SkPDFTypes.h" #include "SkPDFUtils.h" #include "SkStream.h" +#include "SkTo.h" #include "SkUnPreMultiply.h" bool image_compute_is_opaque(const SkImage* image) { diff --git a/src/pdf/SkPDFConvertType1FontStream.cpp b/src/pdf/SkPDFConvertType1FontStream.cpp index 387f0efacf..74e148c867 100644 --- a/src/pdf/SkPDFConvertType1FontStream.cpp +++ b/src/pdf/SkPDFConvertType1FontStream.cpp @@ -6,7 +6,9 @@ */ #include "SkPDFConvertType1FontStream.h" + #include "SkTemplates.h" +#include "SkTo.h" #include diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index f4c034e1ef..4f214c12f0 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -45,6 +45,7 @@ #include "SkTemplates.h" #include "SkTextBlobRunIterator.h" #include "SkTextFormatParams.h" +#include "SkTo.h" #include "SkUtils.h" #include "SkXfermodeInterpretation.h" diff --git a/src/pdf/SkPDFDocument.cpp b/src/pdf/SkPDFDocument.cpp index 8219ad385e..577bac7252 100644 --- a/src/pdf/SkPDFDocument.cpp +++ b/src/pdf/SkPDFDocument.cpp @@ -13,6 +13,7 @@ #include "SkPDFDevice.h" #include "SkPDFUtils.h" #include "SkStream.h" +#include "SkTo.h" SkPDFObjectSerializer::SkPDFObjectSerializer() : fBaseOffset(0), fNextToBeSerialized(0) {} diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 3b89f62cbe..4556bcd2b3 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -5,13 +5,14 @@ * found in the LICENSE file. */ +#include "SkPDFFont.h" + #include "SkData.h" #include "SkGlyphCache.h" #include "SkMakeUnique.h" #include "SkPDFCanon.h" #include "SkPDFConvertType1FontStream.h" #include "SkPDFDevice.h" -#include "SkPDFFont.h" #include "SkPDFMakeCIDGlyphWidthsArray.h" #include "SkPDFMakeToUnicodeCmap.h" #include "SkPDFUtils.h" @@ -19,6 +20,7 @@ #include "SkRefCnt.h" #include "SkScalar.h" #include "SkStream.h" +#include "SkTo.h" #include "SkTypes.h" #include "SkUtils.h" diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp index cab071c747..b44c1144cc 100644 --- a/src/pdf/SkPDFGraphicState.cpp +++ b/src/pdf/SkPDFGraphicState.cpp @@ -5,12 +5,14 @@ * found in the LICENSE file. */ +#include "SkPDFGraphicState.h" + #include "SkData.h" -#include "SkPaint.h" #include "SkPDFCanon.h" #include "SkPDFFormXObject.h" -#include "SkPDFGraphicState.h" #include "SkPDFUtils.h" +#include "SkPaint.h" +#include "SkTo.h" static const char* as_pdf_blend_mode_name(SkBlendMode mode) { // PDF32000.book section 11.3.5 "Blend Mode" diff --git a/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp b/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp index 4d5471d9b3..62902c1e23 100644 --- a/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp +++ b/src/pdf/SkPDFMakeCIDGlyphWidthsArray.cpp @@ -5,10 +5,12 @@ * found in the LICENSE file. */ -#include "SkBitSet.h" #include "SkPDFMakeCIDGlyphWidthsArray.h" -#include "SkPaint.h" + +#include "SkBitSet.h" #include "SkGlyphCache.h" +#include "SkPaint.h" +#include "SkTo.h" // TODO(halcanary): Write unit tests for SkPDFMakeCIDGlyphWidthsArray(). diff --git a/src/pdf/SkPDFMakeToUnicodeCmap.cpp b/src/pdf/SkPDFMakeToUnicodeCmap.cpp index c93aa6f2c5..4f383e1028 100644 --- a/src/pdf/SkPDFMakeToUnicodeCmap.cpp +++ b/src/pdf/SkPDFMakeToUnicodeCmap.cpp @@ -6,7 +6,9 @@ */ #include "SkPDFMakeToUnicodeCmap.h" + #include "SkPDFUtils.h" +#include "SkTo.h" #include "SkUtils.h" static void append_tounicode_header(SkDynamicMemoryWStream* cmap, diff --git a/src/pdf/SkPDFMetadata.cpp b/src/pdf/SkPDFMetadata.cpp index ccb3ef38b5..9234f44ac1 100644 --- a/src/pdf/SkPDFMetadata.cpp +++ b/src/pdf/SkPDFMetadata.cpp @@ -5,10 +5,12 @@ * found in the LICENSE file. */ +#include "SkPDFMetadata.h" + #include "SkMD5.h" #include "SkMilestone.h" -#include "SkPDFMetadata.h" #include "SkPDFTypes.h" +#include "SkTo.h" #include "SkUtils.h" #include diff --git a/src/pdf/SkPDFTypes.cpp b/src/pdf/SkPDFTypes.cpp index 56d19b11c0..9e83c7a4c2 100644 --- a/src/pdf/SkPDFTypes.cpp +++ b/src/pdf/SkPDFTypes.cpp @@ -5,13 +5,16 @@ * found in the LICENSE file. */ +#include "SkPDFTypes.h" + #include "SkData.h" #include "SkDeflate.h" #include "SkMakeUnique.h" -#include "SkPDFTypes.h" #include "SkPDFUtils.h" #include "SkStream.h" #include "SkStreamPriv.h" +#include "SkTo.h" + #include //////////////////////////////////////////////////////////////////////////////// diff --git a/src/pdf/SkPDFTypes.h b/src/pdf/SkPDFTypes.h index bf3e266b8a..434f8ba082 100644 --- a/src/pdf/SkPDFTypes.h +++ b/src/pdf/SkPDFTypes.h @@ -14,6 +14,7 @@ #include "SkRefCnt.h" #include "SkScalar.h" #include "SkTHash.h" +#include "SkTo.h" #include "SkTypes.h" class SkData; -- cgit v1.2.3