Avoid mutating NonInterpolableValue to set additive flags
Instead of having an AdditiveKeyframeHook function which "patches" the InterpolationValue after it's created, this CL introduces the MakeAdditive function, which takes an InterpolationValue as input, and returns a new InterpolationValue with necessary flags set. This means we will need to copy the NonInterpolableValue in some cases, which *is* more expensive than poking the existing value. However, I think it's worth it if we can make NonInterpolableValues immutable (which will happen in a subsequent CL). Long term we might want to create the correct NonInterpolableValue in the first place, by passing the state we need to the converters. Bug: 981024 Change-Id: I897e176d38346a1c724e79dea028701bd33f922d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1724510 Commit-Queue: Anders Hartvoll Ruud <andruud@chromium.org> Reviewed-by:Robert Flack <flackr@chromium.org> Cr-Commit-Position: refs/heads/master@{#682639}
Showing
Please register or sign in to comment