< Summary

Class:GPUSkinning.GPUSkinningThrottler
Assembly:RenderUtils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/Utils/GPUSkinning/GPUSkinningThrottler.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:28
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GPUSkinningThrottler(...)0%2100%
SetThrottling(...)0%2100%
TryUpdate()0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/Utils/GPUSkinning/GPUSkinningThrottler.cs

#LineLine coverage
 1namespace GPUSkinning
 2{
 3    public class GPUSkinningThrottler
 4    {
 5        internal static int startingFrame = 0;
 6
 7        internal readonly SimpleGPUSkinning gpuSkinning;
 8        internal int framesBetweenUpdates;
 9        internal int currentFrame;
 10
 011        public GPUSkinningThrottler(SimpleGPUSkinning gpuSkinning)
 12        {
 013            this.gpuSkinning = gpuSkinning;
 014            framesBetweenUpdates = 1;
 015            currentFrame = startingFrame++;
 016        }
 17
 018        public void SetThrottling(int newFramesBetweenUpdates) { framesBetweenUpdates = newFramesBetweenUpdates; }
 19
 20        public void TryUpdate()
 21        {
 022            currentFrame++;
 023            if (currentFrame % framesBetweenUpdates == 0)
 024                gpuSkinning.Update();
 025        }
 26
 27    }
 28}