Fixing the Motif part of bug #9828.
git-svn-id: svn://10.0.0.236/trunk@39970 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -301,19 +301,22 @@ NS_IMETHODIMP nsRenderingContextMotif :: PushState(void)
|
||||
GraphicsState * state = new GraphicsState();
|
||||
|
||||
// Push into this state object, add to vector
|
||||
state->mMatrix = mTMatrix;
|
||||
if(state) {
|
||||
state->mMatrix = mTMatrix;
|
||||
|
||||
mStateCache->AppendElement(state);
|
||||
mStateCache->AppendElement(state);
|
||||
|
||||
if (nsnull == mTMatrix)
|
||||
mTMatrix = new nsTransform2D();
|
||||
else
|
||||
mTMatrix = new nsTransform2D(mTMatrix);
|
||||
if (nsnull == mTMatrix)
|
||||
mTMatrix = new nsTransform2D();
|
||||
else
|
||||
mTMatrix = new nsTransform2D(mTMatrix);
|
||||
|
||||
PRBool clipState;
|
||||
GetClipRect(state->mLocalClip, clipState);
|
||||
PRBool clipState;
|
||||
GetClipRect(state->mLocalClip, clipState);
|
||||
|
||||
state->mClipRegion = mRegion;
|
||||
state->mClipRegion = mRegion;
|
||||
}
|
||||
else state = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
if (nsnull != state->mClipRegion) {
|
||||
mRegion = ::XCreateRegion();
|
||||
@@ -843,20 +846,23 @@ NS_IMETHODIMP nsRenderingContextMotif :: CreateDrawingSurface(nsRect *aBounds, P
|
||||
|
||||
nsDrawingSurfaceMotif * surface = new nsDrawingSurfaceMotif();
|
||||
|
||||
surface->drawable = p ;
|
||||
surface->display = mRenderingSurface->display;
|
||||
surface->gc = mRenderingSurface->gc;
|
||||
surface->visual = mRenderingSurface->visual;
|
||||
surface->depth = mRenderingSurface->depth;
|
||||
if(surface) {
|
||||
surface->drawable = p ;
|
||||
surface->display = mRenderingSurface->display;
|
||||
surface->gc = mRenderingSurface->gc;
|
||||
surface->visual = mRenderingSurface->visual;
|
||||
surface->depth = mRenderingSurface->depth;
|
||||
|
||||
#ifdef MITSHM
|
||||
|
||||
surface->shmInfo = mRenderingSurface->shmInfo;
|
||||
surface->shmImage = mRenderingSurface->shmImage;
|
||||
mRenderingSurface->shmInfo.shmaddr = nsnull;
|
||||
mRenderingSurface->shmImage = nsnull;
|
||||
surface->shmInfo = mRenderingSurface->shmInfo;
|
||||
surface->shmImage = mRenderingSurface->shmImage;
|
||||
mRenderingSurface->shmInfo.shmaddr = nsnull;
|
||||
mRenderingSurface->shmImage = nsnull;
|
||||
|
||||
#endif
|
||||
}
|
||||
else surface = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
aSurface = (nsDrawingSurface)surface;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user