)]}'
{
  "commit": "f538bd753dfc836556885d9e2d16933917adcd35",
  "tree": "9c9e5b3cd69c6824c06eddf44b0fc3225fd04c9d",
  "parents": [
    "4a6a70a0dcfd3e453c8d34caf60ad05dfd982e7e"
  ],
  "author": {
    "name": "Brandon DeRosier",
    "email": "bdero@google.com",
    "time": "Thu Jul 30 13:23:47 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jul 30 20:23:47 2026 +0000"
  },
  "message": "[Flutter GPU] Bind uniforms and textures by cached reflection index (#189820)\n\nFixes https://github.com/flutter/flutter/issues/189819.\n\n`RenderPass.bindUniform` and `RenderPass.bindTexture` passed the uniform\nname across the FFI boundary as a string on every call, and the native\nside allocated a `std::string` and resolved the binding through a\nstring-keyed map lookup per bind, per draw.\n\n`UniformSlot` now resolves the binding\u0027s index in the shader\u0027s\nreflection data once, caches it, and binds through new index-taking\nentry points. `Shader.getUniformSlot` memoizes slots by name so per-draw\nlookups share the cache, and a reload epoch re-resolves cached indices\nafter a shader library hot reload. The name-keyed entry points remain,\nand public API behavior is unchanged.\n\nIn a benchmark submitting ~10k draws per frame (flutter_scene\u0027s stress\nharness, macOS/Metal, profile engine, A/B at the same revision), CPU\nrender time improves 7-12% at p50.\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\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[breaking change policy]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes\n[Data Driven Fixes]:\nhttps://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "df25c61528a6b82b3341ba98599f5ff08f36f773",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/lib/src/buffer.dart",
      "new_id": "e8f1984e79b46307d7355aad01001324527caa2c",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/lib/src/buffer.dart"
    },
    {
      "type": "modify",
      "old_id": "a6f42d1d3da1dc0960cbbf6ef6e528c989d57229",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/lib/src/render_pass.dart",
      "new_id": "040231ae6add8bbbd7e0d2e8a381e816834b0f9d",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/lib/src/render_pass.dart"
    },
    {
      "type": "modify",
      "old_id": "001bfc34671cc7b446a01547e159f206785a1bc9",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/lib/src/shader.dart",
      "new_id": "b568cd9b0d14887db94890fec4c15ea3c134cfbb",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/lib/src/shader.dart"
    },
    {
      "type": "modify",
      "old_id": "22f1a1a64f7989bf277538da267c7e5145df703f",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/lib/src/shader_library.dart",
      "new_id": "37d5a8480798de7c0ce76933a615a8fd5ef99f5f",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/lib/src/shader_library.dart"
    },
    {
      "type": "modify",
      "old_id": "3f2ec0152d49f1f423dc882d8f43ff60b6eacf27",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/render_pass.cc",
      "new_id": "cbe5bbc12dd6f3eabe29ea0f41a959ffe5a5182c",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/render_pass.cc"
    },
    {
      "type": "modify",
      "old_id": "2a40293a0b48a35b3b9edf909f31d7c44a4c43f6",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/render_pass.h",
      "new_id": "ae72c0b5e6b6cec453d33c8ad696bac9a67cd190",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/render_pass.h"
    },
    {
      "type": "modify",
      "old_id": "31c9470404009cfb289c929d2a6788ba104d7162",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/shader.cc",
      "new_id": "c2ff9954f501a545fbb6e0b0639534450ebfe96e",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/shader.cc"
    },
    {
      "type": "modify",
      "old_id": "feae2821a8cf8b8cbdd8586725423bf718e5f365",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/lib/gpu/shader.h",
      "new_id": "b9429bc5f61bae596e4e55173530d6e397510648",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/lib/gpu/shader.h"
    },
    {
      "type": "modify",
      "old_id": "652c337d11897e4ac1c79fce521da282d50a577b",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/testing/dart/gpu_test.dart",
      "new_id": "b31d0ce8c46873ddfb8ec30126f906a4d61a2345",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/testing/dart/gpu_test.dart"
    }
  ]
}
