hellohuanlin 34f5c82ffc [ios]ignore single edge pixel instead of rounding (flutter/engine#51687)
The previous PR https://github.com/flutter/flutter/issues/143420 rounds out the layers and rounds in the platform views. This results in missing pixel on the edge of the intersection when there's fractional coordinate (as shown in the screenshot below), because platform view is below the layers. 

It turns out that we have to round out both platform view and layers, because: 
- rounding in platform view rects will result in missing pixels on the edge of the intersection. 
- rounding in layer rects will result in missing pixels on the edge of the layer that's on top of the platform view. 

This PR simply skips the single (or partial) pixel on the edge, which is a special case, while still preserve the `roundOut` behavior for general non-edge cases. 

Before the fix, notice a very thin gray line cutting through the purple box: 

<img src="https://github.com/flutter/engine/assets/41930132/1482d81a-337e-4841-ac08-eff08bbc71ef" height="500">

Then after the fix, the gray line is gone: 

<img src="https://github.com/flutter/engine/assets/41930132/0eddae69-ab62-4de6-8932-c67cc5aced73" height="500">

*List which issues are fixed by this PR. You must list at least one issue.*

https://github.com/flutter/flutter/issues/143420

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-03-27 16:46:19 +00:00
..