mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1765162 - Fix leak in GlyphCacheEntry. r=aosmond
GlyphBuffer was getting allocated but never destroyed. This adds a destructor that fixes that. Differential Revision: https://phabricator.services.mozilla.com/D143917
This commit is contained in:
parent
b163e7d7a5
commit
cc5a1729f6
@ -2266,6 +2266,8 @@ GlyphCacheEntry::GlyphCacheEntry(const GlyphBuffer& aBuffer,
|
||||
mBuffer.mNumGlyphs = aBuffer.mNumGlyphs;
|
||||
}
|
||||
|
||||
GlyphCacheEntry::~GlyphCacheEntry() { delete[] mBuffer.mGlyphs; }
|
||||
|
||||
// Attempt to find a matching entry in the glyph cache. If one isn't found,
|
||||
// a new entry will be created. The caller should check whether the contained
|
||||
// texture handle is valid to determine if it will need to render the text run
|
||||
|
@ -302,6 +302,7 @@ class GlyphCacheEntry : public CacheEntryImpl<GlyphCacheEntry> {
|
||||
GlyphCacheEntry(const GlyphBuffer& aBuffer, const DeviceColor& aColor,
|
||||
const Matrix& aTransform, const IntRect& aBounds,
|
||||
HashNumber aHash);
|
||||
~GlyphCacheEntry();
|
||||
|
||||
bool MatchesGlyphs(const GlyphBuffer& aBuffer, const DeviceColor& aColor,
|
||||
const Matrix& aTransform, const IntRect& aBounds,
|
||||
|
Loading…
Reference in New Issue
Block a user