phoboslab/jsmpeg — pull request #1 by devongovett (2013-09-11 16:32:36+00:00)
Title: Use WebGL for rendering where available

Still falls back to 2d canvas for old browsers. In newer browsers supporting WebGL though, there is a good performance gain. According to a profile, `YCbCrToRGBA` is currently the function where the most time is spent. By moving the RGB conversion to the GPU with a WebGL shader, I see a 5-10% CPU usage decrease in Chrome and Firefox, and about 15-20% decrease in Safari with WebGL enabled. You can try it for yourself here http://devongovett.github.io/jsmpeg/test.html though the loading indicator doesn't work with WebGL so just wait for it to load.