added FlushFontCache() method.

git-svn-id: svn://10.0.0.236/trunk@15583 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
michaelp%netscape.com
1998-12-02 00:36:08 +00:00
parent 4c21a94564
commit f7f8b8ea47
3 changed files with 17 additions and 0 deletions

View File

@@ -563,6 +563,14 @@ NS_IMETHODIMP DeviceContextImpl::GetLocalFontName(const nsString& aFaceName, nsS
return result;
}
NS_IMETHODIMP DeviceContextImpl :: FlushFontCache(void)
{
if (nsnull != mFontCache)
mFontCache->Flush();
return NS_OK;
}
NS_IMETHODIMP DeviceContextImpl::GetILColorSpace(IL_ColorSpace*& aColorSpace)
{
if (nsnull == mColorSpace) {

View File

@@ -68,6 +68,8 @@ public:
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
PRBool& aAliased);
NS_IMETHOD FlushFontCache(void);
NS_IMETHOD GetDepth(PRUint32& aDepth);
NS_IMETHOD GetILColorSpace(IL_ColorSpace*& aColorSpace);

View File

@@ -235,6 +235,13 @@ public:
NS_IMETHOD GetLocalFontName(const nsString& aFaceName, nsString& aLocalName,
PRBool& aAliased) = 0;
/**
* Attempt to free up resoruces by flushing out any fonts no longer
* referenced by anything other than the font cache itself.
* @return error status
*/
NS_IMETHOD FlushFontCache(void) = 0;
/**
* Return the bit depth of the device.
*/