# Copyright 2018 The PDFium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("../../../pdfium.gni")
import("../../../testing/test.gni")

source_set("render") {
  sources = [
    "charposlist.cpp",
    "charposlist.h",
    "cpdf_devicebuffer.cpp",
    "cpdf_devicebuffer.h",
    "cpdf_docrenderdata.cpp",
    "cpdf_docrenderdata.h",
    "cpdf_imagerenderer.cpp",
    "cpdf_imagerenderer.h",
    "cpdf_pagerendercontext.cpp",
    "cpdf_pagerendercontext.h",
    "cpdf_progressiverenderer.cpp",
    "cpdf_progressiverenderer.h",
    "cpdf_rendercontext.cpp",
    "cpdf_rendercontext.h",
    "cpdf_renderoptions.cpp",
    "cpdf_renderoptions.h",
    "cpdf_rendershading.cpp",
    "cpdf_rendershading.h",
    "cpdf_renderstatus.cpp",
    "cpdf_renderstatus.h",
    "cpdf_rendertiling.cpp",
    "cpdf_rendertiling.h",
    "cpdf_textrenderer.cpp",
    "cpdf_textrenderer.h",
    "cpdf_type3cache.cpp",
    "cpdf_type3cache.h",
    "cpdf_type3glyphmap.cpp",
    "cpdf_type3glyphmap.h",
  ]
  configs += [
    "../../../:pdfium_strict_config",
    "../../../:pdfium_noshorten_config",
  ]
  deps = [
    "../../../constants",
    "../../fxcodec",
    "../../fxcrt",
    "../../fxge",
    "../font",
    "../page",
    "../parser",
  ]
  visibility = [ "../../../*" ]
  if (is_win) {
    sources += [
      "cpdf_scaledrenderbuffer.cpp",
      "cpdf_scaledrenderbuffer.h",
      "cpdf_windowsrenderdevice.cpp",
      "cpdf_windowsrenderdevice.h",
    ]
  }
}

pdfium_unittest_source_set("unittests") {
  sources = [ "cpdf_docrenderdata_unittest.cpp" ]
  deps = [
    ":render",
    "../page",
    "../parser",
  ]
  pdfium_root_dir = "../../../"
}

pdfium_embeddertest_source_set("embeddertests") {
  sources = [
    "fpdf_progressive_render_embeddertest.cpp",
    "fpdf_render_pattern_embeddertest.cpp",
  ]
  deps = [ "../../fxge" ]
  pdfium_root_dir = "../../../"
}
