зеркало из https://github.com/mozilla/gecko-dev.git
backout merge b=455791
This commit is contained in:
Коммит
f9f5f27cc6
|
@ -454,7 +454,10 @@ public:
|
|||
--mRefCnt;
|
||||
NS_LOG_RELEASE(this, mRefCnt, "gfxFont");
|
||||
if (mRefCnt == 0) {
|
||||
NotifyReleased();
|
||||
// Don't delete just yet; return the object to the cache for
|
||||
// possibly recycling within some time limit
|
||||
gfxFontCache::GetCache()->NotifyReleased(this);
|
||||
return 0;
|
||||
}
|
||||
return mRefCnt;
|
||||
}
|
||||
|
@ -464,21 +467,8 @@ public:
|
|||
protected:
|
||||
nsAutoRefCnt mRefCnt;
|
||||
|
||||
void NotifyReleased() {
|
||||
gfxFontCache *cache = gfxFontCache::GetCache();
|
||||
if (cache) {
|
||||
// Don't delete just yet; return the object to the cache for
|
||||
// possibly recycling within some time limit
|
||||
cache->NotifyReleased(this);
|
||||
} else {
|
||||
// The cache may have already been shut down.
|
||||
delete this;
|
||||
}
|
||||
}
|
||||
|
||||
gfxFont(gfxFontEntry *aFontEntry, const gfxFontStyle *aFontStyle);
|
||||
|
||||
public:
|
||||
gfxFont(gfxFontEntry *aFontEntry, const gfxFontStyle *aFontStyle);
|
||||
virtual ~gfxFont();
|
||||
|
||||
const nsString& GetName() const { return mFontEntry->Name(); }
|
||||
|
@ -647,6 +637,7 @@ public:
|
|||
protected:
|
||||
nsRefPtr<gfxFontEntry> mFontEntry;
|
||||
|
||||
// The family name of the font
|
||||
PRPackedBool mIsValid;
|
||||
nsExpirationState mExpirationState;
|
||||
gfxFontStyle mStyle;
|
||||
|
@ -1489,10 +1480,9 @@ private:
|
|||
};
|
||||
|
||||
class THEBES_API gfxFontGroup : public gfxTextRunFactory {
|
||||
protected:
|
||||
public:
|
||||
gfxFontGroup(const nsAString& aFamilies, const gfxFontStyle *aStyle);
|
||||
|
||||
public:
|
||||
virtual ~gfxFontGroup() {
|
||||
mFonts.Clear();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче