)]}'
{
  "commit": "e95e12368a42ad4260bc5c849c60ec37f26b93e9",
  "tree": "429f932d4c5082c561eaf0d4d614160d02bb90cc",
  "parents": [
    "b5e79bd249b86cc0ace626d3d06b3154da6d4731"
  ],
  "author": {
    "name": "Loïc Sharma",
    "email": "737941+loic-sharma@users.noreply.github.com",
    "time": "Tue Jan 02 15:31:04 2024 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jan 02 23:31:04 2024 +0000"
  },
  "message": "Revert \"Reland \"[Windows] Move to FlutterCompositor for rendering\" (#49461)\n\nThis reverts https://github.com/flutter/engine/pull/49262 (https://github.com/flutter/engine/commit/00d7d23fb5b97fd71f28a53ab4dcc9493ec585a7) as it regressed [`material_floating_search_bar`](https://pub.dev/packages/material_floating_search_bar_2)\u0027s animation.\r\n\r\nThis revert was created manually due to merge conflicts.\r\n\r\nIssue tracking bug: https://github.com/flutter/flutter/issues/140828\r\n\r\nPart of https://github.com/flutter/flutter/issues/128904\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eMinimal repro of the broken animation...\u003c/summary\u003e\r\n\r\nHere\u0027s what the animation is supposed to look like:\r\n![good](https://publish-01.obsidian.md/access/b48ac8ca270cd9dac18c4a64d11b1c02/assets/2023-12-28-compositor_animation_regression_good.gif)\r\n\r\nHere\u0027s what the animation actually looks like: ![bad](https://publish-01.obsidian.md/access/b48ac8ca270cd9dac18c4a64d11b1c02/assets/2023-12-28-compositor_animation_regression_bad.gif)\r\n\r\nHere is a minimal repro of the broken animation:\r\n\r\n```dart\r\n// The Windows compositor changes regresses the animation in\r\n// the `material_floating_search_bar_2` package:\r\n// \r\n// https://pub.dev/packages/material_floating_search_bar_2/versions/0.5.0\r\n//\r\n// Below is a minimal repro of the broken animation. This has two pieces:\r\n//\r\n//  1. The background fades to a grey color\r\n//  2. A box is \"revealed\" using a custom clipper\r\n//\r\n// On framework commit b417fb828b332b0a4b0c80b742d86aa922de2649 this animation is broken on Windows.\r\n// On framework commit 9c2a7560096223090d38bbd5b4c46760be396bc1 this animation works as expected on Windows.\r\n//\r\n// Good gif: https://publish-01.obsidian.md/access/b48ac8ca270cd9dac18c4a64d11b1c02/assets/2023-12-28-compositor_animation_regression_good.gif\r\n// Bad gif: https://publish-01.obsidian.md/access/b48ac8ca270cd9dac18c4a64d11b1c02/assets/2023-12-28-compositor_animation_regression_bad.gif\r\nimport \u0027dart:math\u0027;\r\nimport \u0027dart:ui\u0027;\r\n\r\nimport \u0027package:flutter/material.dart\u0027;\r\n\r\nvoid main() {\r\n  runApp(const MyApp());\r\n}\r\n\r\nclass MyApp extends StatelessWidget {\r\n  const MyApp({super.key});\r\n\r\n  @override\r\n  Widget build(BuildContext context) {\r\n    // Not using `MaterialApp` is necessary to reproduce:\r\n    return Container(\r\n      color: Colors.white,\r\n      child: const Directionality(\r\n        textDirection: TextDirection.ltr,\r\n        child: FloatingSearchBar(),\r\n      ),\r\n    );\r\n\r\n    // Switching to `MaterialApp` fixes the issue:\r\n    // return const MaterialApp(\r\n    //   home: Scaffold(\r\n    //     body: FloatingSearchBar(),\r\n    //   ),\r\n    // );\r\n  }\r\n}\r\n\r\nclass FloatingSearchBar extends StatefulWidget {\r\n  const FloatingSearchBar({super.key});\r\n\r\n  @override\r\n  FloatingSearchBarState createState() \u003d\u003e FloatingSearchBarState();\r\n}\r\n\r\nclass FloatingSearchBarState extends State\u003cFloatingSearchBar\u003e with SingleTickerProviderStateMixin {\r\n  late final AnimationController _controller \u003d AnimationController(\r\n    vsync: this,\r\n    duration: const Duration(seconds: 2),\r\n  );\r\n\r\n  @override\r\n  void dispose() {\r\n    _controller.dispose();\r\n    super.dispose();\r\n  }\r\n\r\n  void _animate() {\r\n    if (_controller.isDismissed || _controller.status \u003d\u003d AnimationStatus.reverse) {\r\n      _controller.forward();\r\n    } else {\r\n      _controller.reverse();\r\n    }\r\n  }\r\n\r\n  @override\r\n  Widget build(BuildContext context) {\r\n    return AnimatedBuilder(\r\n      animation: _controller,\r\n      builder: (BuildContext context, _) {\r\n        return Stack(\r\n          children: \u003cWidget\u003e[\r\n            if (!_controller.isDismissed)\r\n              FadeTransition(\r\n                opacity: _controller,\r\n                child: const SizedBox.expand(\r\n                  child: DecoratedBox(\r\n                    decoration: BoxDecoration(color: Colors.black26),\r\n                  ),\r\n                ),\r\n              ),\r\n\r\n            _buildSearchBar(),\r\n          ],\r\n        );\r\n      },\r\n    );\r\n  }\r\n\r\n  Widget _buildSearchBar() {\r\n    return Column(\r\n      crossAxisAlignment: CrossAxisAlignment.stretch,\r\n      children: \u003cWidget\u003e[\r\n        // This is where the search text input would go...\r\n        GestureDetector(\r\n          onTap: () \u003d\u003e _animate(),\r\n          child: Text(\r\n            switch (_controller.status) {\r\n              AnimationStatus.forward || AnimationStatus.completed \u003d\u003e \u0027Click to close\u0027,\r\n              AnimationStatus.reverse || AnimationStatus.dismissed \u003d\u003e \u0027Click to open\u0027,\r\n            },\r\n            style: const TextStyle(color: Colors.black),\r\n          ),\r\n        ),\r\n        \r\n        // Below are where the search results would be. Clicking on the search\r\n        // input above reveals the results below.\r\n\r\n        // Removing this fixes the background\u0027s fade transition.\r\n        ClipOval(\r\n          clipper: _CircularRevealClipper(\r\n            fraction: _controller.value,\r\n          ),\r\n          child: DecoratedBox(\r\n            decoration: BoxDecoration(\r\n              color: Colors.white,\r\n              // Removing this line fixes the background\u0027s fade transition.\r\n              borderRadius: BorderRadius.circular(16.0),\r\n            ),\r\n            child: const Padding(\r\n              padding: EdgeInsets.all(64.0),\r\n              child: Text(\r\n                \u0027Hello world\u0027,\r\n                style: TextStyle(color: Colors.black),\r\n              ),\r\n            ),\r\n          ),\r\n        ),\r\n      ],\r\n    );\r\n  }\r\n}\r\n\r\nclass _CircularRevealClipper extends CustomClipper\u003cRect\u003e {\r\n  const _CircularRevealClipper({required this.fraction});\r\n\r\n  final double fraction;\r\n\r\n  @override\r\n  Rect getClip(Size size) {\r\n    final double halfWidth \u003d size.width * 0.5;\r\n    final double maxRadius \u003d sqrt(halfWidth * halfWidth + size.height * size.height);\r\n    final double radius \u003d lerpDouble(0.0, maxRadius, fraction) ?? 0;\r\n\r\n    return Rect.fromCircle(\r\n      center: Offset(halfWidth, 0),\r\n      radius: radius,\r\n    );\r\n  }\r\n\r\n  @override\r\n  bool shouldReclip(CustomClipper\u003cRect\u003e oldClipper) {\r\n    if (oldClipper is _CircularRevealClipper) {\r\n      return oldClipper.fraction !\u003d fraction;\r\n    }\r\n\r\n    return true;\r\n  }\r\n}\r\n\r\n```\r\n\r\n\u003c/details\u003e\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": "e4b2b123554675982df3cd8fa32f5b8b97a4f197",
      "old_mode": 33188,
      "old_path": "ci/licenses_golden/excluded_files",
      "new_id": "3e41760234bc02c1b0ac4f6decebb6c8bd3b8f2d",
      "new_mode": 33188,
      "new_path": "ci/licenses_golden/excluded_files"
    },
    {
      "type": "modify",
      "old_id": "9a00e8054cbedc3db9fa6023e41e18d1fb38b66c",
      "old_mode": 33188,
      "old_path": "ci/licenses_golden/licenses_flutter",
      "new_id": "9a1de1da99d92cead7b3e2cbfe94ea944e078647",
      "new_mode": 33188,
      "new_path": "ci/licenses_golden/licenses_flutter"
    },
    {
      "type": "modify",
      "old_id": "40d583bca535dfab05a9aff118a45a7883a86084",
      "old_mode": 33188,
      "old_path": "impeller/renderer/backend/gles/description_gles.cc",
      "new_id": "a2142c1191444e25c57dd18c645f0763343b0f54",
      "new_mode": 33188,
      "new_path": "impeller/renderer/backend/gles/description_gles.cc"
    },
    {
      "type": "modify",
      "old_id": "818ea0d0cc35831a73f84670a3f5f20b18811e16",
      "old_mode": 33188,
      "old_path": "impeller/renderer/backend/gles/description_gles.h",
      "new_id": "dac13cab614223c6020c6753f01fd3f13398d4e2",
      "new_mode": 33188,
      "new_path": "impeller/renderer/backend/gles/description_gles.h"
    },
    {
      "type": "modify",
      "old_id": "f5f4bf7115ec89b449425ce2451bdc21498a37bc",
      "old_mode": 33188,
      "old_path": "shell/platform/linux/fl_backing_store_provider.cc",
      "new_id": "643e9a343621eb00078e00bd41c94259e401c6d8",
      "new_mode": 33188,
      "new_path": "shell/platform/linux/fl_backing_store_provider.cc"
    },
    {
      "type": "modify",
      "old_id": "4bebc496bfd377ca500c46ce855f7f6bc37b7abb",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/BUILD.gn",
      "new_id": "ecc908096599366d66fd01af09ca98334530809f",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/BUILD.gn"
    },
    {
      "type": "delete",
      "old_id": "c7691f53e85101a9480845af4979acbeb552cee0",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor.h",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "6da274b99399e3639c10cc451f58f3d4876f34f9",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_opengl.cc",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "06c22202332e22f6d1b9f1b6c3c487bdd5f91756",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_opengl.h",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "74c26d8f39e178d7674552d08acc333e6c38a600",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_opengl_unittests.cc",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "6f6353cbe269c813455febf03353dc7273e1c068",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_software.cc",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "c4e39111b3c1fcc848dc71db0a22aceacc09fbfa",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_software.h",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "delete",
      "old_id": "bef9fca3061b75a20c32dd46be8b127451b7ac6d",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/compositor_software_unittests.cc",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "b7630340ecfd5b55fda61f116d48fd01d60a3ac8",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_window.cc",
      "new_id": "2558d4fc5864a9a6822540a68ba732169d373fb0",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_window.cc"
    },
    {
      "type": "modify",
      "old_id": "e461476d3917548e6b917d9fd3552a671f1ce8eb",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_window.h",
      "new_id": "08d2186cfe042125e1fe1bc41caa901147bec67b",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_window.h"
    },
    {
      "type": "modify",
      "old_id": "3bf140c38b7cdf2582aefa3a5869182b3d328f26",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_windows_engine.cc",
      "new_id": "8f093f046c644c244524eb201e453f53560efa43",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_windows_engine.cc"
    },
    {
      "type": "modify",
      "old_id": "9e60f860f6e3c026b8cf26ab4fa8203103d40533",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_windows_engine.h",
      "new_id": "4406b4235b36fd6b545a39bf8b3c9b346324dbe2",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_windows_engine.h"
    },
    {
      "type": "modify",
      "old_id": "13c10ed4491d6824e970588073366539dad51f0c",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_windows_view.cc",
      "new_id": "6646bbfd1c1e84052a110e0f33bdc0de7493f2a3",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_windows_view.cc"
    },
    {
      "type": "modify",
      "old_id": "cacc845bf614d8445e575731cc04a122a4dca4dc",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_windows_view.h",
      "new_id": "abada094c32f1961ef56cb61dd787099740decae",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_windows_view.h"
    },
    {
      "type": "modify",
      "old_id": "75d29cfeab3e37bdfdfcf0d57e9bfa1af75e8b0d",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/flutter_windows_view_unittests.cc",
      "new_id": "341d70f86b60e53a4dd22048029dba271cd915eb",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/flutter_windows_view_unittests.cc"
    },
    {
      "type": "modify",
      "old_id": "22185f057ac4c421da6a16e2d1f5124a8783b956",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/testing/mock_window_binding_handler.h",
      "new_id": "39ec93d9ece8941e6b83eff63b9185e4071d361a",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/testing/mock_window_binding_handler.h"
    },
    {
      "type": "modify",
      "old_id": "29f4c6b8eba2464e6b085acdb07a73770aad1992",
      "old_mode": 33188,
      "old_path": "shell/platform/windows/window_binding_handler.h",
      "new_id": "ecdef862f0c61f3d1fc77e8c989a8556db8e5842",
      "new_mode": 33188,
      "new_path": "shell/platform/windows/window_binding_handler.h"
    }
  ]
}
