-
Notifications
You must be signed in to change notification settings - Fork 12
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
Canvas off-screen caching #49
Comments
Also, it should be able to use whatever renderer is currently active (Canvas as a canvas, SVG with a data URL, or DOM with an actual HTMLImageElement). It would still use Canvas drawing to write to the off-screen canvas. It should also be nestable, since that has beneficial performance payoffs in a number of cases. Implementing it as a CanvasCachingNode that has children breaks the ability to quickly experiment with different performance settings, so I would strongly prefer to have flags set on Nodes. For local caching, we would need a way to control resolution (probably as a scale relative to the node's transform, so something like cacheScale = 2 might draw the node into a canvas twice as large as its bounding box). For global caching, we need to know how to handle sub-pixel translation (rotation or scaling will cause cache invalidation). We could either invalidate (ensures smooth animation, but slow), snap to whole-pixel offsets of whatever offset it is initially cached at (with the ability to invalidate and have it be precise), or just translate smoothly (and deal with any blur and loss of performance) |
Removing this milestone, planned to work in after sims are published. |
Note that sync and pruning will need to be checked for this implementation. |
There are two types of caching to be supported:
This issue is to track progress.
The text was updated successfully, but these errors were encountered: