)]}'
{
  "commit": "d35a62dfb59e581392e421848740250816993aab",
  "tree": "a26c053379a053dd77d8e3a4c3e1804400ac9da7",
  "parents": [
    "89e298161eb3ad02d0bd634fc947bef2481005cb"
  ],
  "author": {
    "name": "Gourab Kundu",
    "email": "gourabk@microsoft.com",
    "time": "Fri Apr 24 10:29:27 2020 +0000"
  },
  "committer": {
    "name": "Chromium commit bot",
    "email": "commit-bot@chromium.org",
    "time": "Fri Apr 24 10:29:27 2020 +0000"
  },
  "message": "Add public API to support forced colors mode\n\nThe CL extends support for color scheme in PDFium to a forced\ncolor scheme which is applied when calling the new progressive\nrender API.\nThe color scheme is currently applied to only text and path.\n\nFor text rendering, the color of the text (fill and stroke) is\nchanged to the color mentioned in the color scheme.\n\nSimilarly colors for fill and stroke can be set for path rendering.\nIn addition to this there is an option to change the fill paths to\nstrokes, which is required since with fill paths using a single\ncolor, a graphics with multiple adjacent fill paths will not be\ndecipherable.\n\nAll annotations also follow the above rules, except forms (PDF\nannotation widgets like text box, combo box etc.) which\nare not part of this change, and will be taken up separately.\n\nThere also needs to be a special handling for highlight since\nthe Multiply blend mode leads to the highlights being less visible\nin some color schemes, which will be taken up separately.\n\nThe above is achieved by the following changes:\n\n1. Adding a struct for the various graphics objects in a pdf for\nwhich a color can be specified and honored. The\ncorresponding colors are set by the caller. The CL adds support\nfor only fill and stroke color of paths and text. Subsequent CLs\nwill add support for more objects.\n2. Adding a new API in the progressive rendering public APIs to\npass in the forced color scheme from the caller.\n3. Adding a structure in CPDF_RenderOptions to keep a cache of the\ncolor scheme, and a setter method for the same.\n4. Adding a new method CPDF_RenderOptions::TranslateOjectColor()\nto translate the color of an object based on its type and\nrender type to the corresponding forced color.\n5. Modifying CPDF_RenderStatus::GetFillArgbInternal() and\nCPDF_RenderStatus::GetStrokeArgb() to call the above added method for\ntranslating the color for stroke and fill paths.\n6. Modifying CPDF_RenderStatus::ProcessPathPattern() to add code to\nconvert fill paths to stroke.\n7. Adding embedder test for testing rendering using the forced color\nscheme in public APIs with different content types.\n8. Adding command line flags to pdfium_test to test forced color\nscheme rendering using a sample color scheme.\n\nBug: pdfium:1391\nChange-Id: I8b3f43eb0290d11b6a1ee2d5a36dfd1f0c0993e8\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/62270\nCommit-Queue: Gourab Kundu \u003cgourabk@microsoft.com\u003e\nReviewed-by: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "51750eacb404b054bf19648047d2940487b1e950",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/render/BUILD.gn",
      "new_id": "8fc9e53cb893ac09b76ddc6715f9bd853f642795",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/render/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "11efe9e9a670eca2f6d6dd428c4af9e6347a478d",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/render/cpdf_renderoptions.cpp",
      "new_id": "80937debe5b438ee62aee5ebced3f3cfb5033712",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/render/cpdf_renderoptions.cpp"
    },
    {
      "type": "modify",
      "old_id": "84f7e4c4aa01676fa20bee0b616a65a3731534ed",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/render/cpdf_renderoptions.h",
      "new_id": "322faaeb7a7e6b3b2ea0f0d684aea1ce11c104b2",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/render/cpdf_renderoptions.h"
    },
    {
      "type": "modify",
      "old_id": "58ce613fbe29da395fe60a12ce220a4f51959e68",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/render/cpdf_renderstatus.cpp",
      "new_id": "2a1fae7ce7db7921137149b7ec13b2ef4fc535f7",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/render/cpdf_renderstatus.cpp"
    },
    {
      "type": "modify",
      "old_id": "955d6991197fd5fb6e2386d80fd196174b333c65",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp",
      "new_id": "7b27ddfbbef912060531141a5df6ccae21deb663",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/render/fpdf_progressive_render_embeddertest.cpp"
    },
    {
      "type": "modify",
      "old_id": "2d3a95baee18fdb773e132521cf6ea9cccc081ac",
      "old_mode": 33188,
      "old_path": "fpdfsdk/cpdfsdk_helpers.cpp",
      "new_id": "33d27adf5f3e1ecec86fd7ef44aa433cedddd7cb",
      "new_mode": 33188,
      "new_path": "fpdfsdk/cpdfsdk_helpers.cpp"
    },
    {
      "type": "modify",
      "old_id": "74ae582e83b3fa2ed9da4788d2d297224c0ea884",
      "old_mode": 33188,
      "old_path": "fpdfsdk/cpdfsdk_helpers.h",
      "new_id": "73ca94692f427c836ba5fb4d99ef3891508df92f",
      "new_mode": 33188,
      "new_path": "fpdfsdk/cpdfsdk_helpers.h"
    },
    {
      "type": "modify",
      "old_id": "ce492e6fedeb236ecd2afbbede3e4bbb0292701d",
      "old_mode": 33188,
      "old_path": "fpdfsdk/cpdfsdk_renderpage.cpp",
      "new_id": "ae2fdfa0895ff0e9197ece6797d14c9affcf2eda",
      "new_mode": 33188,
      "new_path": "fpdfsdk/cpdfsdk_renderpage.cpp"
    },
    {
      "type": "modify",
      "old_id": "cb7a600b2e807f553ab01da585f03980976e1d9b",
      "old_mode": 33188,
      "old_path": "fpdfsdk/cpdfsdk_renderpage.h",
      "new_id": "0f9cdec9eaf5c067dcddd9ea23a606530107f61d",
      "new_mode": 33188,
      "new_path": "fpdfsdk/cpdfsdk_renderpage.h"
    },
    {
      "type": "modify",
      "old_id": "99a92303f486d1467cfb9183cf7e6fd923d768cb",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_progressive.cpp",
      "new_id": "7221b27a6d9a82934268ddc64c2b90af0fe184cd",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_progressive.cpp"
    },
    {
      "type": "modify",
      "old_id": "9bfd15d65fb338fd5a887c41adec9f42f817b1b1",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_view.cpp",
      "new_id": "613740b2781c96d48103f96d68311a5030555b73",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_view.cpp"
    },
    {
      "type": "modify",
      "old_id": "26b433f33f2a8d38d5e58167e8b80df907a2e79f",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_view_c_api_test.c",
      "new_id": "6d9d3081fb1cb929a5199c9d7e728becf99c1526",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_view_c_api_test.c"
    },
    {
      "type": "modify",
      "old_id": "99803b8746dba6235daee451ef4ce058e8e94ff8",
      "old_mode": 33188,
      "old_path": "public/fpdf_progressive.h",
      "new_id": "7edafb277d3b395739d85f9e306c8143d4c201ed",
      "new_mode": 33188,
      "new_path": "public/fpdf_progressive.h"
    },
    {
      "type": "modify",
      "old_id": "96a3e0ff35b85e875a75db5eee5e95d947616032",
      "old_mode": 33188,
      "old_path": "public/fpdfview.h",
      "new_id": "1e67bcbdd87304d87a5756f5ab7eba8f449b9aa4",
      "new_mode": 33188,
      "new_path": "public/fpdfview.h"
    },
    {
      "type": "modify",
      "old_id": "4f0ab7e8150f59b904e64e8822ba85e416849458",
      "old_mode": 33188,
      "old_path": "samples/pdfium_test.cc",
      "new_id": "d7f211c177fd4774c37627afd550218e3e0fdddb",
      "new_mode": 33188,
      "new_path": "samples/pdfium_test.cc"
    }
  ]
}
