Bug 1152836 - QR Decoder: Remove getPixel bounds check: 400ms -> 335ms r=past

This commit is contained in:
J. Ryan Stinnett 2015-04-10 11:09:55 -05:00
Родитель de8bc0d619
Коммит 9d5ffcbf12
1 изменённых файлов: 0 добавлений и 6 удалений

Просмотреть файл

@ -1476,12 +1476,6 @@ qrcode.process = function(ctx) {
};
qrcode.getPixel = function(x, y) {
if (imgWidth < x) {
throw "point error";
}
if (imgHeight < y) {
throw "point error";
}
let point = x * 4 + y * imgWidth * 4;
let p = (imagedata[point] * 33 + imagedata[point + 1] * 34 + imagedata[point + 2] * 33) / 100;
return p;