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 features = ["layering_check"], 83 local_defines = ["SK_PDF_USE_HARFBUZZ_SUBSET"], 84 visibility = ["//:__pkg__"], 85 deps = [ 86 "//:core", 87 "//src/base", 88 "//:pathops", 89 "//src/codec:codec_support_priv", 90 "//src/encode:icc_support", 91 "//src/core:core_priv", 92 "//src/utils:clip_stack_utils", 93 "//src/utils:float_to_decimal", 94 "//modules/skcms", 95 "@zlib_skia//:zlib", 96 # TODO(kjlubick) Remove this dependency after migrating clients 97 ":jpeg_helpers", 98 ] + 99 # We have this harfbuzz dependency all by itself because we need to turn this into a 100 # select statement when rolling into G3. 101 [ 102 "@harfbuzz", 103 ], 104) 105 106skia_cc_library( 107 name = "jpeg_helpers", 108 hdrs = [ 109 "//include/docs:pdf_hdrs", 110 "//include/docs:pdf_jpeg_hdrs", 111 ], 112 features = ["layering_check"], 113 visibility = ["//:__pkg__"], 114 deps = [ 115 "//:core", 116 "//:jpeg_decode_codec", 117 "//:jpeg_encode_codec", 118 "//src/base", 119 ], 120) 121