diff --git a/mozilla/gfx/src/makefile.win b/mozilla/gfx/src/makefile.win index b8fd33f4138..3c1bde29222 100644 --- a/mozilla/gfx/src/makefile.win +++ b/mozilla/gfx/src/makefile.win @@ -27,7 +27,7 @@ REQUIRES=util img xpcom raptor netlib DEFINES=-D_IMPL_NS_GFX -DWIN32_LEAN_AND_MEAN CPPSRCS=nsColor.cpp nsColorNames.cpp nsColorNamesRGB.cpp nsFont.cpp \ - nsImageGroup.cpp nsImageManager.cpp nsImageNetContextAsync.cpp \ + nsImageGroup.cpp nsImageManager.cpp nsImageNetContext.cpp \ nsImageRenderer.cpp nsImageRequest.cpp nsImageSystemServices.cpp \ nsImageURL.cpp nsRect.cpp nsTransform2D.cpp nsFontCache.cpp @@ -40,7 +40,7 @@ EXPORTS=nsColor.h nsColorNames.h nsCoord.h nsFont.h nsRect.h nsPoint.h \ CPP_OBJS=.\$(OBJDIR)\nsColor.obj .\$(OBJDIR)\nsColorNames.obj \ .\$(OBJDIR)\nsColorNamesRGB.obj .\$(OBJDIR)\nsFont.obj \ .\$(OBJDIR)\nsImageGroup.obj .\$(OBJDIR)\nsImageManager.obj \ - .\$(OBJDIR)\nsImageNetContextAsync.obj .\$(OBJDIR)\nsImageRenderer.obj \ + .\$(OBJDIR)\nsImageNetContext.obj .\$(OBJDIR)\nsImageRenderer.obj \ .\$(OBJDIR)\nsImageRequest.obj .\$(OBJDIR)\nsImageSystemServices.obj \ .\$(OBJDIR)\nsImageURL.obj .\$(OBJDIR)\nsRect.obj \ .\$(OBJDIR)\nsTransform2D.obj .\$(OBJDIR)\nsFontCache.obj diff --git a/mozilla/gfx/src/windows/nsBlenderWin.cpp b/mozilla/gfx/src/windows/nsBlenderWin.cpp index 1bc7c570c3e..e7b4a7094c6 100644 --- a/mozilla/gfx/src/windows/nsBlenderWin.cpp +++ b/mozilla/gfx/src/windows/nsBlenderWin.cpp @@ -136,8 +136,8 @@ nsColorMap *colormap; srcloc.y = aSY; mSrcInfo.bmBits = mSrcBytes; mDstInfo.bmBits = mDstBytes; - maskloc.x = aSX; - maskloc.y = aSY; + maskloc.x = 0; + maskloc.y = 0; if(CalcAlphaMetrics(&mSrcInfo,&mDstInfo,&srcloc,NULL,&maskloc,aWidth,aHeight,&numlines,&numbytes, &s1,&d1,&m1,&slinespan,&dlinespan,&mlinespan)) { @@ -176,7 +176,7 @@ nsColorMap *colormap; } else { - level = (PRInt32)(aSrcOpacity*100); + level = (PRInt32)(aSrcOpacity*100); this->Do24Blend(level,numlines,numbytes,s1,d1,slinespan,dlinespan,nsHighQual,aSaveBlendArea); } } @@ -268,12 +268,11 @@ PRInt32 startx,starty; } else { - arect.SetRect(0,0,aDestInfo->bmWidth,aDestInfo->bmHeight); - srect.SetRect(aMaskUL->x,aMaskUL->y,aWidth,aHeight); - arect.IntersectRect(arect,srect); + //arect.SetRect(0,0,aDestInfo->bmWidth,aDestInfo->bmHeight); + //srect.SetRect(aMaskUL->x,aMaskUL->y,aWidth,aHeight); + //arect.IntersectRect(arect,srect); - //arect.SetRect(0, 0,aDestInfo->bmWidth, aDestInfo->bmHeight); - //x = y = 0; + arect.SetRect(0, 0,aDestInfo->bmWidth, aDestInfo->bmHeight); } srect.SetRect(aSrcUL->x, aSrcUL->y, aSrcInfo->bmWidth, aSrcInfo->bmHeight); @@ -287,7 +286,7 @@ PRInt32 startx,starty; *aNumlines = irect.height; startx = irect.x; starty = aDestInfo->bmHeight - (irect.y + irect.height); - *aDImage = ((PRUint8*)aDestInfo->bmBits) + (starty * (*aDLSpan)) + (aDestInfo->bmBitsPixel * startx); + *aDImage = ((PRUint8*)aDestInfo->bmBits) + (starty * (*aDLSpan)) + ((aDestInfo->bmBitsPixel/8) * startx); // get the intersection relative to the source rectangle srect.SetRect(0, 0, aSrcInfo->bmWidth, aSrcInfo->bmHeight); @@ -298,7 +297,7 @@ PRInt32 startx,starty; *aSLSpan = aSrcInfo->bmWidthBytes; startx = drect.x; starty = aSrcInfo->bmHeight - (drect.y + drect.height); - *aSImage = ((PRUint8*)aSrcInfo->bmBits) + (starty * (*aSLSpan)) + (aDestInfo->bmBitsPixel * startx); + *aSImage = ((PRUint8*)aSrcInfo->bmBits) + (starty * (*aSLSpan)) + ((aDestInfo->bmBitsPixel/8) * startx); doalpha = PR_TRUE; diff --git a/mozilla/gfx/src/windows/nsImageWin.cpp b/mozilla/gfx/src/windows/nsImageWin.cpp index f73c07b23cc..3ca00d64619 100644 --- a/mozilla/gfx/src/windows/nsImageWin.cpp +++ b/mozilla/gfx/src/windows/nsImageWin.cpp @@ -342,7 +342,7 @@ PRBool nsImageWin::CalcAlphaMetrics(nsIImage *aTheImage,nsPoint *aULLocation,PRI { PRBool doalpha = PR_FALSE; nsRect arect,srect,drect,irect; -PRInt32 startx,starty,x,y; +PRInt32 startx,starty; PRUint8 *alphabits; if( IsOptimized() ) @@ -358,7 +358,6 @@ PRUint8 *alphabits; else { arect.SetRect(0, 0, this->GetWidth(), this->GetHeight()); - x = y = 0; } srect.SetRect(aULLocation->x, aULLocation->y, aTheImage->GetWidth(), aTheImage->GetHeight());