PopState() now returns PR_TRUE if there is an empty clip region after the pop.
git-svn-id: svn://10.0.0.236/trunk@3890 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -210,9 +210,8 @@ void nsRenderingContextUnix :: PushState(void)
|
||||
|
||||
}
|
||||
|
||||
void nsRenderingContextUnix :: PopState(void)
|
||||
PRBool nsRenderingContextUnix :: PopState(void)
|
||||
{
|
||||
|
||||
PRUint32 cnt = mStateCache->Count();
|
||||
GraphicsState * state;
|
||||
|
||||
@@ -229,7 +228,8 @@ void nsRenderingContextUnix :: PopState(void)
|
||||
delete state;
|
||||
}
|
||||
|
||||
|
||||
//XXX need to return if clip region is empty after pop. see nsirendering....h MMP
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
||||
PRBool nsRenderingContextUnix :: IsVisibleRect(const nsRect& aRect)
|
||||
@@ -486,8 +486,9 @@ void nsRenderingContextUnix :: DestroyDrawingSurface(nsDrawingSurface aDS)
|
||||
// XXX - Could this be a GC? If so, store the type of surface in nsDrawingSurfaceUnix
|
||||
::XFreePixmap(surface->display, surface->drawable);
|
||||
|
||||
// if (mRenderingSurface == surface)
|
||||
// mRenderingSurface = nsnull;
|
||||
//XXX greg, this seems bad. MMP
|
||||
if (mRenderingSurface == surface)
|
||||
mRenderingSurface = nsnull;
|
||||
|
||||
delete aDS;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
virtual nsresult SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
|
||||
|
||||
virtual void PushState(void);
|
||||
virtual void PopState(void);
|
||||
virtual PRBool PopState(void);
|
||||
|
||||
virtual PRBool IsVisibleRect(const nsRect& aRect);
|
||||
|
||||
|
||||
@@ -104,8 +104,10 @@ public:
|
||||
|
||||
/**
|
||||
* Get and and set RenderingContext to this graphical state
|
||||
* @return if PR_TRUE, indicates that the clipping region after
|
||||
* popping state is empty, else PR_FALSE
|
||||
*/
|
||||
virtual void PopState(void) = 0;
|
||||
virtual PRBool PopState(void) = 0;
|
||||
|
||||
/**
|
||||
* Tells if a given rectangle is visible within the rendering context
|
||||
|
||||
@@ -354,8 +354,10 @@ void nsRenderingContextWin :: PushState(void)
|
||||
mTMatrix = &mStates->mMatrix;
|
||||
}
|
||||
|
||||
void nsRenderingContextWin :: PopState(void)
|
||||
PRBool nsRenderingContextWin :: PopState(void)
|
||||
{
|
||||
PRBool retval = PR_FALSE;
|
||||
|
||||
if (nsnull == mStates)
|
||||
{
|
||||
NS_ASSERTION(!(nsnull == mStates), "state underflow");
|
||||
@@ -385,7 +387,12 @@ void nsRenderingContextWin :: PopState(void)
|
||||
pstate = pstate->mNext;
|
||||
|
||||
if (nsnull != pstate)
|
||||
::SelectClipRgn(mDC, pstate->mClipRegion);
|
||||
{
|
||||
int cliptype = ::SelectClipRgn(mDC, pstate->mClipRegion);
|
||||
|
||||
if (cliptype == NULLREGION)
|
||||
retval = PR_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
oldstate->mFlags &= ~FLAGS_ALL;
|
||||
@@ -396,6 +403,8 @@ void nsRenderingContextWin :: PopState(void)
|
||||
else
|
||||
mTMatrix = nsnull;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
PRBool nsRenderingContextWin :: IsVisibleRect(const nsRect& aRect)
|
||||
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
virtual nsresult SelectOffScreenDrawingSurface(nsDrawingSurface aSurface);
|
||||
|
||||
virtual void PushState(void);
|
||||
virtual void PopState(void);
|
||||
virtual PRBool PopState(void);
|
||||
|
||||
virtual PRBool IsVisibleRect(const nsRect& aRect);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user