summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-09-14 09:00:50 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-14 09:00:50 -0700
commit8b1ed16144925205a34e3796b57db72dd6ee6a89 (patch)
treedefcf4a43d925fa8ecdc31610763432a40b31744
parent79db609948b01d7a27824b74acc4bd22c8bfd17b (diff)
downloadpdfium-8b1ed16144925205a34e3796b57db72dd6ee6a89.tar.xz
Map glyph bitmap in LookUpGlyphBitmap even when unsuccessful
CFX_FaceCache::LookUpGlyphBitMap should remember its unsuccessful glyph bitmap calculations. This is especially important if there are a lot of repeated requests for the same glyph with large bitmaps (which means long calculations in freetype). With this CL, the pdf in the bug below will be rendered quickly. BUG=chromium:638856 Review-Url: https://codereview.chromium.org/2338883004
-rw-r--r--core/fxge/ge/cfx_facecache.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp
index 6c5bba2018..2b8405941e 100644
--- a/core/fxge/ge/cfx_facecache.cpp
+++ b/core/fxge/ge/cfx_facecache.cpp
@@ -386,9 +386,6 @@ CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(
CFX_GlyphBitmap* pGlyphBitmap = RenderGlyph(pFont, glyph_index, bFontStyle,
pMatrix, dest_width, anti_alias);
- if (!pGlyphBitmap)
- return nullptr;
-
pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap;
return pGlyphBitmap;
}