зеркало из https://github.com/mozilla/pjs.git
Backout patch from bug 389366 because it does not have M9 approval.
This commit is contained in:
Родитель
b91dd0a3e7
Коммит
6da0a47f08
|
@ -2465,13 +2465,6 @@ nsCanvasRenderingContext2D::GetImageData()
|
|||
PRUint8 g = *row++;
|
||||
PRUint8 b = *row++;
|
||||
#endif
|
||||
// Convert to non-premultiplied color
|
||||
if (a != 0) {
|
||||
r = (r * 255) / a;
|
||||
g = (g * 255) / a;
|
||||
b = (b * 255) / a;
|
||||
}
|
||||
|
||||
*dest++ = INT_TO_JSVAL(r);
|
||||
*dest++ = INT_TO_JSVAL(g);
|
||||
*dest++ = INT_TO_JSVAL(b);
|
||||
|
@ -2595,11 +2588,6 @@ nsCanvasRenderingContext2D::PutImageData()
|
|||
else if (JSVAL_IS_DOUBLE(va)) ia = (PRUint8) (*JSVAL_TO_DOUBLE(va));
|
||||
else return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
|
||||
// Convert to premultiplied color (losslessly if the input came from getImageData)
|
||||
ir = (ir*ia + 254) / 255;
|
||||
ig = (ig*ia + 254) / 255;
|
||||
ib = (ib*ia + 254) / 255;
|
||||
|
||||
#ifdef IS_LITTLE_ENDIAN
|
||||
*imgPtr++ = ib;
|
||||
*imgPtr++ = ig;
|
||||
|
|
Загрузка…
Ссылка в новой задаче