)]}'
{
  "commit": "6467d5c3c5e3a79f053ec5853fdfeefbc113ac99",
  "tree": "c74845c55cd0cae06da4c62bcf55ef33e040bda1",
  "parents": [
    "05de81ed7ef479b47318bfe2f31ee7b8483c4bd0"
  ],
  "author": {
    "name": "Jonah Williams",
    "email": "jonahwilliams@google.com",
    "time": "Fri Mar 28 18:33:08 2025 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sat Mar 29 01:33:08 2025 +0000"
  },
  "message": "[Impeller] optimize drawImageRect with blend and matrix color filter. (#165998)\n\nFixes https://github.com/flutter/flutter/issues/165959\n\nFlame uses a lot of individual calls to drawImageRect w/ blend color\nfilters to color the sprites. This is much slower with Impeller today,\nbecause we convert this into:\n\n```\nsaveLayer(color filter)\ndrawImageRect\nrestore\n```\n\nInstead, we can detect this case and convert to a call to drawAtlas.\ndrawAtlas will use the porter-duff shader which removes the saveLayer\nentirely. We could do this optimization while recording, but for now its\nfine to do in dispatch.\n\nWe do have a snapshot optimization that catches \"normal\" image usage,\nbut it doesn\u0027t apply in the flame case as the source rects are sampling\nfrom a larger texture and we don\u0027t have a way to pass those through the\nsnapshot system.\n\n## Before\n\n\u003cimg\nsrc\u003d\"https://github.com/user-attachments/assets/faada042-843f-4f15-af20-9baf862f66fd\"\nwidth\u003d\"200\"/\u003e\n\n\n## After\n\n\u003cimg\nsrc\u003d\"https://github.com/user-attachments/assets/c83e061c-190f-4613-a725-88e16b776c04\"\nwidth\u003d\"200\"/\u003e\n\n---------\n\nCo-authored-by: gaaclarke \u003c30870216+gaaclarke@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3206db5be68a3c916bb64e5e5135290c3ed6de6c",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/aiks_dl_atlas_unittests.cc",
      "new_id": "6d4d4fe5f26b7ff9da6b946e1140a301907e62e4",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/aiks_dl_atlas_unittests.cc"
    },
    {
      "type": "modify",
      "old_id": "17436c1fdc31c0207ff935ebbb8231acab6cf37c",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/canvas.cc",
      "new_id": "442c54d635b022266fd7f6d4d0ee31933a39a805",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/canvas.cc"
    },
    {
      "type": "modify",
      "old_id": "1962d48d5fde308213029fb3a26f4a7d7bfccb6e",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/canvas.h",
      "new_id": "746167bd988fa739756c7ad319edd5a7b007b576",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/canvas.h"
    },
    {
      "type": "modify",
      "old_id": "218877021dab0c3e93652dcf30c1b9ba267ee593",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/dl_atlas_geometry.cc",
      "new_id": "bcd473ab6f8b1670003ac629cca0b7e77d29002b",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/dl_atlas_geometry.cc"
    },
    {
      "type": "modify",
      "old_id": "3c29451908abe45d947051eccb534ef241170d60",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/display_list/dl_atlas_geometry.h",
      "new_id": "ed20379b5906161fe1ec77ed7f53ab3fdf01e06d",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/display_list/dl_atlas_geometry.h"
    },
    {
      "type": "modify",
      "old_id": "4f1d1d48712523a7d11f7bbcd566e33bd2b323f7",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/contents/atlas_contents.cc",
      "new_id": "6bd795a07afd5774ee99eb2a56cc02421d292723",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/contents/atlas_contents.cc"
    },
    {
      "type": "modify",
      "old_id": "a0c00467846c66176fe57599a5aee2bbe853a82b",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/contents/atlas_contents.h",
      "new_id": "f34c85f407ca39c7314ea6a37229ced97fd712d1",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/contents/atlas_contents.h"
    },
    {
      "type": "modify",
      "old_id": "0bcf9d8109799fe37593b6d1811f5cb2430acd3b",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/contents/filters/color_matrix_filter_contents.cc",
      "new_id": "337512f9a4ff501bf84bf7b6dd8c0dd4ac9cecd3",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/contents/filters/color_matrix_filter_contents.cc"
    },
    {
      "type": "modify",
      "old_id": "290e90c00fc96e668a505a4d8ad7140ee14edba2",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/contents/pipelines.h",
      "new_id": "f3998a779ead30735b4a980052fec8123768a804",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/contents/pipelines.h"
    },
    {
      "type": "modify",
      "old_id": "b8f2da6b1961b070a672be6215b7c7b466f6c193",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/entity/shaders/filters/color_matrix_color_filter.frag",
      "new_id": "c9e74b1eda0efce36b4fcc5635686e7855ccd152",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/entity/shaders/filters/color_matrix_color_filter.frag"
    },
    {
      "type": "modify",
      "old_id": "ed4cb61cbe7229396dee7306669c1e5565447e78",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/impeller/tools/malioc.json",
      "new_id": "83636d98f70dbe154de42d62533de448b6d9d2b2",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/impeller/tools/malioc.json"
    }
  ]
}
