)]}'
{
  "commit": "1d790af2e336b3a4707c81b2117da194d359db99",
  "tree": "905b5f1e0437f42c382f2a522083fe288d0abca3",
  "parents": [
    "5474d4420c4b64c1e33e8f362cf08aa2ef0fc6bc"
  ],
  "author": {
    "name": "b-luk",
    "email": "97480502+b-luk@users.noreply.github.com",
    "time": "Tue Sep 01 01:39:26 2026 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Sep 01 01:39:26 2026 +0000"
  },
  "message": "Support wide gamut colors in gradient_generator\u0027s CreateGradientTexture (#191980)\n\nThis is a prerequisite to re-implementing\nhttps://github.com/flutter/flutter/pull/190874. This addresses the\nunsupported wide gamut issue which was originally present in that PR and\nwhich caused it to be reverted.\n\nRelated: https://github.com/flutter/flutter/issues/190401\n\n### Previously:\n- `CreateGradientBuffer` converts a gradient\u0027s colors and stops to an\ninterpolated list of colors. This interpolated list of colors is\nconverted to bytes with `ToR8G8B8A8()` and is returned in a\n`GradientData`.\n- The `R8G8B8A8` `GradientData` is passed to `CreateGradientTexture`,\nwhich allocates a `PixelFormat::kR8G8B8A8UNormInt` texture.\n\nWide gamut colors can\u0027t be converted to `R8G8B8A8`, so they end up\ngetting clamped.\n\n### Now:\n- `CreateGradientBuffer` converts a gradient\u0027s colors and stops to an\ninterpolated list of colors (same as before). But now no conversion to\nbytes happens here. The interpolated list of colors is directly returned\nin a `GradientData`.\n- The `Color`-based `GradientData` is passed to `CreateGradientTexture`.\n`CreateGradientTexture` now handles the conversion to bytes. If there\nare wide gamut colors, it converts to `kR32G32B32A32Float`. Otherwise it\ndoes the old behavior of converting to `PixelFormat::kR8G8B8A8UNormInt`.\n\n## Pre-launch Checklist\n\n- [x] I read the [Contributor Guide] and followed the process outlined\nthere for submitting PRs.\n- [x] I read the [AI contribution guidelines] and understand my\nresponsibilities, or I am not using AI tools.\n- [x] I read the [Tree Hygiene] wiki page, which explains my\nresponsibilities.\n- [x] I read and followed the [Flutter Style Guide], including [Features\nwe expect every widget to implement].\n- [x] I signed the [CLA].\n- [x] I listed at least one issue that this PR fixes in the description\nabove.\n- [x] I updated/added relevant documentation (doc comments with `///`).\n- [x] I added new tests to check the change I am making, or this PR is\n[test-exempt].\n- [x] I followed the [breaking change policy] and added [Data Driven\nFixes] where supported.\n- [x] All existing and new tests are passing.\n\nIf you need help, consider asking for advice on the #hackers-new channel\non [Discord].\n\nIf this change needs to override an active code freeze, provide a\ncomment explaining why. The code freeze workflow can be overridden by\ncode reviewers. See pinned issues for any active code freezes with\nguidance.\n\n**Note**: The Flutter team is currently trialing the use of [Gemini Code\nAssist for\nGitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).\nComments from the `gemini-code-assist` bot should not be taken as\nauthoritative feedback from the Flutter team. If you find its comments\nuseful you can update your code accordingly, but if you are unsure or\ndisagree with the feedback, please feel free to wait for a Flutter team\nmember\u0027s review for guidance on which automated comments should be\naddressed.\n\n\u003c!-- Links --\u003e\n[Contributor Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview\n[AI contribution guidelines]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines\n[Tree Hygiene]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md\n[test-exempt]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests\n[Flutter Style Guide]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md\n[Features we expect every widget to implement]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement\n[CLA]: https://cla.developers.google.com/\n[flutter/tests]: https://github.com/flutter/tests\n[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Discord]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f83c1424d9c2ec15106c6326b55517384ff8dc70",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/contents/gradient_generator.cc",
      "new_id": "75b3d71e9ef9f87a36b69310d74d488645f62fa4",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/contents/gradient_generator.cc"
    },
    {
      "type": "modify",
      "old_id": "740c3ea4227166d1c798401820fa10b294373f39",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/geometry/color.h",
      "new_id": "cd9d75cee6ab7dfbeb6a8e439f7ed5c9b4e7b5db",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/geometry/color.h"
    },
    {
      "type": "modify",
      "old_id": "d805a595f6207e8a6151949aafc16a00c972903a",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/geometry/geometry_unittests.cc",
      "new_id": "69a5a8c017646c4dc8cb5b37a9db00e20aba55ce",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/geometry/geometry_unittests.cc"
    },
    {
      "type": "modify",
      "old_id": "9aabf8bdc9170fc94446fc3e38f4fb05424c3cca",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/geometry/gradient.cc",
      "new_id": "03f6c7a3be5447e46991dbd22ef592945008050b",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/geometry/gradient.cc"
    },
    {
      "type": "modify",
      "old_id": "551ec129f0a2f135dde438edeff6e1eb9aaf7664",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/geometry/gradient.h",
      "new_id": "3281ef82c4c036614a026a51e7bb6ea910092f0f",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/geometry/gradient.h"
    }
  ]
}
