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

Issue 238313003: Web Animations API: Reuse cached InterpolableValue during interpolation (Closed)

Created:
6 years, 8 months ago by alancutter (OOO until 2018)
Modified:
6 years, 1 month ago
CC:
blink-reviews, rjwright, Mike Lawther (Google), dstockwell, Timothy Loh, darktears, Steve Block, dino_apple.com, Eric Willigers
Visibility:
Public.

Description

Web Animations API: Reuse cached InterpolableValue during interpolation This change avoids allocating new InterpolableValues on every sample by updating the existing InterpolableValue cache in Interpolations. TEST=AnimationInterpolableValueTest

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Rename interpolate() #

Patch Set 4 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -44 lines) Patch
M Source/core/animation/InterpolableValue.h View 1 2 3 6 chunks +12 lines, -10 lines 0 comments Download
M Source/core/animation/InterpolableValue.cpp View 1 2 3 2 chunks +30 lines, -33 lines 0 comments Download
M Source/core/animation/Interpolation.cpp View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (1 generated)
alancutter (OOO until 2018)
6 years, 8 months ago (2014-04-15 08:42:42 UTC) #1
shans
On 2014/04/15 08:42:42, alancutter wrote: I want to think about this a bit more. At ...
6 years, 8 months ago (2014-04-15 11:53:43 UTC) #2
shans
On 2014/04/15 11:53:43, shans wrote: > On 2014/04/15 08:42:42, alancutter wrote: > > I want ...
6 years, 8 months ago (2014-04-15 11:55:13 UTC) #3
alancutter (OOO until 2018)
On 2014/04/15 11:53:43, shans wrote: > On 2014/04/15 08:42:42, alancutter wrote: > > I want ...
6 years, 8 months ago (2014-04-16 00:33:33 UTC) #4
alancutter (OOO until 2018)
On 2014/04/15 11:53:43, shans wrote: > I want to think about this a bit more. ...
6 years, 7 months ago (2014-05-02 07:06:11 UTC) #5
alancutter (OOO until 2018)
On 2014/05/02 07:06:11, alancutter wrote: > Measured this change to have ~2.3% drop in the ...
6 years, 7 months ago (2014-05-02 07:11:24 UTC) #6
Stephen Chennney
I was going with adding a result to the interpolation method, which has the same ...
6 years, 1 month ago (2014-11-10 18:20:22 UTC) #8
shans
On 2014/11/10 18:20:22, Stephen Chenney wrote: > I was going with adding a result to ...
6 years, 1 month ago (2014-11-10 19:24:00 UTC) #9
Stephen Chennney
On 2014/11/10 19:24:00, shans wrote: > On 2014/11/10 18:20:22, Stephen Chenney wrote: > > I ...
6 years, 1 month ago (2014-11-10 21:19:13 UTC) #10
alancutter (OOO until 2018)
On 2014/11/10 19:24:00, shans wrote: > On 2014/11/10 18:20:22, Stephen Chenney wrote: > > I ...
6 years, 1 month ago (2014-11-10 22:10:45 UTC) #11
shans
On 2014/11/10 21:19:13, Stephen Chenney wrote: > On 2014/11/10 19:24:00, shans wrote: > > On ...
6 years, 1 month ago (2014-11-10 23:03:48 UTC) #12
shans
On 2014/11/10 22:10:45, alancutter wrote: > On 2014/11/10 19:24:00, shans wrote: > > On 2014/11/10 ...
6 years, 1 month ago (2014-11-10 23:04:42 UTC) #13
shans
6 years, 1 month ago (2014-11-10 23:28:33 UTC) #14
On 2014/11/10 23:04:42, shans wrote:
> On 2014/11/10 22:10:45, alancutter wrote:
> > On 2014/11/10 19:24:00, shans wrote:
> > > On 2014/11/10 18:20:22, Stephen Chenney wrote:
> > > > I was going with adding a result to the interpolation method, which has
> the
> > > same
> > > > effect. I'm fine with this approach.
> > > > 
> > > > There's no way I can see this hurting performance. And it will
definitely
> > help
> > > > Oilpan. No reason to delay as far as I am concerned.
> > > > 
> > > > Once this is done, I was thinking of moving the type specialization up
to
> > > > Interpolator, and get rid of InterpolableValue entirely. We'd then have
> even
> > > > less memory allocation per animation. It seems this might run into
> problems
> > > with
> > > > the legacy methods.
> > > 
> > > Actually, I think adding a result to the interpolation method would be
> cleaner
> > > and easier to understand.
> > > Do you want to prepare a patch that does that? Otherwise I'm happy to do
it,
> > or
> > > I'm sure Alan would too.
> > 
> > Adding a result parameter to InterpolableValue::interpolate() seems like it
> > would no longer take advantage of virtual method dispatch the way
> > assignInterpolation() does currently. I'm not sure that would end up being
any
> > cleaner but I'm happy to be proven wrong.
> 
> Why not? It's just a matter of which value you're traversing. Currently the
> start
> value is traversed, your patch changes that to the output value. Either way,
> virtual dispatch is used to decide which interpolation to call.

See https://codereview.chromium.org/712143003

Powered by Google App Engine
This is Rietveld 408576698