Skip to content

Commit

Permalink
Fix the issue of inconsistent contentDuration values obtained from PA…
Browse files Browse the repository at this point in the history
…GImageLayer between iOS and Android platforms. (#2265)

Co-authored-by: kevingpqi <[email protected]>
  • Loading branch information
kevingpqi123 and kevingpqi123 committed Apr 23, 2024
1 parent b2fcd22 commit b6ce2a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rendering/layers/PAGImageLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,10 +411,10 @@ Frame PAGImageLayer::ScaleTimeRemap(AnimatableProperty<float>* property,
if (keyframe->startTime < 0) {
CutKeyframe(keyframe, 0, true);
}
minValue = std::floor(std::min(keyframe->startValue, minValue));
minValue = std::floor(std::min(keyframe->endValue, minValue));
maxValue = std::floor(std::max(keyframe->startValue, maxValue));
maxValue = std::floor(std::max(keyframe->endValue, maxValue));
minValue = std::round(std::min(keyframe->startValue, minValue));
minValue = std::round(std::min(keyframe->endValue, minValue));
maxValue = std::round(std::max(keyframe->startValue, maxValue));
maxValue = std::round(std::max(keyframe->endValue, maxValue));
}
for (auto& keyframe : keyframes) {
keyframe->startValue -= minValue;
Expand Down

0 comments on commit b6ce2a5

Please sign in to comment.