)]}'
{
  "commit": "899764b6f7c3986d0dd29d38187ed2f0ddd537cd",
  "tree": "437fe56d31b3c7d9fb880f9707a7b7ef904ede18",
  "parents": [
    "88e87cd963f9788f12cc568a19da3a7dda17ce44"
  ],
  "author": {
    "name": "b-luk",
    "email": "97480502+b-luk@users.noreply.github.com",
    "time": "Wed Jul 08 23:06:17 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jul 09 06:06:17 2026 +0000"
  },
  "message": "UberSDF rect handling for thin (line-like) rectangles (#188821)\n\nImplements a custom filledRectSDF function in UberSDF with some custom\nbehavior in order to properly handle dimensions of around 1 pixel and\nless.\n\nSimilar thin-shape logic may also be applicable for other shapes in\nUberSDF. But I\u0027m limiting this PR to just change the behavior for filled\nrectangle behavior. This is the most common use of very thin shapes\n(thin rects are often used for lines). Other shapes being drawn thinly\nwould be rare corner cases, I\u0027d expect. If we want to consider other\nshapes, that should be a follow-up.\n\nThis change adds gamma correction to the alpha of all SDF shapes. So I\nexpect a lot of golden changes. There will be changes small color\nchanges to the AA fringe of every shape.\n\nFactors out common code in the existing `HairlinePath` and\n`HairlineDrawLine` playground/golden tests. Expands these with new\nversions that draw thin (`width\u003d0.3`), rotated thin, and one pixel\nlines. And adds \"Rect\" versions which draw the same shape with\n`drawRect` instead of `drawPath` or `drawLine`.\n\nFixes https://github.com/flutter/flutter/issues/188591\n\n## Screenshot\n\nUberSDF drawRect with this PR, using the demo app from\nhttps://github.com/flutter/flutter/issues/188590 which draws lines at\nevery incremental 0.01 offset::\n\u003cimg height\u003d\"300\" alt\u003d\"image\"\nsrc\u003d\"https://github.com/user-attachments/assets/98fdc589-dc91-4b70-b848-64dc6c9409cf\"\n/\u003e\n\nCompare with the screenshots of various drawing lining methods in\nhttps://github.com/flutter/flutter/issues/188590. The new lines have\nvery consistent brightness, and have no disappearing issues.\n\n## Videos\n\nUsing the hairline/thinline drawing playground tests.\n\nNote that github\u0027s UI seems to not allow showing the video at actual\nsize, so what you see inline is not completely accurate. But it\u0027s pretty\nclose. If you want to see what it looks like at full size, I think\nyou\u0027ll have to download the videos.\n\n### UberSDF drawRect with this PR:\n\n\nhttps://github.com/user-attachments/assets/89d8e1dd-1bcc-4211-b081-6255f5c8d55b\n\n### UberSDF drawRect existing behavior:\n\n\nhttps://github.com/user-attachments/assets/c4cd4fac-7fec-4024-9320-0b6526daf73e\n\n### LineContents AA drawline:\n\n\nhttps://github.com/user-attachments/assets/a6f70f40-82c8-415a-9490-4222b757f7ce\n\n### Tesselation drawRect\n\n\nhttps://github.com/user-attachments/assets/1f75fc06-32ec-449b-8553-67b98565482d\n\n### Tesselation drawLine\n\n\nhttps://github.com/user-attachments/assets/23515419-c890-4bd1-8428-55ff55d68518\n\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- [ ] 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": "e5a969360f64629d507cddd0ba041547149c86c4",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/aiks_dl_path_unittests.cc",
      "new_id": "6434f3bf73a010d04f1c99d4cf9e408ae7f56e16",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/aiks_dl_path_unittests.cc"
    },
    {
      "type": "modify",
      "old_id": "0b2e35926bf85468262f746bdd1b81ca9385a364",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/canvas.cc",
      "new_id": "07da7cefb4d6455d7715cba91b00c1d7b5b3ec08",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/canvas.cc"
    },
    {
      "type": "modify",
      "old_id": "d15ea608803e81159185f39ba3158055bd70980d",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/shaders/uber_sdf.frag",
      "new_id": "aa2d34945047dc997d82f2c03ffec585ae24378f",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/shaders/uber_sdf.frag"
    },
    {
      "type": "modify",
      "old_id": "4b1bd6f3bb1dfd03cf1fb18b24683a66d3ba59c2",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/tools/malioc.json",
      "new_id": "9b947115f9f8def7f75b3047e983c78514a9de80",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/tools/malioc.json"
    }
  ]
}
