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