Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2025-09-23 15:20:06 +08:00
commit e4c5aafee9
6 changed files with 25 additions and 26 deletions

View file

@ -495,7 +495,7 @@ public:
private:
// The font table data block
const nsTArray<uint8_t> mTableData;
nsTArray<uint8_t> mTableData;
// The blob destroy function needs to know the owning font entry
// so that it can hold the font-entry's reference while modifying the
@ -591,16 +591,12 @@ gfxFontEntry::ShareFontTableAndGetBlob(uint32_t aTag,
mFontTableCache = MakeUnique<nsTHashtable<FontTableHashEntry>>(8);
}
FontTableHashEntry* entry;
if (MOZ_UNLIKELY(entry = mFontTableCache->GetEntry(aTag))) {
// We must have been racing with another GetFontTable for the same table,
// and it won the race and filled in the entry before us.
// Ignore `aBuffer` in that case, and return a reference to the existing blob.
return entry->GetBlob();
FontTableHashEntry *entry = mFontTableCache->PutEntry(aTag);
if (MOZ_UNLIKELY(!entry)) {
// OOM or other issue storing the entry.
return nullptr;
}
entry = mFontTableCache->PutEntry(aTag);
if (!aBuffer) {
// ensure the entry is null
entry->Clear();

View file

@ -265,7 +265,8 @@ public:
// unregisters the table from the font entry.
//
// Pass nullptr for aBuffer to indicate that the table is not present and
// nullptr will be returned.
// nullptr will be returned. Also returns nullptr on OOM or when there are
// other issues storing the entry in the cache table.
hb_blob_t *ShareFontTableAndGetBlob(uint32_t aTag,
nsTArray<uint8_t>* aTable);

View file

@ -272,7 +272,9 @@ public:
virtual void GetAzureBackendInfo(mozilla::widget::InfoObject &aObj) {
aObj.DefineProperty("AzureCanvasBackend", GetBackendName(mPreferredCanvasBackend));
aObj.DefineProperty("AzureCanvasAccelerated", AllowOpenGLCanvas());
if (mPreferredCanvasBackend == mozilla::gfx::BackendType::SKIA) {
aObj.DefineProperty("AzureCanvasSkiaOpenGL", AllowOpenGLCanvas());
}
aObj.DefineProperty("AzureFallbackCanvasBackend", GetBackendName(mFallbackCanvasBackend));
aObj.DefineProperty("AzureContentBackend", GetBackendName(mContentBackend));
}