Remove unnecessary caching

This commit is contained in:
Dávid Szabó 2016-09-23 13:56:58 +02:00 committed by Julian Descottes
parent 7e9c632efd
commit 26b3cf3a23

View File

@ -30,12 +30,7 @@
* @param {String} globalAlpha (optional) global frame opacity
*/
drawToCanvas : function (frame, canvas, transparentColor, globalAlpha) {
var context;
if (canvas.context) {
context = canvas.context;
} else {
context = canvas.context = canvas.getContext('2d');
}
var context = canvas.getContext('2d');
globalAlpha = isNaN(globalAlpha) ? 1 : globalAlpha;
context.globalAlpha = globalAlpha;
transparentColor = transparentColor || Constants.TRANSPARENT_COLOR;