Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland "Remove layer integral offset snapping" #17915

Merged
merged 5 commits into from
May 1, 2020

Conversation

liyuqian
Copy link
Contributor

This reverts commit b5aedb3 and relands #17712.

Fixes flutter/flutter#53288 and flutter/flutter#41654.

Together with #17791, this reland addresses some of Jim's concerns in the original PR #17712.

The major part of this PR is still the same as the original PR, and the performance / golden image impacts should be the same.

flow/layers/opacity_layer.cc Show resolved Hide resolved
flow/layers/picture_layer.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

flow/raster_cache.cc Outdated Show resolved Hide resolved
@liyuqian liyuqian force-pushed the reland branch 3 times, most recently from b06f73f to 54046d7 Compare May 1, 2020 17:38
@liyuqian
Copy link
Contributor Author

liyuqian commented May 1, 2020

@flar : I've finally made the golden tests pass by using the images that Emmanuel sent me.

Copy link
Contributor

@flar flar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@liyuqian liyuqian merged commit 4e29736 into flutter:master May 1, 2020
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 2, 2020
@liyuqian liyuqian deleted the reland branch May 4, 2020 16:39
@liyuqian
Copy link
Contributor Author

liyuqian commented May 4, 2020

This will be reverted in #18132 due to a performance regression.

liyuqian added a commit that referenced this pull request May 8, 2020
This reverts commit a7a25d3 and relands our reland #17915.

Additionally, we fixed the cull rect logic in `OpacityLayer::Preroll` which is  the root cause of flutter/flutter#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Raster cache's integral translation snapping is broken
3 participants