)]}'
{
  "commit": "289f4919b58e349ccbca39fe23e8cd3d0acadc86",
  "tree": "39ba87cb611341e60c2a03b9bfb3fad46f03753a",
  "parents": [
    "537f7d1da25815e73fba2cdeaf4073eb2c8c04b8"
  ],
  "author": {
    "name": "Taj Pereira",
    "email": "taj@canva.com",
    "time": "Wed Sep 17 09:50:20 2025 +1000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Sep 16 23:50:20 2025 +0000"
  },
  "message": "Glyph Caches: Hinting Instances + Outline Paths (#1215)\n\nWe found that ~80% of the time in preparing a glyph to render is in\nbuilding hinting instances and extracting glyph outlines as shown by the\nbelow profile.\n\n\u003cimg width\u003d\"1751\" height\u003d\"608\" alt\u003d\"image\"\nsrc\u003d\"https://github.com/user-attachments/assets/6b862072-15b8-4ffc-b6e0-069ee38e4a9b\"\n/\u003e\n\n\nThis PR adds LRU caches for hinting instances and getting outlines. The\nstrategy mimics the one used by [Vello\nClassic](https://github.com/linebender/vello/blob/main/vello_encoding/src/glyph_cache.rs)\nfor simplicity.\n\nThe outline cache grows to accommodate all the glyphs that can be\nrendered in a given frame and runs its eviction process within the\nrenderer\u0027s `flush` function. Since outlines are relatively cheap on\nmemory, I think that this approach is better than checking cache bounds\non each access.\n\nNote: This implies that `flush` must always be called once per frame for\nhybrid like vello cpu. But, I think this is fine. It\u0027s likely we\u0027ll want\nto run some things in a multi threaded environment in hybrid at some\npoint.\n\nDepending on the text being rendered, we\u0027ve observed significant boosts\nto performance using this PR. In Vello Hybrid testing, for a super\nsimple text field, we\u0027ve observed 100+ FPS boost. It\u0027s hard to tell at\nthis stage what real world performance will be seen.\n\n## Future Work\n\n- Only pay for `font_ref.outline_glyphs()` when we actually need it or\nuse an acceleration data structure to generate it.\n- Instead of storing outline paths in the outline cache, store\ntranslatable strips (to totally bypass strip rendering).",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0bf4f31bdc221068969cb79573c32ad625b88553",
      "old_mode": 33188,
      "old_path": "Cargo.lock",
      "new_id": "d613fe1c4a73d92c87a68a39b83ab7a97e15eec9",
      "new_mode": 33188,
      "new_path": "Cargo.lock"
    },
    {
      "type": "modify",
      "old_id": "f9b85f7ea5df766e4a00f79b38f10bb7978d4e6f",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_bench/Cargo.toml",
      "new_id": "d35ebe213afd67d4b6681910c594f4fee5a8b6db",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_bench/Cargo.toml"
    },
    {
      "type": "modify",
      "old_id": "a190640f2e50ea3cb06f5b3805db2d5a8d291358",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_bench/README.md",
      "new_id": "c9afaffc3a3fb518822858d087041e65bb06b034",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_bench/README.md"
    },
    {
      "type": "modify",
      "old_id": "c9d83a01b4dec8a5150c0f5f3c7ecb41b2344f3f",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_bench/benches/main.rs",
      "new_id": "daf4b9dfa9ecabf5761dcd4b3b10730b1a72ae40",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_bench/benches/main.rs"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "32ff50996358dea7d9e03d926df2cd277d40344e",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_bench/src/glyph.rs"
    },
    {
      "type": "modify",
      "old_id": "6e492145fd7c5afba93937fe123380bdfa42721d",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_bench/src/lib.rs",
      "new_id": "a0d5f572d7e726b53323d2d7139a3a6aeb7d3b73",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_bench/src/lib.rs"
    },
    {
      "type": "modify",
      "old_id": "68493a74e64cf85cb74e316ef1ef5d3e4e46cc16",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_common/Cargo.toml",
      "new_id": "e4cf8b6c51ec24c58671bfee26a60e16392eee3b",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_common/Cargo.toml"
    },
    {
      "type": "modify",
      "old_id": "c43ded4ff4a1ce932ffbc3e4695105fc9cae6bd6",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_common/src/glyph.rs",
      "new_id": "17c8e78de132d8117bdf79c0bfd2025a0d32710e",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_common/src/glyph.rs"
    },
    {
      "type": "modify",
      "old_id": "dd6064fa493df4cee76b0e5486f1308e2b7952cd",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_common/src/recording.rs",
      "new_id": "4481b23ce75d8a40150c17bdac9ce933e8b0a770",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_common/src/recording.rs"
    },
    {
      "type": "modify",
      "old_id": "393bb40899acd847cbc2657d8a80035f8127220a",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_cpu/src/render.rs",
      "new_id": "502911edb863e531de7e8c1831dd4e0b1940db38",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/render.rs"
    },
    {
      "type": "modify",
      "old_id": "52bd696c5022d9ebb8823205cdba01ace5f05941",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_hybrid/src/scene.rs",
      "new_id": "806dda8f3dc8caf1cd09c6a03d632251d48b797a",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_hybrid/src/scene.rs"
    },
    {
      "type": "modify",
      "old_id": "4d87b7e5a2828d996575a09a408c792ab304f2b8",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_sparse_tests/tests/renderer.rs",
      "new_id": "ef5a6a046a87f04ef6cc32fb8aeca560cd7c25cd",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_sparse_tests/tests/renderer.rs"
    }
  ]
}
