[Canvas] Texture Copy & threading
Because of threading, Canvas rendering has to be done like this:
https://github.com/BabylonJS/BabylonNative/blob/c00b503d3ab4c2809f1d0725e4bc3aa425677aad/Polyfills/Canvas/Source/Context.cpp#L534
In BabylonJS, the texture copy happens just after canvas rendering. In NativeEngine, if the texture copy happens in sync, it will be performed before the canvas rendering. Texture copy has be be done the same way as canvas rendering with tasks pushed on m_graphicsImpl.BeforeRenderScheduler().
Is there a way to improve this convoluted code? Is it possible to skip the texture copy and render the canvas to the raw texture instead ?
#821 discusses one possible way to address this, among other considerations.
Related: #969
Duplicate of #969