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

Side by Side Diff: core/fxge/ge/cfx_facecache.cpp

Issue 2338883004: Map in LookUpGlyphBitmap even when unsuccessful (Closed)
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxge/include/cfx_facecache.h" 7 #include "core/fxge/include/cfx_facecache.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 m_SizeMap[FaceGlyphsKey] = std::unique_ptr<CFX_SizeGlyphCache>(pSizeCache); 379 m_SizeMap[FaceGlyphsKey] = std::unique_ptr<CFX_SizeGlyphCache>(pSizeCache);
380 } else { 380 } else {
381 pSizeCache = it->second.get(); 381 pSizeCache = it->second.get();
382 } 382 }
383 auto it2 = pSizeCache->m_GlyphMap.find(glyph_index); 383 auto it2 = pSizeCache->m_GlyphMap.find(glyph_index);
384 if (it2 != pSizeCache->m_GlyphMap.end()) 384 if (it2 != pSizeCache->m_GlyphMap.end())
385 return it2->second; 385 return it2->second;
386 386
387 CFX_GlyphBitmap* pGlyphBitmap = RenderGlyph(pFont, glyph_index, bFontStyle, 387 CFX_GlyphBitmap* pGlyphBitmap = RenderGlyph(pFont, glyph_index, bFontStyle,
388 pMatrix, dest_width, anti_alias); 388 pMatrix, dest_width, anti_alias);
389 if (!pGlyphBitmap)
390 return nullptr;
391
392 pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap; 389 pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap;
393 return pGlyphBitmap; 390 return pGlyphBitmap;
394 } 391 }
OLDNEW
« 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