-
Notifications
You must be signed in to change notification settings - Fork 25
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
How to destroy the canvas? (Bug when using together with omxplayer) #19
Comments
I don't know if this makes any sense in your use case, but, can you try calling openvg's shutdown function ?
|
I did that yesterday night, but since i did not have the openvg package i edited openvg-canvas to attach the vg object to the canvas object, like canvas.vg. Is that worse for performance? is there a way to use load the openvg inside node openvg-canvas? And about the problem, doing vg.finish stopped the problem with omxplayer, after the video is played i just instance a new canvas and start from there. Thanks a lot |
I think you can just add openvg to your project and require it directly. Everyone will be using the same module. Currently vg.finish just calls shutdown (https://github.com/luismreis/node-openvg/blob/master/openvg.js#L747). But you should actually be using it instead of shutdown (my bad), because I'm planning to move mode initialization/shutdown from C++ space to JS, thus, eventually, the proper shutdown code will be there. |
Nice! Thank u very much! |
hey @luismreis, one more question, after i do vg.finish and recreate the canvas, i can draw shapes on it but i can't draw text, do you know why? |
I'd have to investigate a bit. There's no obvious reason. |
Hi,
I have been using your library intensively in the last days, i have noticed a problem that only happens in a case:
omxplayer gets some strange flickerings, when i close node it stops, if vgSwapBuffer is called sometimes it happens more, if i only get the context and don't draw anything it does not happen.
I ve tried so many ways to delete the canvas object and the context but it still keeps happening.
It there a right way to release the openvg canvas?
Does anyone might know what may cause this?
The text was updated successfully, but these errors were encountered: