mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 14:22:01 +00:00
fixing bug 148551. patch from paper@animecity.nu. r=pavlov sr=tor
This commit is contained in:
parent
d26a189738
commit
b6ec7f6860
@ -254,7 +254,10 @@ NS_IMETHODIMP gfxImageFrame::SetImageData(const PRUint8 *aData, PRUint32 aLength
|
||||
|
||||
PRInt32 newOffset;
|
||||
#ifdef XP_PC
|
||||
newOffset = ((mSize.height - 1) * row_stride) - aOffset;
|
||||
// Adjust: We need offset to be top-down rows & LTR within each row
|
||||
// On XP_PC, it's passed in as bottom-up rows & LTR within each row
|
||||
PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride;
|
||||
newOffset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride);
|
||||
#else
|
||||
newOffset = aOffset;
|
||||
#endif
|
||||
@ -351,7 +354,10 @@ NS_IMETHODIMP gfxImageFrame::SetAlphaData(const PRUint8 *aData, PRUint32 aLength
|
||||
|
||||
PRInt32 offset;
|
||||
#ifdef XP_PC
|
||||
offset = ((mSize.height - 1) * row_stride) - aOffset;
|
||||
// Adjust: We need offset to be top-down rows & LTR within each row
|
||||
// On XP_PC, it's passed in as bottom-up rows & LTR within each row
|
||||
PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride;
|
||||
offset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride);
|
||||
#else
|
||||
offset = aOffset;
|
||||
#endif
|
||||
|
@ -254,7 +254,10 @@ NS_IMETHODIMP gfxImageFrame::SetImageData(const PRUint8 *aData, PRUint32 aLength
|
||||
|
||||
PRInt32 newOffset;
|
||||
#ifdef XP_PC
|
||||
newOffset = ((mSize.height - 1) * row_stride) - aOffset;
|
||||
// Adjust: We need offset to be top-down rows & LTR within each row
|
||||
// On XP_PC, it's passed in as bottom-up rows & LTR within each row
|
||||
PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride;
|
||||
newOffset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride);
|
||||
#else
|
||||
newOffset = aOffset;
|
||||
#endif
|
||||
@ -351,7 +354,10 @@ NS_IMETHODIMP gfxImageFrame::SetAlphaData(const PRUint8 *aData, PRUint32 aLength
|
||||
|
||||
PRInt32 offset;
|
||||
#ifdef XP_PC
|
||||
offset = ((mSize.height - 1) * row_stride) - aOffset;
|
||||
// Adjust: We need offset to be top-down rows & LTR within each row
|
||||
// On XP_PC, it's passed in as bottom-up rows & LTR within each row
|
||||
PRUint32 yOffset = ((PRUint32)(aOffset / row_stride)) * row_stride;
|
||||
offset = ((mSize.height - 1) * row_stride) - yOffset + (aOffset % row_stride);
|
||||
#else
|
||||
offset = aOffset;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user