Most performant way to force a repaint

There is a bug on on Samsung/Tizen 2016 models where by the canvas will clear it’s self whenever there is a DOM change. This results in a brief flash of black whenever something is added to the DOM this seems to be a platform bug and can be observed by simply changing a text node outside of the canvas.

One work around we have found is to force an RAF update. This seems to allow the canvas to ‘keep alive’ and not clear/flash black. The current idea is to have a pixel on the canvas that is always animating, this would be hidden to the user. I’m unsure of the best way to do this in lighting, an important consideration would be performance.

So I’m looking for suggestions as to the best way to do this. Also open to other suggestions.


Is there a framework you’re using for the DOM changes? Is it React and its re-rendering everything including the canvas tag?

No framework. The flash can be observed with any simple dom change even in plain web gl.