Merge pull request #5523 from CodingFabian/remove-canvas-rounding-luminosity

removed rounding of values in composeSMaskLuminosity
This commit is contained in:
Yury Delendik 2014-12-05 08:40:38 -08:00
commit cddb870856

View File

@ -639,9 +639,9 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
function composeSMaskLuminosity(maskData, layerData) {
var length = maskData.length;
for (var i = 3; i < length; i += 4) {
var y = ((maskData[i - 3] * 77) + // * 0.3 / 255 * 0x10000
(maskData[i - 2] * 152) + // * 0.59 ....
(maskData[i - 1] * 28)) | 0; // * 0.11 ....
var y = (maskData[i - 3] * 77) + // * 0.3 / 255 * 0x10000
(maskData[i - 2] * 152) + // * 0.59 ....
(maskData[i - 1] * 28); // * 0.11 ....
layerData[i] = (layerData[i] * y) >> 16;
}
}