зеркало из https://github.com/mozilla/pjs.git
don't reset the decoded rect back to 0 when redrawing in a frame r=saari sr=waterson
This commit is contained in:
Родитель
92d1342f95
Коммит
4c956c2c27
|
@ -233,8 +233,11 @@ NS_IMETHODIMP gfxImageFrame::SetImageData(const PRUint8 *aData, PRUint32 aLength
|
|||
mImage->UnlockImagePixels(PR_FALSE);
|
||||
|
||||
PRInt32 row = (aOffset / row_stride);
|
||||
mImage->SetDecodedRect(0, 0, mSize.width, row + 1);
|
||||
|
||||
PRInt32 decY2 = mImage->GetDecodedY2();
|
||||
if (decY2 != mSize.height) {
|
||||
mImage->SetDecodedRect(0, 0, mSize.width, row + 1);
|
||||
}
|
||||
PRInt32 numnewrows = (aLength / row_stride);
|
||||
nsRect r(0, row, mSize.width, numnewrows);
|
||||
mImage->ImageUpdated(nsnull, nsImageUpdateFlags_kBitsChanged, &r);
|
||||
|
|
|
@ -233,8 +233,11 @@ NS_IMETHODIMP gfxImageFrame::SetImageData(const PRUint8 *aData, PRUint32 aLength
|
|||
mImage->UnlockImagePixels(PR_FALSE);
|
||||
|
||||
PRInt32 row = (aOffset / row_stride);
|
||||
mImage->SetDecodedRect(0, 0, mSize.width, row + 1);
|
||||
|
||||
PRInt32 decY2 = mImage->GetDecodedY2();
|
||||
if (decY2 != mSize.height) {
|
||||
mImage->SetDecodedRect(0, 0, mSize.width, row + 1);
|
||||
}
|
||||
PRInt32 numnewrows = (aLength / row_stride);
|
||||
nsRect r(0, row, mSize.width, numnewrows);
|
||||
mImage->ImageUpdated(nsnull, nsImageUpdateFlags_kBitsChanged, &r);
|
||||
|
|
Загрузка…
Ссылка в новой задаче