diff --git a/src/core/CoreTextNode.ts b/src/core/CoreTextNode.ts index 9591c83c..90534bbf 100644 --- a/src/core/CoreTextNode.ts +++ b/src/core/CoreTextNode.ts @@ -109,12 +109,23 @@ export class CoreTextNode extends CoreNode implements CoreTextNodeProps { this.stage.requestRender(); }; + allowTextGeneration() { + const p = this.props.parent; + if (p === null) { + return false; + } + if (p.worldAlpha > 0 && p.renderState > CoreNodeRenderState.OutOfBounds) { + return true; + } + return false; + } + /** * Override CoreNode's update method to handle text-specific updates */ override update(delta: number, parentClippingRect: RectWithValid): void { if ( - (this.props.parent?.isRenderable === true && + (this.allowTextGeneration() === true && this._layoutGenerated === false) || (this.textProps.forceLoad === true && this._layoutGenerated === false && @@ -205,6 +216,12 @@ export class CoreTextNode extends CoreNode implements CoreTextNodeProps { * Override renderQuads to handle SDF vs Canvas rendering */ override renderQuads(renderer: CoreRenderer): void { + if (this.parentHasRenderTexture === true) { + const rtt = renderer.renderToTextureActive; + if (rtt === false || this.parentRenderTexture !== renderer.activeRttNode) + return; + } + // Canvas renderer: use standard texture rendering via CoreNode if (this._type === 'canvas') { super.renderQuads(renderer); diff --git a/visual-regression/certified-snapshots/chromium-ci/alpha-blending-1.png b/visual-regression/certified-snapshots/chromium-ci/alpha-blending-1.png index a24369f7..ffb0efa8 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/alpha-blending-1.png and b/visual-regression/certified-snapshots/chromium-ci/alpha-blending-1.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/alpha-blending-2.png b/visual-regression/certified-snapshots/chromium-ci/alpha-blending-2.png index c037b960..e63e8755 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/alpha-blending-2.png and b/visual-regression/certified-snapshots/chromium-ci/alpha-blending-2.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-1.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-1.png index de7a78d7..c7746c05 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-1.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-1.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-2.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-2.png index c22c42dd..e439fb46 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-2.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-2.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-3.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-3.png index 1feecfee..c7746c05 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-3.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-3.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-4.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-4.png index 1feecfee..c7746c05 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-4.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-4.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-5.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-5.png index c4dae7c8..441cf64d 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-5.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-5.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-6.png b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-6.png index d7995fd3..de94125a 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-6.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-dimension-6.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/rtt-spritemap-1.png b/visual-regression/certified-snapshots/chromium-ci/rtt-spritemap-1.png index a1c33c0f..947da3d0 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/rtt-spritemap-1.png and b/visual-regression/certified-snapshots/chromium-ci/rtt-spritemap-1.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/text-max-lines-1.png b/visual-regression/certified-snapshots/chromium-ci/text-max-lines-1.png index b5118a36..1ec7172e 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/text-max-lines-1.png and b/visual-regression/certified-snapshots/chromium-ci/text-max-lines-1.png differ diff --git a/visual-regression/certified-snapshots/chromium-ci/text-overflow-suffix-1.png b/visual-regression/certified-snapshots/chromium-ci/text-overflow-suffix-1.png index 4a035679..02d3fb6d 100644 Binary files a/visual-regression/certified-snapshots/chromium-ci/text-overflow-suffix-1.png and b/visual-regression/certified-snapshots/chromium-ci/text-overflow-suffix-1.png differ