)]}'
{
  "commit": "85983f43cd08a92fc79eeff5c8dc3c3eef302b07",
  "tree": "715836552cc5787625435cd9335a1a125de2c481",
  "parents": [
    "26046f36c61c5b3a083965c5ceb03d2576f08f33"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "thestig@chromium.org",
    "time": "Mon Mar 04 20:12:42 2024 +0000"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Mar 04 20:12:42 2024 +0000"
  },
  "message": "Add CPDF_ColorSpace::GetColorRef()\n\nGetColorRef() is a wrapper around GetRGB() that returns a\nstd::optional\u003cFX_COLORREF\u003e. For it to work correctly, the GetRGB()\nresults are clamped before being rounded to become integer color\ncomponents. PDF 32000-1:2008 section 8.6.5.6 says to adjust to the\nnearest valid value when the value is out of range, so this is trying\nto implement that. With this change, update the associated pixel test\nresult now that a large positive value clamps down to 1.\n\nChange CPDF_Color::GetRGB() to use GetColorRef(), so the FX_COLORREF\nvalues just pass straight through. Now GetRGB() no longer needs to do\nmanual rounding and FX_COLORREF construction. As a result, it cannot\ncause undefined behavior if the GetRGB() values are outside of the range\n[0, 1].\n\nAlso change CPDF_PatternCS::GetPatternRGB() to call GetColorRef().\nChange the GetPatternRGB() return type to match GetColorRef() to avoid\nextra conversions. This finally gets rid of dead code where\nGetPatternRGB() writes to the out-parameters and then returns false so\nthe out-parameters do not get used.\n\nBug: b/324312389\nChange-Id: I10852794803c7c9b9881ac3d835e9545b5dabab5\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117094\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\nReviewed-by: Thomas Sepez \u003ctsepez@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "32ffaeb4413ba5129d88c1b35c53ba6e241b6f55",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/page/cpdf_color.cpp",
      "new_id": "73bc00fed24559eeed7971b980377fb93428d0bf",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/page/cpdf_color.cpp"
    },
    {
      "type": "modify",
      "old_id": "6468ae09ca7ca90aec146cc3ee7221b842190b82",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/page/cpdf_colorspace.cpp",
      "new_id": "d458d5ebc7988c353b29d474dadf4da76cf3d1c2",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/page/cpdf_colorspace.cpp"
    },
    {
      "type": "modify",
      "old_id": "e6a10ddd9b6063deca271570f60beadc9ed25c1e",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/page/cpdf_colorspace.h",
      "new_id": "8be74e5cacf65ed955e407344fccf4b59a8fa402",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/page/cpdf_colorspace.h"
    },
    {
      "type": "modify",
      "old_id": "462bf67541604205369d354cbaf4ae9c34a979a6",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/page/cpdf_patterncs.cpp",
      "new_id": "c35886214e69ba7e1ff64b0975a8ca964896ce61",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/page/cpdf_patterncs.cpp"
    },
    {
      "type": "modify",
      "old_id": "896a95ccd4678cc15e7eabf13a48561f5f9dfcfb",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/page/cpdf_patterncs.h",
      "new_id": "2fba8345a53d09f746aa22c413c5dbb6dcd9d31e",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/page/cpdf_patterncs.h"
    },
    {
      "type": "modify",
      "old_id": "f6f907e2f807683b9ed831fecb4850726ed0e927",
      "old_mode": 33188,
      "old_path": "testing/resources/pixel/icc_profile_bad_value_expected.pdf.0.png",
      "new_id": "319932a74767dd91a3c6ab8c6b2a12b4ce1afd60",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/icc_profile_bad_value_expected.pdf.0.png"
    }
  ]
}
