示例#1
0
void
DeleteFontData(WrFontKey aKey) {
  StaticMutexAutoLock lock(sFontDataTableLock);
  auto i = sFontDataTable.find(aKey);
  if (i != sFontDataTable.end()) {
    if (i->second.mVec) {
      wr_dec_ref_arc(i->second.mVec);
    }
    sFontDataTable.erase(i);
  }
}
示例#2
0
void
ClearBlobImageResources(WrIdNamespace aNamespace) {
  StaticMutexAutoLock lock(sFontDataTableLock);
  for (auto i = sFontDataTable.begin(); i != sFontDataTable.end();) {
    if (i->first.mNamespace == aNamespace) {
      if (i->second.mVec) {
        wr_dec_ref_arc(i->second.mVec);
      }
      i = sFontDataTable.erase(i);
    } else {
      i++;
    }
  }
}
示例#3
0
 ~FontTemplate() {
   if (mVec) {
     wr_dec_ref_arc(mVec);
   }
 }