add ReportStats() to the gc cache destructor

This commit is contained in:
pavlov%netscape.com 2000-04-25 01:49:34 +00:00
parent 8fd8ee025a
commit 7204673fc7
2 changed files with 7 additions and 5 deletions

View File

@ -66,6 +66,8 @@ nsGCCache::~nsGCCache()
{
PRCList *head;
ReportStats();
while (!PR_CLIST_IS_EMPTY(&GCCache)) {
head = PR_LIST_HEAD(&GCCache);
if (head == &GCCache)

View File

@ -44,7 +44,7 @@ static NS_DEFINE_CID(kRegionCID, NS_REGION_CID);
gdk.height = ns.height; \
PR_END_MACRO
static nsGCCache *gcCache = new nsGCCache();
static nsGCCache gcCache;
nsRenderingContextGTK::nsRenderingContextGTK()
{
@ -505,10 +505,10 @@ void nsRenderingContextGTK::UpdateGC()
mClipRegion->GetNativeRegion((void*&)rgn);
}
mGC = gcCache->GetClipGC(mSurface->GetDrawable(),
&values,
valuesMask,
rgn);
mGC = gcCache.GetClipGC(mSurface->GetDrawable(),
&values,
valuesMask,
rgn);
}
NS_IMETHODIMP nsRenderingContextGTK::SetClipRegion(const nsIRegion& aRegion,