BUILD.gn: skia_enable_pdf
BUG=skia:
Change-Id: Icf616bec73e81aad97815b519566ff5b9db611e3
Reviewed-on: https://skia-review.googlesource.com/6495
Commit-Queue: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
diff --git a/tests/PDFDeflateWStreamTest.cpp b/tests/PDFDeflateWStreamTest.cpp
index 11d2370..dcb7547 100644
--- a/tests/PDFDeflateWStreamTest.cpp
+++ b/tests/PDFDeflateWStreamTest.cpp
@@ -5,9 +5,12 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "SkDeflate.h"
#include "SkRandom.h"
-#include "Test.h"
namespace {
@@ -162,3 +165,5 @@
SkDeflateWStream emptyDeflateWStream(nullptr);
REPORTER_ASSERT(r, !emptyDeflateWStream.writeText("FOO"));
}
+
+#endif
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp
index 0d87cd7d..332520b 100644
--- a/tests/PDFGlyphsToUnicodeTest.cpp
+++ b/tests/PDFGlyphsToUnicodeTest.cpp
@@ -5,11 +5,14 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "SkBitSet.h"
#include "SkData.h"
#include "SkPDFMakeToUnicodeCmap.h"
#include "SkStream.h"
-#include "Test.h"
static const int kMaximumGlyphCount = SK_MaxU16 + 1;
@@ -178,3 +181,5 @@
REPORTER_ASSERT(reporter, stream_equals(buffer2, 0, expectedResult2,
buffer2.bytesWritten()));
}
+
+#endif
diff --git a/tests/PDFJpegEmbedTest.cpp b/tests/PDFJpegEmbedTest.cpp
index 17dbac8..100c9b3 100644
--- a/tests/PDFJpegEmbedTest.cpp
+++ b/tests/PDFJpegEmbedTest.cpp
@@ -9,7 +9,6 @@
#include "SkData.h"
#include "SkDocument.h"
#include "SkImageGenerator.h"
-#include "SkJpegInfo.h"
#include "SkStream.h"
#include "Resources.h"
@@ -80,6 +79,10 @@
REPORTER_ASSERT(r, !is_subset_of(cmykData.get(), pdfData.get()));
}
+#ifdef SK_SUPPORT_PDF
+
+#include "SkJpegInfo.h"
+
DEF_TEST(SkPDF_JpegIdentification, r) {
static struct {
const char* path;
@@ -208,3 +211,4 @@
REPORTER_ASSERT(r, !SkIsJFIF(data.get(), &info));
}
}
+#endif
diff --git a/tests/PDFPrimitivesTest.cpp b/tests/PDFPrimitivesTest.cpp
index 81b33ba..de9af07 100644
--- a/tests/PDFPrimitivesTest.cpp
+++ b/tests/PDFPrimitivesTest.cpp
@@ -5,6 +5,10 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
+#ifdef SK_SUPPORT_PDF
+
#include "Resources.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
@@ -24,7 +28,6 @@
#include "SkSpecialImage.h"
#include "SkStream.h"
#include "SkTypes.h"
-#include "Test.h"
#include "sk_tool_utils.h"
#include <cstdlib>
@@ -486,3 +489,4 @@
REPORTER_ASSERT(reporter, roundTrip == i);
}
}
+#endif