we now allocate a single offscreen buffer.
git-svn-id: svn://10.0.0.236/trunk@7872 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
effee43052
commit
245e23bf94
@ -46,10 +46,15 @@ static void vm_timer_callback(nsITimer *aTimer, void *aClosure)
|
||||
vm->Composite();
|
||||
}
|
||||
|
||||
PRUint32 nsViewManager::mVMCount = 0;
|
||||
nsDrawingSurface nsViewManager::mDrawingSurface = nsnull;
|
||||
nsRect nsViewManager::mDSBounds = nsRect(0, 0, 0, 0);
|
||||
|
||||
static NS_DEFINE_IID(knsViewManagerIID, NS_IVIEWMANAGER_IID);
|
||||
|
||||
nsViewManager :: nsViewManager()
|
||||
{
|
||||
mVMCount++;
|
||||
}
|
||||
|
||||
nsViewManager :: ~nsViewManager()
|
||||
@ -63,7 +68,11 @@ nsViewManager :: ~nsViewManager()
|
||||
NS_IF_RELEASE(mRootWindow);
|
||||
NS_IF_RELEASE(mDirtyRegion);
|
||||
|
||||
if (nsnull != mDrawingSurface)
|
||||
--mVMCount;
|
||||
|
||||
NS_ASSERTION(!(mVMCount < 0), "underflow of viewmanagers");
|
||||
|
||||
if ((0 == mVMCount) && (nsnull != mDrawingSurface))
|
||||
{
|
||||
nsIRenderingContext *rc;
|
||||
|
||||
|
||||
@ -128,13 +128,15 @@ private:
|
||||
|
||||
nsIPresContext *mContext;
|
||||
nsIWidget *mRootWindow;
|
||||
nsRect mDSBounds;
|
||||
nsDrawingSurface mDrawingSurface;
|
||||
PRTime mLastRefresh;
|
||||
nsIRegion *mDirtyRegion;
|
||||
PRInt32 mTransCnt;
|
||||
PRBool mRefreshEnabled;
|
||||
|
||||
|
||||
static PRUint32 mVMCount; //number of viewmanagers
|
||||
static nsDrawingSurface mDrawingSurface; //single drawing surface
|
||||
static nsRect mDSBounds; //for all VMs
|
||||
|
||||
public:
|
||||
//these are public so that our timer callback can poke them.
|
||||
nsITimer *mTimer;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user