)]}'
{
  "commit": "dc23e93841d20060743e490ef49c1e0d0d22cf40",
  "tree": "6a239b5c64b76091820b47cf18724d623d1f20f4",
  "parents": [
    "870728006298e8e31a4030fdf9547639ddab2eda"
  ],
  "author": {
    "name": "Laurenz Stampfl",
    "email": "47084093+LaurenzV@users.noreply.github.com",
    "time": "Mon Jul 20 09:51:02 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Mon Jul 20 07:51:02 2026 +0000"
  },
  "message": "vello_common: Generalize the command recorder abstraction and add more metadata (#1746)\n\nThis PR is based on #1745. It changes the semantics of the command\nrecorder, turning it into something more akin to a scene graph (we\nshould probably rename it in the future!).\n\nUp until now, the command recorder was written in a way that is only\n\"useful\" to Vello CPU. Most notably, normal layers would be folded into\ntheir parent stream, and only filter layers had an explicit\nrepresentation as an independent unit. For Vello Hybrid, this is not a\nsuitable representation, because _all_ layers need to be represented\nexplicitly and be rendered independently from the other layers.\n\nTo achieve this goal, this PR implements some changes, split up into two\ncommits.\n\nThe first commit represents a refactor of the overall representation.\nMost notably:\n\n- It is generic over an unspecified draw type. We need this because, in\naddition to normal path fills as used by Vello CPU, Vello Hybrid also\nsupports fast path rects, which have a different inner representation.\nTherefore, the actual draw type need to be able to be specified by each\nbackend independently.\n- Instead of only treating filter layers as having their own root\ncommands, now every kind of layer has their own command stream. Vello\nCPU will internally still ensure that they are inlined, but the crucial\npoint is that this assumption is not baked into the generic\nrepresentation anymore, so Vello Hybrid can do something different here.\n- Instead of having four commands \"Fill`, \"PushLayer\", \"FilterLayerFill\"\nand \"PopLayer\" , we represent the whole scene as a tree of nodes, where\neach node represent a number of batched draw commands, followed by an\noptional layer invocation. Basically, we interleave normal draws and\nlayer fills in a way such that they can be iterated over more easily.\nThe fact that we represent a batch of draw commands as a simple range of\ndraw commands instead of a flat array of inlined draw commands helped\ntremendously when building the new Vello Hybrid scheduler. Also, all\ndraw commands now end up in a global buffer which we can reuse more\neasily across frames. The only downside is one more layer of indirection\nper batch for Vello CPU, which is completely negligible.\n- Since each layer now only stores a `Vec\u003cNode\u003e`, which is likely to be\nvery small, I decided to remove the `VecPool` for this. I don\u0027t think\nit\u0027s worth it trying to reuse those across frames.\n\nThe second commit ensures that we store some more metadata about the\nscene, which is needed for Vello Hybrid. Yes, we do pay some additional\ncost for Vello CPU here, but it\u0027s basically nothing.\n\n### PR train\n\n1. #1744 — Move some code from `vello_cpu` to `vello_common`\n2. #1745 — Add more new/refactored code into `vello_common`\n3. #1746 — Generalize the command recorder abstraction and add more\nmetadata 👈\n4. #1751 — Introduce `Padding` and streamline clip handling",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "434150b97d7712e9bfaeeaea3072cb221c47e685",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_common/src/record.rs",
      "new_id": "e29c6e9da295514effea7ca6c51100b1952f14b8",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_common/src/record.rs"
    },
    {
      "type": "modify",
      "old_id": "88657851d700e28b16f5f783d230ff260fc0dc57",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_cpu/src/coarse/bucketer.rs",
      "new_id": "b928d7d9c24f32d0bd6b5f9fcf66b34bbc2734e2",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/coarse/bucketer.rs"
    },
    {
      "type": "modify",
      "old_id": "ea52e12bf805c7e1403d69d20223212521b5aebb",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs",
      "new_id": "54a707e81e7308fadb8b2ac94b442a6900f856d0",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/dispatch/multi_threaded.rs"
    },
    {
      "type": "modify",
      "old_id": "340d3722a660d20ac0a49bc9abbaa027c6719429",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_cpu/src/dispatch/single_threaded.rs",
      "new_id": "6fc7718a0e951a8bfdb930a3f4084a6320cf130c",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/dispatch/single_threaded.rs"
    },
    {
      "type": "modify",
      "old_id": "2a363f3639427435b662ac9b3b6aa712e73bdcbf",
      "old_mode": 33188,
      "old_path": "sparse_strips/vello_cpu/src/lib.rs",
      "new_id": "f4b772a0f7ddfa2dfac0b6f1c18f5f53c53fa89d",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/lib.rs"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "70f17abea08251335fc38418075c928d7c9dc9ef",
      "new_mode": 33188,
      "new_path": "sparse_strips/vello_cpu/src/record.rs"
    }
  ]
}
