Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2555)

Unified Diff: core/src/fxge/ge/fx_ge_text.cpp

Issue 1511413008: Fix build broken at 7db2a535f163 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Stray { Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/ge/fx_ge_text.cpp
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 6ab24b3f2070c8ca9e6336368e5041361cf81d5a..d33057643316becd9c9c18d52630b934b69971dd 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1333,14 +1333,14 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont,
auto it = m_SizeMap.find(FaceGlyphsKey);
if (it != m_SizeMap.end()) {
CFX_SizeGlyphCache* pSizeCache = it->second;
- if (pSizeCache->m_GlyphMap.Lookup((void*)(uintptr_t)glyph_index,
- (void*&)pGlyphBitmap)) {
- return pGlyphBitmap;
- }
+ auto it2 = pSizeCache->m_GlyphMap.find(glyph_index);
+ if (it2 != pSizeCache->m_GlyphMap.end())
+ return it2->second;
+
pGlyphBitmap = RenderGlyph_Nativetext(pFont, glyph_index, pMatrix,
dest_width, anti_alias);
if (pGlyphBitmap) {
- pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap;
return pGlyphBitmap;
}
} else {
@@ -1349,7 +1349,7 @@ const CFX_GlyphBitmap* CFX_FaceCache::LoadGlyphBitmap(CFX_Font* pFont,
if (pGlyphBitmap) {
CFX_SizeGlyphCache* pSizeCache = new CFX_SizeGlyphCache;
m_SizeMap[FaceGlyphsKey] = pSizeCache;
- pSizeCache->m_GlyphMap.SetAt((void*)(uintptr_t)glyph_index, pGlyphBitmap);
+ pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap;
return pGlyphBitmap;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698