-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Branch #482
Merged
Merged
Update Branch #482
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ondition with shaders.
This fixes the error: net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 302 (Found)
… management Load Textures only when node becomes visible.
Co-authored-by: Mirko Pecora <[email protected]>
This fixes the error: net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 302 (Found)
…d texture handling" This reverts commit e60bda3.
SVG changed due to Alpha fix.
Batch the amount of textures being downloaded (source) and uploaded (core ctx creation) to the GPU to reduce load on constrained devices. The default is set to `0` where everything will be processed in a single frame, this can be reduced to any value (e.g. `50` or `25`) to limit the amount of textures being processed per frame. Todo: - [x] Fix loaded events w/ dimensions - [x] Run through all the tests (+fixes) - [x] Check Canvas2D regression - [x] Align RGB / RGBA handling with hasAlpha on Texture Creates to save some bits
…Node and Stage This avoids sending a free event each time we load a texture and; Improves the renderability changes and loading of texture w.r.t. texture state.
### What’s New? ✨ This PR refactors Texture Throttling in the following ways: - 🕒 Async RTT Texture Loading: When an RTT node is set, wait for the texture to load asynchronously. - 🗑️ Improved Texture Cleanup: When a texture is freed, its source texture is now also marked as freed. Fixes a bug where textures weren't returning after memory cleanup. - 🔄 Auto-Trigger Texture Loading: Refactored isRenderable owner changes to automatically call texture loading if the texture state is freed or initial. ## How to Test? 🧪 RTT Changes: Use `test=rtt-dimension`. 🖼️ You should see race conditions occurring prior to this PR. Texture Freed Fix: Add a rocko.png to the `test=texture-cleanup-critical` test and move it in and out of the screen to validate. 🎯 (Not the prettiest, but it works!). Might create an automated test for this in the future. ## What’s Next? 🚀 More Testing! 🛠️
Causing issues where cached linearGradients is shared with radialGradient
✨ What changed? ✨ * Decouple **isRenderable** from **hasRenderableOwner** as textures can be loaded asynchronously. * Refactored the `isRenderable` detection: - If a node has `alpha = 0` or is off screen its not renderable - If a node has dimensions and color properties, its marked renderable and we assume its a `ColorTexture`. - If a node has a texture, it will be marked as a renderable owner. Which will trigger loading of the texture (if its the first owner) - If the texture is loaded, it is marked renderable * On `renderQuads` we assume everything has a texture if not we set the defaultTexture for 1x1 sampling. This is implicit but matches the old behaviour. * `CoreTextNode` overwrites behaviour and checks for text !== ''. * Also fixed a bug where the default texture was still loading but already referenced. * Added a `CoreNode` unit test to validate this more rapidly. 🔧 Addresses the following Fixes #477
this fix the issue that elements with shaders but without color are not marked as renderable
Stop gap solution, ideally we do want SDF Font Face textures cleaned up if we can detect they have no renderable owners anymore to save as much memory as we can in case we hit critical levels. However for now prevent Font Face textures from being cleaned up until we have proper guards/reloads in the SDF Font Renderer at the expense of keeping the Font atlas always in memory regardless if its being used.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.