1load("//bazel:skia_rules.bzl", "generate_cpp_files_for_headers", "skia_cc_library", "split_srcs_and_hdrs") 2 3package( 4 default_applicable_licenses = ["//:license"], 5) 6 7licenses(["notice"]) 8 9PDF_FILES = [ 10 "SkBitmapKey.h", 11 "SkClusterator.cpp", 12 "SkClusterator.h", 13 "SkDeflate.cpp", 14 "SkDeflate.h", 15 "SkKeyedImage.cpp", 16 "SkKeyedImage.h", 17 "SkPDFBitmap.cpp", 18 "SkPDFBitmap.h", 19 "SkPDFDevice.cpp", 20 "SkPDFDevice.h", 21 "SkPDFDocument.cpp", 22 "SkPDFDocumentPriv.h", 23 "SkPDFFont.cpp", 24 "SkPDFFont.h", 25 "SkPDFFormXObject.cpp", 26 "SkPDFFormXObject.h", 27 "SkPDFGlyphUse.h", 28 "SkPDFGradientShader.cpp", 29 "SkPDFGradientShader.h", 30 "SkPDFGraphicStackState.cpp", 31 "SkPDFGraphicStackState.h", 32 "SkPDFGraphicState.cpp", 33 "SkPDFGraphicState.h", 34 "SkPDFMakeCIDGlyphWidthsArray.cpp", 35 "SkPDFMakeCIDGlyphWidthsArray.h", 36 "SkPDFMakeToUnicodeCmap.cpp", 37 "SkPDFMakeToUnicodeCmap.h", 38 "SkPDFMetadata.cpp", 39 "SkPDFMetadata.h", 40 "SkPDFResourceDict.cpp", 41 "SkPDFResourceDict.h", 42 "SkPDFShader.cpp", 43 "SkPDFShader.h", 44 "SkPDFSubsetFont.cpp", 45 "SkPDFSubsetFont.h", 46 "SkPDFTag.cpp", 47 "SkPDFTag.h", 48 "SkPDFType1Font.cpp", 49 "SkPDFType1Font.h", 50 "SkPDFTypes.cpp", 51 "SkPDFTypes.h", 52 "SkPDFUnion.h", 53 "SkPDFUtils.cpp", 54 "SkPDFUtils.h", 55 "SkUUID.h", 56] 57 58split_srcs_and_hdrs( 59 name = "_pdf", 60 files = PDF_FILES, 61) 62 63generate_cpp_files_for_headers( 64 name = "headers_to_compile", 65 headers = [ 66 "SkBitmapKey.h", 67 "SkPDFDocumentPriv.h", 68 "SkPDFUnion.h", 69 "SkUUID.h", 70 ], 71) 72 73skia_cc_library( 74 name = "pdf", 75 srcs = [ 76 ":_pdf_hdrs", 77 ":_pdf_srcs", 78 ], 79 hdrs = [ 80 "//include/docs:pdf_hdrs", 81 ], 82 local_defines = ["SK_PDF_USE_HARFBUZZ_SUBSET"], 83 visibility = ["//:__pkg__"], 84 deps = [ 85 "//:core", 86 "//:jpeg_decode_codec", 87 "//:jpeg_encode_codec", 88 "//:pathops", 89 "//src/core:core_priv", 90 "//src/utils:clip_stack_utils", 91 "//src/utils:float_to_decimal", 92 "@zlib_skia//:zlib", 93 ] + 94 # We have this harfbuzz dependency all by itself because we need to turn this into a 95 # select statement when rolling into G3. 96 [ 97 "@harfbuzz", 98 ], 99) 100