)]}'
{
  "commit": "3b68918d191472c79b502cbf345f4a5602d3ae20",
  "tree": "2cf4319e268c90ceb57992c2d5c8edadab9906bf",
  "parents": [
    "399cc8b8d02e51c30bffdacc71fcacabdb5d79c1"
  ],
  "author": {
    "name": "hernan",
    "email": "hernan@rive.app",
    "time": "Fri Nov 20 20:58:22 2026 -0800"
  },
  "committer": {
    "name": "hernan",
    "email": "hernan@rive.app",
    "time": "Fri Nov 20 20:58:22 2026 -0800"
  },
  "message": "fix(runtime): let two layer masks share one source (#15959)\n\n* fix(runtime): let two layer masks share one source\n\nBoth masks splice a source bracket around the same drawables, so the second\nlands inside the first. The outer mask\u0027s coverage pass skips only its own\nopening marker, so it met the inner one\u0027s, which suppressed the source. The\nmask measured no coverage and, in alpha mode, erased its whole layer.\n\nSource brackets now suppress only in the normal pass. While a mask measures\nor draws its coverage, Artboard::drawsMaskCoverage() is set and a source\nmarker\u0027s emptyClipCount() is 0. The editor\u0027s Dart coverage pass already\ndraws each mask\u0027s source members this way.\n\n* fix(runtime): re-raster a mask when its coverage context changes\n\nA mask nested in a source that also draws normally is visited twice a\nframe: on screen, and inside the outer mask\u0027s coverage pass, where source\nbrackets no longer suppress. If its range holds a source bracket, the two\nvisits draw different content. The raster cache ignored that, so the\nsecond visit reused the first one\u0027s pixels: a suppressed source could\nstay on screen, or go missing from the outer mask\u0027s coverage.\n\nLayerMask now records whether its rasters were drawn in a coverage pass\nand re-rasters when that flips, but only if its range holds a source\nbracket (Drawable::isMaskSourceStart). Other nested masks still share one\nraster between the two visits.\n\n* fix(runtime): draw a nested mask\u0027s content as on screen in coverage\n\n26ebd474c4 re-rasterized a mask when its coverage context flipped. But a\nframe replays only the last raster each canvas recorded, so both consumers\nstill sampled the same one. Revert it and remove the need instead: a\nmask\u0027s content now always draws as on screen, even when the mask is drawn\ninside another mask\u0027s coverage pass. Only a mask\u0027s own source measurement\nand coverage draw stop source brackets from suppressing, so its rasters\nare the same wherever it is drawn.\n\nSource markers also no longer pass willDraw(). Whenever their count is 0\n(in coverage, or for a mask whose source also draws), they reached\nrangeDrawBounds as drawables with no bounds. It then fell back to the\nartboard box, which crops content past an unclipped artboard\u0027s edge.\n\nRive-Mono-Commit: 0407ff420b194ec6c0cabdb81bdf6392eb6dc00d\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3dab7b6a56bfe2bab25dce6a309b36bc6804bcdb",
      "old_mode": 33188,
      "old_path": "include/rive/artboard.hpp",
      "new_id": "81e7b7aabec8fc2a28f723809674e6135395dff5",
      "new_mode": 33188,
      "new_path": "include/rive/artboard.hpp"
    },
    {
      "type": "modify",
      "old_id": "172a4735615fd2ae0a74006b291e079ff2ebf457",
      "old_mode": 33188,
      "old_path": "include/rive/layer_mask.hpp",
      "new_id": "5e5dd70420a10557f56856ad76a10599cd8958d4",
      "new_mode": 33188,
      "new_path": "include/rive/layer_mask.hpp"
    },
    {
      "type": "modify",
      "old_id": "ffe32cee084862a1170a20e08996b74d43e1c232",
      "old_mode": 33188,
      "old_path": "src/artboard.cpp",
      "new_id": "bea55df6344ed7b00314c8f37f0b23928fe365cc",
      "new_mode": 33188,
      "new_path": "src/artboard.cpp"
    },
    {
      "type": "modify",
      "old_id": "71655ff9a816175af992477884235423c6614bb9",
      "old_mode": 33188,
      "old_path": "src/layer_mask.cpp",
      "new_id": "548f03e4c494a74d7c308115becaed800c418f0a",
      "new_mode": 33188,
      "new_path": "src/layer_mask.cpp"
    },
    {
      "type": "modify",
      "old_id": "421f68ada2419ee249bd724cfbbed056962c454d",
      "old_mode": 33188,
      "old_path": "tests/unit_tests/runtime/layer_mask_test.cpp",
      "new_id": "aef4fdde8e266ce41312f8ac6ab2480e6f1cfb2c",
      "new_mode": 33188,
      "new_path": "tests/unit_tests/runtime/layer_mask_test.cpp"
    }
  ]
}
