Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Replace RasterCache::Get with RasterCache:Draw#17791

Merged
liyuqian merged 5 commits into
flutter-team-archive:masterfrom
liyuqian:raster_cache_matrix
Apr 23, 2020
Merged

Replace RasterCache::Get with RasterCache:Draw#17791
liyuqian merged 5 commits into
flutter-team-archive:masterfrom
liyuqian:raster_cache_matrix

Conversation

@liyuqian

Copy link
Copy Markdown
Contributor

This avoids the possible matrix mismatch between RasterCache::Get and
RasterCacheResult::draw. See
#17790 for an example that tries
to fix an earlier mismatch.

@liyuqian
liyuqian requested review from flar and jason-simmons April 17, 2020 21:47
@auto-assign
auto-assign Bot requested a review from iskakaushik April 17, 2020 21:47
Comment thread flow/raster_cache.cc
Comment thread flow/raster_cache_unittests.cc Outdated
Comment thread flow/raster_cache_unittests.cc Outdated
Comment thread flow/layers/picture_layer.cc

@flar flar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Comment thread flow/raster_cache.cc
@liyuqian
liyuqian force-pushed the raster_cache_matrix branch from 5981e25 to e25f277 Compare April 21, 2020 04:48
@flar

flar commented Apr 22, 2020

Copy link
Copy Markdown
Contributor

The most recent commit had the description that it was tightening the assert when, in fact, it was loosening it. Also, why was that change made?

This avoids the possible matrix mismatch between RasterCache::Get and
RasterCacheResult::draw. See
flutter-team-archive#17790 for an example that tries
to fix an earlier mismatch.
This reverts commit b428ca1.

The rare floating point error may cause the 1-off difference. Although
in most cases, they should exactly match.
@liyuqian
liyuqian force-pushed the raster_cache_matrix branch from 3742eba to 5cf9804 Compare April 22, 2020 17:22
@liyuqian

Copy link
Copy Markdown
Contributor Author

@flar : do you mean the Revert "Tighten the assert" commit? The reason of that revert is in the commit description:

The rare floating point error may cause the 1-off difference. Although
in most cases, they should exactly match.

@flar

flar commented Apr 22, 2020

Copy link
Copy Markdown
Contributor

Still LGTM...

liyuqian added a commit that referenced this pull request May 1, 2020
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Development

Successfully merging this pull request may close these issues.

3 participants