Improve raster scale for nested and unknown-scale transform animations #27207
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When calculating the maximum animation to screen scale, for a nested
or unknown-scale transform animation, use the parent's maximum
animation scale instead of kInvalidScale which would fallback to
page_scale * device_scale which ignored ancestor scales.
When adjusting raster scale for transform animation, use
max(raster_contents_scale_, maximum_animation_scale).
In normal cases, if the former is bigger than the latter, it means
that raster_contents_scale_ calculated when the animation starts is
more accurate than the maximum_animation_scale calculated by the
cc/animation subsystem.
In case that a bigger scale than 1.5x of the previous calculated
animation scale, force an raster scale. The case should be rare.
Bug: 1165408
Change-Id: Ieccdb9e16fb6f151e74a881855ce3655e857c372
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633800
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Robert Flack <flackr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844899}