[skottie] Fix default cubic controls detection
C0 & C1 are swapped and being compared against the wrong defeault values. Swap again to avoid instantiating unnecessary SkCubicMappers. TBR= Change-Id: Ie26c28805b3b4517ca65f8e715e27a2eb65fe700 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228061 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
8c31f2bf7f
commit
dc02c3ed01
@ -133,14 +133,14 @@ protected:
|
||||
// default is linear lerp
|
||||
static constexpr SkPoint kDefaultC0 = { 0, 0 },
|
||||
kDefaultC1 = { 1, 1 };
|
||||
const auto c0 = ParseDefault<SkPoint>((*jframe)["i"], kDefaultC0),
|
||||
c1 = ParseDefault<SkPoint>((*jframe)["o"], kDefaultC1);
|
||||
const auto c0 = ParseDefault<SkPoint>((*jframe)["o"], kDefaultC0),
|
||||
c1 = ParseDefault<SkPoint>((*jframe)["i"], kDefaultC1);
|
||||
|
||||
int cm_idx = -1;
|
||||
if (c0 != kDefaultC0 || c1 != kDefaultC1) {
|
||||
// TODO: is it worth de-duping these?
|
||||
cm_idx = SkToInt(fCubicMaps.size());
|
||||
fCubicMaps.emplace_back(c1, c0);
|
||||
fCubicMaps.emplace_back(c0, c1);
|
||||
}
|
||||
|
||||
fRecs.push_back({t0, t0, v0_idx, v1_idx, cm_idx });
|
||||
|
Loading…
Reference in New Issue
Block a user