Cut 14b: analytic FlagSolidRect, static/quantized arcs, clamp Top-Left hint & Chyron wrap
This commit is contained in:
parent
93df511b60
commit
3b06b5c8ca
6 changed files with 233 additions and 43 deletions
|
|
@ -166,6 +166,23 @@ public sealed class HbGpuNativeTests
|
|||
Assert.True(drainedBytes > 0);
|
||||
Assert.Equal(0, atlas.PendingChunkCount);
|
||||
|
||||
// Verify static arc caching (0 pending chunks and 0 B GC allocs on repeat lookup)
|
||||
var staticArcKey = new VectorBlobKey(VectorShapeKind.ThermalHeatArc, 45, 1);
|
||||
CachedBlob staticArc = HbGpuVectorShapes.GetStaticArcStroke(blobs, staticArcKey, -2.356f, 0.785f, 500f, 30f);
|
||||
Assert.True(staticArc.IsValid);
|
||||
Assert.True(staticArc.AtlasOffset < HbGpuAtlasAllocator.DynamicBase);
|
||||
atlas.ClearPending();
|
||||
|
||||
long arcGcBefore = GC.GetAllocatedBytesForCurrentThread();
|
||||
for (int i = 0; i < 64; i++)
|
||||
{
|
||||
CachedBlob hit = HbGpuVectorShapes.GetStaticArcStroke(blobs, staticArcKey, -2.356f, 0.785f, 500f, 30f);
|
||||
Assert.Equal(staticArc.AtlasOffset, hit.AtlasOffset);
|
||||
}
|
||||
long arcGcAfter = GC.GetAllocatedBytesForCurrentThread();
|
||||
Assert.Equal(0, arcGcAfter - arcGcBefore);
|
||||
Assert.Equal(0, atlas.PendingChunkCount);
|
||||
|
||||
// Verify dynamic ring wrap-around
|
||||
for (int i = 0; i < 600; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue