)]}'
{
  "commit": "0342d1d685560c8704e3376aec8f0133db013fc3",
  "tree": "43ce8e82560c5f22d05815a6bda54fe59f02af5c",
  "parents": [
    "918736cd321a80a92a1bcf4d3e5bc9f20e52488c"
  ],
  "author": {
    "name": "Chris Bracken",
    "email": "chris@bracken.jp",
    "time": "Tue Nov 05 10:01:37 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Nov 05 18:01:37 2024 +0000"
  },
  "message": "iOS: Refactor ShellTestPlatformViewMetal (#56370)\n\nMigrates DarwinContextMetal to a plain C struct, eliminating the need for constructor, getters, etc. since it\u0027s only used in this translation unit. The fields themselves cannot be inlined as fields on ShellTestPlatformViewMetal because the header in which that class is defined is included in plain C++ (non-Obj-C++) translation units and therefore cannot contain Obj-C types.\r\n\r\nThis simplifies the code and simultaneously fixes complicated ARC behaviour in which the const \"DarwinContextMetal::context()\" getter caused retainCount to be incremented on the underlying context_ pointer, but not decremented even if never unassigned. In particular the line\r\n```objc\r\nFML_CHECK([metal_context-\u003econtext() mainContext]));\r\n```\r\nappeared to cause refcount to be incremented but never decremented.\r\n\r\nRegardless of the ARC issue, this significantly simplifies the code.\r\n\r\nThis also eliminates the last remaining use of fml::scoped_nsobject in Flutter\u0027s codebase. That class will be removed in a followup PR.\r\n\r\nNo test changes since there is no change to semantics.\r\n\r\nIssue: https://github.com/flutter/flutter/issues/137801\r\n\r\n[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8e2d9f2174b3ac8efa03be96a7dcfbc2d3f36716",
      "old_mode": 33188,
      "old_path": "shell/common/BUILD.gn",
      "new_id": "a2cd2be4834650265b98959b4f304a7624f12f3b",
      "new_mode": 33188,
      "new_path": "shell/common/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "c5c0a8d454d046e1b189e6e0dd56b29fe42957c8",
      "old_mode": 33188,
      "old_path": "shell/common/shell_test_platform_view_metal.h",
      "new_id": "afebef88eaedf613bb9ebe65157484b6d87050d7",
      "new_mode": 33188,
      "new_path": "shell/common/shell_test_platform_view_metal.h"
    },
    {
      "type": "modify",
      "old_id": "94345527bcc31e84ed82050bf917748151d6c803",
      "old_mode": 33188,
      "old_path": "shell/common/shell_test_platform_view_metal.mm",
      "new_id": "2ee350b2a19be2ba812b41aca8174f2669b7586c",
      "new_mode": 33188,
      "new_path": "shell/common/shell_test_platform_view_metal.mm"
    }
  ]
}
