1# Copyright 2018 The PDFium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("//build/config/freetype/freetype.gni") 6import("../../pdfium.gni") 7import("../../testing/test.gni") 8 9source_set("fxge") { 10 sources = [ 11 "agg/fx_agg_driver.cpp", 12 "agg/fx_agg_driver.h", 13 "calculate_pitch.cpp", 14 "calculate_pitch.h", 15 "cfx_cliprgn.cpp", 16 "cfx_cliprgn.h", 17 "cfx_color.cpp", 18 "cfx_color.h", 19 "cfx_defaultrenderdevice.cpp", 20 "cfx_defaultrenderdevice.h", 21 "cfx_drawutils.cpp", 22 "cfx_drawutils.h", 23 "cfx_face.cpp", 24 "cfx_face.h", 25 "cfx_fillrenderoptions.h", 26 "cfx_folderfontinfo.cpp", 27 "cfx_folderfontinfo.h", 28 "cfx_font.cpp", 29 "cfx_font.h", 30 "cfx_fontcache.cpp", 31 "cfx_fontcache.h", 32 "cfx_fontmapper.cpp", 33 "cfx_fontmapper.h", 34 "cfx_fontmgr.cpp", 35 "cfx_fontmgr.h", 36 "cfx_gemodule.cpp", 37 "cfx_gemodule.h", 38 "cfx_glyphbitmap.cpp", 39 "cfx_glyphbitmap.h", 40 "cfx_glyphcache.cpp", 41 "cfx_glyphcache.h", 42 "cfx_graphstate.cpp", 43 "cfx_graphstate.h", 44 "cfx_graphstatedata.cpp", 45 "cfx_graphstatedata.h", 46 "cfx_path.cpp", 47 "cfx_path.h", 48 "cfx_renderdevice.cpp", 49 "cfx_renderdevice.h", 50 "cfx_substfont.cpp", 51 "cfx_substfont.h", 52 "cfx_textrenderoptions.h", 53 "cfx_unicodeencoding.cpp", 54 "cfx_unicodeencoding.h", 55 "dib/cfx_bitmapcomposer.cpp", 56 "dib/cfx_bitmapcomposer.h", 57 "dib/cfx_bitmapstorer.cpp", 58 "dib/cfx_bitmapstorer.h", 59 "dib/cfx_cmyk_to_srgb.cpp", 60 "dib/cfx_cmyk_to_srgb.h", 61 "dib/cfx_dibbase.cpp", 62 "dib/cfx_dibbase.h", 63 "dib/cfx_dibitmap.cpp", 64 "dib/cfx_dibitmap.h", 65 "dib/cfx_imagerenderer.cpp", 66 "dib/cfx_imagerenderer.h", 67 "dib/cfx_imagestretcher.cpp", 68 "dib/cfx_imagestretcher.h", 69 "dib/cfx_imagetransformer.cpp", 70 "dib/cfx_imagetransformer.h", 71 "dib/cfx_scanlinecompositor.cpp", 72 "dib/cfx_scanlinecompositor.h", 73 "dib/cstretchengine.cpp", 74 "dib/cstretchengine.h", 75 "dib/fx_dib.cpp", 76 "dib/fx_dib.h", 77 "dib/scanlinecomposer_iface.h", 78 "fontdata/chromefontdata/FoxitDingbats.cpp", 79 "fontdata/chromefontdata/FoxitFixed.cpp", 80 "fontdata/chromefontdata/FoxitFixedBold.cpp", 81 "fontdata/chromefontdata/FoxitFixedBoldItalic.cpp", 82 "fontdata/chromefontdata/FoxitFixedItalic.cpp", 83 "fontdata/chromefontdata/FoxitSans.cpp", 84 "fontdata/chromefontdata/FoxitSansBold.cpp", 85 "fontdata/chromefontdata/FoxitSansBoldItalic.cpp", 86 "fontdata/chromefontdata/FoxitSansItalic.cpp", 87 "fontdata/chromefontdata/FoxitSansMM.cpp", 88 "fontdata/chromefontdata/FoxitSerif.cpp", 89 "fontdata/chromefontdata/FoxitSerifBold.cpp", 90 "fontdata/chromefontdata/FoxitSerifBoldItalic.cpp", 91 "fontdata/chromefontdata/FoxitSerifItalic.cpp", 92 "fontdata/chromefontdata/FoxitSerifMM.cpp", 93 "fontdata/chromefontdata/FoxitSymbol.cpp", 94 "fontdata/chromefontdata/chromefontdata.h", 95 "freetype/fx_freetype.cpp", 96 "freetype/fx_freetype.h", 97 "fx_font.cpp", 98 "fx_font.h", 99 "render_defines.h", 100 "renderdevicedriver_iface.cpp", 101 "renderdevicedriver_iface.h", 102 "scoped_font_transform.cpp", 103 "scoped_font_transform.h", 104 "systemfontinfo_iface.h", 105 "text_char_pos.cpp", 106 "text_char_pos.h", 107 "text_glyph_pos.cpp", 108 "text_glyph_pos.h", 109 ] 110 111 configs += [ 112 "../../:pdfium_strict_config", 113 "../../:pdfium_noshorten_config", 114 ] 115 116 deps = [ 117 "../../third_party:fx_agg", 118 "../fxcrt", 119 ] 120 121 public_deps = [] 122 123 if (is_component_build || use_system_freetype) { 124 # ft_adobe_glyph_list is not exported from the Freetype shared library so we 125 # need it defined in component builds and builds using system freetype. 126 defines = [ "DEFINE_PS_TABLES_DATA" ] 127 } 128 129 if (pdf_enable_xfa) { 130 sources += [ 131 "cfx_unicodeencodingex.cpp", 132 "cfx_unicodeencodingex.h", 133 ] 134 } 135 136 if (pdf_use_skia) { 137 sources += [ "skia/fx_skia_device.cpp" ] 138 public_deps += [ "//skia" ] 139 } 140 141 if (is_android) { 142 sources += [ 143 "android/cfpf_skiadevicemodule.cpp", 144 "android/cfpf_skiadevicemodule.h", 145 "android/cfpf_skiafont.cpp", 146 "android/cfpf_skiafont.h", 147 "android/cfpf_skiafontmgr.cpp", 148 "android/cfpf_skiafontmgr.h", 149 "android/cfpf_skiapathfont.cpp", 150 "android/cfpf_skiapathfont.h", 151 "android/cfx_androidfontinfo.cpp", 152 "android/cfx_androidfontinfo.h", 153 "android/fx_android_impl.cpp", 154 ] 155 } 156 157 if (is_linux || is_chromeos || is_fuchsia) { 158 sources += [ "linux/fx_linux_impl.cpp" ] 159 } 160 161 if (is_mac) { 162 sources += [ 163 "apple/fx_apple_impl.cpp", 164 "apple/fx_apple_platform.cpp", 165 "apple/fx_apple_platform.h", 166 "apple/fx_quartz_device.cpp", 167 "apple/fx_quartz_device.h", 168 ] 169 frameworks = [ "CoreGraphics.framework" ] 170 } 171 172 if (is_win) { 173 sources += [ 174 "cfx_windowsrenderdevice.cpp", 175 "cfx_windowsrenderdevice.h", 176 "dib/cfx_dibextractor.cpp", 177 "dib/cfx_dibextractor.h", 178 "win32/cfx_psfonttracker.cpp", 179 "win32/cfx_psfonttracker.h", 180 "win32/cfx_psrenderer.cpp", 181 "win32/cfx_psrenderer.h", 182 "win32/cgdi_device_driver.cpp", 183 "win32/cgdi_device_driver.h", 184 "win32/cgdi_display_driver.cpp", 185 "win32/cgdi_display_driver.h", 186 "win32/cgdi_plus_ext.cpp", 187 "win32/cgdi_plus_ext.h", 188 "win32/cgdi_printer_driver.cpp", 189 "win32/cgdi_printer_driver.h", 190 "win32/cps_printer_driver.cpp", 191 "win32/cps_printer_driver.h", 192 "win32/cpsoutput.cpp", 193 "win32/cpsoutput.h", 194 "win32/ctext_only_printer_driver.cpp", 195 "win32/ctext_only_printer_driver.h", 196 "win32/cwin32_platform.cpp", 197 "win32/cwin32_platform.h", 198 ] 199 configs -= [ "//build/config/win:lean_and_mean" ] 200 } 201 202 visibility = [ "../../*" ] 203} 204 205pdfium_unittest_source_set("unittests") { 206 sources = [ 207 "cfx_defaultrenderdevice_unittest.cpp", 208 "cfx_folderfontinfo_unittest.cpp", 209 "cfx_fontmapper_unittest.cpp", 210 "cfx_path_unittest.cpp", 211 "dib/cfx_cmyk_to_srgb_unittest.cpp", 212 "dib/cfx_dibbase_unittest.cpp", 213 "dib/cfx_dibitmap_unittest.cpp", 214 "dib/cstretchengine_unittest.cpp", 215 "fx_font_unittest.cpp", 216 ] 217 deps = [ 218 ":fxge", 219 "../fpdfapi/page", 220 "../fpdfapi/parser", 221 ] 222 pdfium_root_dir = "../../" 223 224 if (is_win) { 225 sources += [ "win32/cfx_psrenderer_unittest.cpp" ] 226 } 227} 228 229pdfium_embeddertest_source_set("embeddertests") { 230 sources = [ "fx_ge_text_embeddertest.cpp" ] 231 deps = [] 232 pdfium_root_dir = "../../" 233 234 if (pdf_use_skia) { 235 sources += [ "skia/fx_skia_device_embeddertest.cpp" ] 236 deps += [ 237 ":fxge", 238 "../../fpdfsdk", 239 "//skia", 240 ] 241 } 242 243 if (is_win) { 244 sources += [ "cfx_windowsrenderdevice_embeddertest.cpp" ] 245 deps += [ 246 ":fxge", 247 "../fxcodec", 248 ] 249 } 250} 251