OLD | NEW |
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/cfx_facecache.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
| 11 #include "core/fxge/cfx_fontmgr.h" |
| 12 #include "core/fxge/cfx_gemodule.h" |
| 13 #include "core/fxge/cfx_pathdata.h" |
| 14 #include "core/fxge/cfx_substfont.h" |
| 15 #include "core/fxge/fx_freetype.h" |
11 #include "core/fxge/ge/fx_text_int.h" | 16 #include "core/fxge/ge/fx_text_int.h" |
12 #include "core/fxge/include/cfx_fontmgr.h" | |
13 #include "core/fxge/include/cfx_gemodule.h" | |
14 #include "core/fxge/include/cfx_pathdata.h" | |
15 #include "core/fxge/include/cfx_substfont.h" | |
16 #include "core/fxge/include/fx_freetype.h" | |
17 #include "third_party/base/numerics/safe_math.h" | 17 #include "third_party/base/numerics/safe_math.h" |
18 | 18 |
19 #ifdef _SKIA_SUPPORT_ | 19 #ifdef _SKIA_SUPPORT_ |
20 #include "third_party/skia/include/core/SkStream.h" | 20 #include "third_party/skia/include/core/SkStream.h" |
21 #include "third_party/skia/include/core/SkTypeface.h" | 21 #include "third_party/skia/include/core/SkTypeface.h" |
22 #endif | 22 #endif |
23 | 23 |
24 namespace { | 24 namespace { |
25 | 25 |
26 constexpr uint32_t kInvalidGlyphIndex = static_cast<uint32_t>(-1); | 26 constexpr uint32_t kInvalidGlyphIndex = static_cast<uint32_t>(-1); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap; | 389 pSizeCache->m_GlyphMap[glyph_index] = pGlyphBitmap; |
390 return pGlyphBitmap; | 390 return pGlyphBitmap; |
391 } | 391 } |
OLD | NEW |