mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Fixing use of uninitialized var in nsRenderingContextMac :: CopyOffScreenBits()
This commit is contained in:
parent
380eeea4ea
commit
f8cc315185
@ -1179,8 +1179,8 @@ NS_IMETHODIMP nsRenderingContextMac :: CopyOffScreenBits(nsDrawingSurface aSrcSu
|
||||
|
||||
if (aCopyFlags & NS_COPYBITS_TO_BACK_BUFFER)
|
||||
{
|
||||
NS_ASSERTION(!(nsnull == destport), "no back buffer");
|
||||
destport = mRenderingSurface;
|
||||
NS_ASSERTION(!(nsnull == destport), "no back buffer");
|
||||
}
|
||||
else
|
||||
destport = mFrontBuffer;
|
||||
@ -1191,10 +1191,10 @@ NS_IMETHODIMP nsRenderingContextMac :: CopyOffScreenBits(nsDrawingSurface aSrcSu
|
||||
if (aCopyFlags & NS_COPYBITS_XFORM_DEST_VALUES)
|
||||
mTMatrix->TransformCoord(&drect.x, &drect.y, &drect.width, &drect.height);
|
||||
|
||||
::SetRect(&srcrect,x,y,drect.width,drect.height);
|
||||
::SetRect(&dstrect,drect.x,drect.y,drect.width,drect.height);
|
||||
::SetRect(&srcrect,x,y,drect.width,drect.height);
|
||||
::SetRect(&dstrect,drect.x,drect.y,drect.width,drect.height);
|
||||
|
||||
::SetPort(destport);
|
||||
::SetPort(destport);
|
||||
|
||||
if (aCopyFlags & NS_COPYBITS_USE_SOURCE_CLIP_REGION)
|
||||
{
|
||||
@ -1208,6 +1208,9 @@ NS_IMETHODIMP nsRenderingContextMac :: CopyOffScreenBits(nsDrawingSurface aSrcSu
|
||||
if ( offscreenPM ) {
|
||||
LockPixels(offscreenPM);
|
||||
srcpix = (PixMapPtr)*offscreenPM;
|
||||
|
||||
// We are setting fore/back color of destport without restoring them.
|
||||
// do we care?
|
||||
::RGBForeColor(&rgbblack);
|
||||
::RGBBackColor(&rgbwhite);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user