SkPDF: build shared lib with skia_enable_pdf=false

Change-Id: Ie9e91f4faccea4ddfa05d46d80835195a0163b83
Reviewed-on: https://skia-review.googlesource.com/c/159661
Commit-Queue: Hal Canary <halcanary@google.com>
Auto-Submit: Hal Canary <halcanary@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
This commit is contained in:
Hal Canary 2018-10-04 13:34:44 -04:00 committed by Skia Commit-Bot
parent d95303e10c
commit 0f88861600
2 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@
* found in the LICENSE file.
*/
#include "SkCanvas.h"
#include "SkPDFDocument.h"
#ifdef SK_SUPPORT_LEGACY_DOCUMENT_FACTORY
@ -15,3 +16,6 @@ sk_sp<SkDocument> SkDocument::MakePDF(SkWStream* stream) {
sk_sp<SkDocument> SkPDF::MakeDocument(SkWStream*, const SkPDF::Metadata&) { return nullptr; }
void SkPDF::SetNodeId(SkCanvas* c, int n) {
c->drawAnnotation({0, 0, 0, 0}, "PDF_Node_Key", SkData::MakeWithCopy(&n, sizeof(n)).get());
}

View File

@ -16,6 +16,7 @@ using PDFTag = SkPDF::StructureElementNode;
// Add this to args.gn to output the PDF to a file:
// extra_cflags = [ "-DSK_PDF_TEST_TAGS_OUTPUT_PATH=\"/tmp/foo.pdf\"" ]
DEF_TEST(SkPDF_tagged, r) {
REQUIRE_PDF_DOCUMENT(SkPDF_tagged, r);
#ifdef SK_PDF_TEST_TAGS_OUTPUT_PATH
SkFILEWStream outputStream(SK_PDF_TEST_TAGS_OUTPUT_PATH);
#else