Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Issue 642983003: cc: Make PictureLayerImpl use a better choice for animated raster scale. (Closed)

Created:
6 years, 2 months ago by danakj
Modified:
6 years, 2 months ago
Reviewers:
ajuma, vmpstr
CC:
chromium-reviews, Ian Vollick, sievers+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, enne (OOO), piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

cc: Make PictureLayerImpl use a better choice for animated raster scale. Two changes here: 1. When finding the max scale of an animation, only consider the scales at each of the animations keyframes excluding the animations origin. This is done because the origin is not an interesting scale to use, we are animating away from it. And in the case of a layer at a high scale, we are unable to raster all of its content at that scale. It would be better to use the scale at the end of the transform since that is what we will want to raster eventually. 2. When PictureLayerImpl chooses to use the animation scale: a) Always allow using it if the scale is less than the current raster scale choice. It can only put us in a better position memory-wise. b) Don't use the max() with the current raster scale choice, that means we will never use the animation scale if it is zooming out, which is not what we want. This would also mean we choose a new raster scale on every frame, which is bad. Just use the scale of the animation straight up, and if it's not known, use a source scale of 1. R=ajuma, vmpstr BUG=421812 Committed: https://crrev.com/e488f71403f5a3a9bd43629b4b9fbb7b9d3d6ff7 Cr-Commit-Position: refs/heads/master@{#299162}

Patch Set 1 #

Total comments: 6

Patch Set 2 : animationscale: onemorerename #

Total comments: 2

Patch Set 3 : animationscale: fixes #

Total comments: 8

Patch Set 4 : animationscale: direction #

Patch Set 5 : animationscale: scaledownstillcheckssize #

Total comments: 4

Patch Set 6 : animationscale: . #

