liyuqian 28d99854a6
Reland again "Remove layer integral offset snapping #17112" (#18160)
This reverts commit a7a25d3b57f2066798ef8cd43600588e4697c9cd and relands our reland https://github.com/flutter/engine/pull/17915.

Additionally, we fixed the cull rect logic in `OpacityLayer::Preroll` which is  the root cause of https://github.com/flutter/flutter/issues/56298. We've always had that root problem before but it did not trigger performance issues because we were using the OpacityLayer's `paint_bounds`, instead of its child's `paint_bounds` for preparing the layer raster cache. A correct handling of the cull rect should allow us to cull at any level.

It also turns out that our ios32 (iPhone4s) performacne can regress a lot
without snapping. My theory is that although the picture has a
fractional top left corner, many drawing operations inside the picture
have integral coordinations. In older hardwares, keeping those
coordinates integral seems to be performance critical.

To avoid flutter/flutter#41654, the snapping
will still be disabled if the matrix has non-scale-translation
transformations.
2020-05-07 17:19:30 -07:00
..
2020-04-02 13:04:49 -07:00
2020-04-02 13:04:49 -07:00
2020-01-24 12:43:32 -08:00
2019-12-02 16:38:03 -08:00