)]}'
{
  "commit": "ab019649830592e17593f96429dac7e3ae6524f2",
  "tree": "bcef31779d7abdc6d661af553d915802f6e17175",
  "parents": [
    "4bfc78a90fa8b5b171073a992c824d76e16d9565"
  ],
  "author": {
    "name": "Jordan Bayles",
    "email": "jophba@google.com",
    "time": "Wed Jun 03 19:03:40 2026"
  },
  "committer": {
    "name": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "email": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Jul 02 00:27:27 2026"
  },
  "message": "desktop_capture: Fix SetFrameDataToBlack() to correctly support YUV/I420 black\n\nCurrently, SetFrameDataToBlack() assumes the frame format is always\nARGB/BGRA (4 bytes per pixel packed) and uses a flat memset to 0x00,\nwhich correctly represents transparent black for RGB.\n\nHowever, for YUV/I420 formats, zero-initializing the buffer results\nin Y\u003d0, U\u003d0, V\u003d0, which maps to a distinct medium-dark green in RGB.\nWhen I420 desktop frames are cleared (e.g. inside Chromium\u0027s scaling and\npillarbox/letterbox margin rendering pipeline), the margins render\nas bright green sidebars instead of black.\n\nThis refactors SetFrameDataToBlack() to inspect the pixel_format()\nand correctly fill the Y plane to 0x00, and U/V planes to 0x80 (128)\nfor standard YUV formats (FOURCC_I420, FOURCC_YV12, FOURCC_YU12,\nFOURCC_IYUV), yielding grayscale black.\n\nAlso adds a new test to desktop_frame_unittest to verify that YUV\nblack is set correctly.\n\nBug: webrtc:518064225\nChange-Id: Iec72c02084e60dea938b25cf8c2f8301e481526d\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/476903\nReviewed-by: Alexander Cooper \u003calcooper@chromium.org\u003e\nCommit-Queue: Jordan Bayles \u003cjophba@google.com\u003e\nReviewed-by: Mark Foltz \u003cmfoltz@chromium.org\u003e\nCr-Commit-Position: refs/heads/main@{#48140}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bfba612c829eb4f7fa3eb8888928fea198a222a1",
      "old_mode": 33188,
      "old_path": "modules/desktop_capture/desktop_frame.cc",
      "new_id": "14f99fbf2b8c4607f441ed4c4878bb606bb6e20b",
      "new_mode": 33188,
      "new_path": "modules/desktop_capture/desktop_frame.cc"
    },
    {
      "type": "modify",
      "old_id": "a29cc8eed3e8f1cdadfe395041e07bbcfd006bcc",
      "old_mode": 33188,
      "old_path": "modules/desktop_capture/desktop_frame_unittest.cc",
      "new_id": "f570904f588a5b976c56f12e72a43c16657a7669",
      "new_mode": 33188,
      "new_path": "modules/desktop_capture/desktop_frame_unittest.cc"
    }
  ]
}