Patch Set 7 : animationscale: fixtest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -200 lines) Patch
M cc/animation/animation_curve.h View 1 2 3 1 chunk +7 lines, -3 lines 0 comments Download
M cc/animation/keyframed_animation_curve.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M cc/animation/keyframed_animation_curve.cc View 1 2 3 4 5 1 chunk +21 lines, -14 lines 0 comments Download
M cc/animation/keyframed_animation_curve_unittest.cc View 1 2 3 4 5 6 4 chunks +24 lines, -5 lines 0 comments Download
M cc/animation/layer_animation_controller.h View 1 1 chunk +4 lines, -3 lines 0 comments Download
M cc/animation/layer_animation_controller.cc View 1 2 3 2 chunks +16 lines, -2 lines 0 comments Download
M cc/animation/layer_animation_controller_unittest.cc View 1 2 3 5 chunks +74 lines, -7 lines 0 comments Download
M cc/animation/transform_operations.h View 3 chunks +5 lines, -13 lines 0 comments Download
M cc/animation/transform_operations.cc View 1 chunk +0 lines, -35 lines 0 comments Download
M cc/animation/transform_operations_unittest.cc View 1 chunk +42 lines, -90 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 2 3 4 5 1 chunk +20 lines, -14 lines 0 comments Download
M cc/layers/picture_layer_impl_unittest.cc View 1 2 3 4 5 7 chunks +32 lines, -6 lines 0 comments Download
M cc/test/animation_test_common.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M cc/test/animation_test_common.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_common.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/compositor/transform_animation_curve_adapter.h View 1 2 3 4 5 2 chunks +4 lines, -2 lines 0 comments Download
M ui/compositor/transform_animation_curve_adapter.cc View 1 2 3 4 5 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (3 generated)
danakj
6 years, 2 months ago (2014-10-10 00:31:09 UTC) #1
vmpstr
https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve.cc File cc/animation/keyframed_animation_curve.cc (right): https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve.cc#newcode383 cc/animation/keyframed_animation_curve.cc:383: fmax(std::abs(target_scale_for_segment.x()), Why fmax? https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve_unittest.cc File cc/animation/keyframed_animation_curve_unittest.cc (right): https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve_unittest.cc#newcode551 cc/animation/keyframed_animation_curve_unittest.cc:551: ...
6 years, 2 months ago (2014-10-10 00:50:49 UTC) #2
danakj
PTAL https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve.cc File cc/animation/keyframed_animation_curve.cc (right): https://codereview.chromium.org/642983003/diff/1/cc/animation/keyframed_animation_curve.cc#newcode383 cc/animation/keyframed_animation_curve.cc:383: fmax(std::abs(target_scale_for_segment.x()), On 2014/10/10 00:50:48, vmpstr wrote: > Why ...
6 years, 2 months ago (2014-10-10 01:00:19 UTC) #3
vmpstr
https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc File cc/animation/keyframed_animation_curve.cc (right): https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc#newcode383 cc/animation/keyframed_animation_curve.cc:383: fmaxf(std::abs(target_scale_for_segment.x()), hehe, why fmaxf then? :P Also, should this ...
6 years, 2 months ago (2014-10-10 03:31:23 UTC) #4
danakj
https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc File cc/animation/keyframed_animation_curve.cc (right): https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc#newcode383 cc/animation/keyframed_animation_curve.cc:383: fmaxf(std::abs(target_scale_for_segment.x()), On 2014/10/10 03:31:23, vmpstr wrote: > hehe, why ...
6 years, 2 months ago (2014-10-10 05:30:11 UTC) #5
vmpstr
lgtm https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc File cc/animation/keyframed_animation_curve.cc (right): https://codereview.chromium.org/642983003/diff/400001/cc/animation/keyframed_animation_curve.cc#newcode383 cc/animation/keyframed_animation_curve.cc:383: fmaxf(std::abs(target_scale_for_segment.x()), On 2014/10/10 05:30:11, danakj wrote: > On ...
6 years, 2 months ago (2014-10-10 07:26:24 UTC) #6
ajuma
The intuition behind this approach is that we already have the content rastered at the ...
6 years, 2 months ago (2014-10-10 13:43:07 UTC) #7
danakj
On Fri, Oct 10, 2014 at 9:43 AM, <ajuma@chromium.org> wrote: > The intuition behind this ...
6 years, 2 months ago (2014-10-10 14:26:00 UTC) #8
ajuma
On 2014/10/10 14:26:00, danakj wrote: > On Fri, Oct 10, 2014 at 9:43 AM, <mailto:ajuma@chromium.org> ...
6 years, 2 months ago (2014-10-10 14:40:29 UTC) #9
danakj
On Fri, Oct 10, 2014 at 10:40 AM, <ajuma@chromium.org> wrote: > On 2014/10/10 14:26:00, danakj ...
6 years, 2 months ago (2014-10-10 15:07:10 UTC) #10
danakj
PTAL https://codereview.chromium.org/642983003/diff/400001/cc/animation/layer_animation_controller.cc File cc/animation/layer_animation_controller.cc (right): https://codereview.chromium.org/642983003/diff/400001/cc/animation/layer_animation_controller.cc#newcode506 cc/animation/layer_animation_controller.cc:506: animations_[i]->curve()->ToTransformAnimationCurve(); On 2014/10/10 13:43:07, ajuma wrote: > We ...
6 years, 2 months ago (2014-10-10 15:14:46 UTC) #11
danakj
https://codereview.chromium.org/642983003/diff/710001/cc/layers/picture_layer_impl.cc File cc/layers/picture_layer_impl.cc (right): https://codereview.chromium.org/642983003/diff/710001/cc/layers/picture_layer_impl.cc#newcode1194 cc/layers/picture_layer_impl.cc:1194: raster_contents_scale_ = 1.f * ideal_page_scale_ * ideal_device_scale_; I do ...
6 years, 2 months ago (2014-10-10 15:15:52 UTC) #12
ajuma
Thanks, lgtm with a couple comments. https://codereview.chromium.org/642983003/diff/710001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/642983003/diff/710001/cc/resources/picture_pile.cc#newcode169 cc/resources/picture_pile.cc:169: TRACE_EVENT0("cc", "PicturePile::UpdateAndExpandInvalidation"); Did ...
6 years, 2 months ago (2014-10-10 15:43:04 UTC) #13
danakj
https://codereview.chromium.org/642983003/diff/710001/cc/resources/picture_pile.cc File cc/resources/picture_pile.cc (right): https://codereview.chromium.org/642983003/diff/710001/cc/resources/picture_pile.cc#newcode169 cc/resources/picture_pile.cc:169: TRACE_EVENT0("cc", "PicturePile::UpdateAndExpandInvalidation"); On 2014/10/10 15:43:03, ajuma wrote: > Did ...
6 years, 2 months ago (2014-10-10 16:07:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/642983003/820001
6 years, 2 months ago (2014-10-10 16:10:59 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_swarming/builds/22887)
6 years, 2 months ago (2014-10-10 17:18:19 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/642983003/1030001
6 years, 2 months ago (2014-10-10 18:35:49 UTC) #20
commit-bot: I haz the power
Committed patchset #7 (id:1030001)
6 years, 2 months ago (2014-10-10 19:35:14 UTC) #21
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 19:35:55 UTC) #22
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e488f71403f5a3a9bd43629b4b9fbb7b9d3d6ff7
Cr-Commit-Position: refs/heads/master@{#299162}

Powered by Google App Engine
This is Rietveld 408576698