@solidtv/renderer 1.5.1 → 1.5.3

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.
@@ -296,6 +296,30 @@ export interface RendererRuntimeSettings {
296
296
  */
297
297
  boundsMargin: number | [number, number, number, number];
298
298
 
299
+ /**
300
+ * Only submit quads for Nodes that intersect the visible viewport.
301
+ *
302
+ * @remarks
303
+ * Nodes inside the bounds margin (`boundsMargin`) but outside the visible
304
+ * viewport still update and still load their textures (the margin remains
305
+ * the preload runway), but they stay out of the render list until they
306
+ * actually intersect the viewport — no quad writes, texture binds, or draw
307
+ * calls for content the GPU would clip anyway.
308
+ *
309
+ * Set to `false` to restore the previous behavior, where margin-ring Nodes
310
+ * are fully rendered every frame and clipped by the GPU. That keeps
311
+ * render-list membership stable ahead of scrolling at the cost of
312
+ * per-frame CPU for the off-screen ring.
313
+ *
314
+ * Trade-offs when enabled: the `renderable` event and autosize patching
315
+ * fire at viewport entry instead of margin entry, render-list rebuilds
316
+ * move to the visible edge (same frequency, different timing), and
317
+ * margin-ring content inside RTT subtrees is skipped.
318
+ *
319
+ * @defaultValue `true`
320
+ */
321
+ renderOnlyInViewport: boolean;
322
+
299
323
  /**
300
324
  * Factor to convert app-authored logical coorindates to device logical coordinates
301
325
  *
@@ -722,6 +746,7 @@ export class RendererMain extends EventEmitter {
722
746
  appHeight: settings.appHeight || 1080,
723
747
  textureMemory: resolvedTxSettings,
724
748
  boundsMargin: settings.boundsMargin || 0,
749
+ renderOnlyInViewport: settings.renderOnlyInViewport ?? true,
725
750
  deviceLogicalPixelRatio: settings.deviceLogicalPixelRatio || 1,
726
751
  devicePhysicalPixelRatio:
727
752
  settings.devicePhysicalPixelRatio || this.windowDevicePixelRatio() || 1,
@@ -791,6 +816,7 @@ export class RendererMain extends EventEmitter {
791
816
  appWidth,
792
817
  appHeight,
793
818
  boundsMargin: settings.boundsMargin!,
819
+ renderOnlyInViewport: settings.renderOnlyInViewport!,
794
820
  clearColor: settings.clearColor!,
795
821
  canvas: this.canvas,
796
822
  deviceLogicalPixelRatio,