@aardworx/wombat.rendering 0.18.1 → 0.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/renderObject.d.ts +16 -0
- package/dist/core/renderObject.d.ts.map +1 -1
- package/dist/runtime/heapAdapter.d.ts.map +1 -1
- package/dist/runtime/heapAdapter.js +24 -0
- package/dist/runtime/heapAdapter.js.map +1 -1
- package/dist/runtime/heapScene/freelist.d.ts +5 -0
- package/dist/runtime/heapScene/freelist.d.ts.map +1 -1
- package/dist/runtime/heapScene/freelist.js +28 -0
- package/dist/runtime/heapScene/freelist.js.map +1 -1
- package/dist/runtime/heapScene/pools.d.ts +19 -0
- package/dist/runtime/heapScene/pools.d.ts.map +1 -1
- package/dist/runtime/heapScene/pools.js +115 -12
- package/dist/runtime/heapScene/pools.js.map +1 -1
- package/dist/runtime/heapScene.d.ts +21 -1
- package/dist/runtime/heapScene.d.ts.map +1 -1
- package/dist/runtime/heapScene.js +237 -10
- package/dist/runtime/heapScene.js.map +1 -1
- package/dist/runtime/hybridScene.d.ts +8 -0
- package/dist/runtime/hybridScene.d.ts.map +1 -1
- package/dist/runtime/hybridScene.js +15 -0
- package/dist/runtime/hybridScene.js.map +1 -1
- package/dist/runtime/textureAtlas/atlasPool.d.ts +12 -0
- package/dist/runtime/textureAtlas/atlasPool.d.ts.map +1 -1
- package/dist/runtime/textureAtlas/atlasPool.js +20 -0
- package/dist/runtime/textureAtlas/atlasPool.js.map +1 -1
- package/package.json +2 -2
- package/src/core/renderObject.ts +16 -0
- package/src/runtime/heapAdapter.ts +24 -0
- package/src/runtime/heapScene/freelist.ts +35 -0
- package/src/runtime/heapScene/pools.ts +131 -12
- package/src/runtime/heapScene.ts +257 -11
- package/src/runtime/hybridScene.ts +23 -0
- package/src/runtime/textureAtlas/atlasPool.ts +19 -0
|
@@ -611,6 +611,25 @@ export class AtlasPool {
|
|
|
611
611
|
this.lru.set(e.ref, e);
|
|
612
612
|
}
|
|
613
613
|
|
|
614
|
+
/**
|
|
615
|
+
* Bump refcount on an entry that's already live (used by the heap
|
|
616
|
+
* path when a cached HeapDrawSpec is re-introduced: the spec already
|
|
617
|
+
* carries `poolRef` from the original acquire, but every add/remove
|
|
618
|
+
* cycle fires the release closure once — without a matching incRef
|
|
619
|
+
* the refcount underflows and the entry gets actuallyFree'd while
|
|
620
|
+
* live drawHeaders still reference it).
|
|
621
|
+
*
|
|
622
|
+
* Returns `true` if the bump was applied; `false` if the entry has
|
|
623
|
+
* been evicted in the meantime (caller must fall back to re-acquire).
|
|
624
|
+
*/
|
|
625
|
+
incRef(ref: number): boolean {
|
|
626
|
+
const e = this.entriesByRef.get(ref);
|
|
627
|
+
if (e === undefined) return false;
|
|
628
|
+
if (e.refcount === 0) this.lru.delete(e.ref);
|
|
629
|
+
e.refcount++;
|
|
630
|
+
return true;
|
|
631
|
+
}
|
|
632
|
+
|
|
614
633
|
/**
|
|
615
634
|
* Drop an LRU entry for real: remove its packer slot, drop the entry
|
|
616
635
|
* from every lookup map. Caller must guarantee `refcount === 0`.
|