fixed an issue that toDataURL() returns empty image in webgl rendering mode