| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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 "../../../include/fxge/fx_ge.h" | 7 #include "../../../include/fxge/fx_ge.h" |
| 8 #include "../../../include/fxge/fx_freetype.h" | 8 #include "../../../include/fxge/fx_freetype.h" |
| 9 #include "../../../include/fxcodec/fx_codec.h" | 9 #include "../../../include/fxcodec/fx_codec.h" |
| 10 #include "text_int.h" | 10 #include "text_int.h" |
| (...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 delete cache->m_Obj; | 1026 delete cache->m_Obj; |
| 1027 delete cache; | 1027 delete cache; |
| 1028 m_ExtFaceMap.erase(curr_it); | 1028 m_ExtFaceMap.erase(curr_it); |
| 1029 } | 1029 } |
| 1030 } | 1030 } |
| 1031 } | 1031 } |
| 1032 | 1032 |
| 1033 CFX_FaceCache::CFX_FaceCache(FXFT_Face face) | 1033 CFX_FaceCache::CFX_FaceCache(FXFT_Face face) |
| 1034 { | 1034 { |
| 1035 m_Face = face; | 1035 m_Face = face; |
| 1036 m_pBitmap = NULL; | |
| 1037 } | 1036 } |
| 1038 CFX_FaceCache::~CFX_FaceCache() | 1037 CFX_FaceCache::~CFX_FaceCache() |
| 1039 { | 1038 { |
| 1040 FX_POSITION pos = m_SizeMap.GetStartPosition(); | 1039 FX_POSITION pos = m_SizeMap.GetStartPosition(); |
| 1041 CFX_ByteString Key; | 1040 CFX_ByteString Key; |
| 1042 CFX_SizeGlyphCache* pSizeCache = NULL; | 1041 CFX_SizeGlyphCache* pSizeCache = NULL; |
| 1043 while(pos) { | 1042 while(pos) { |
| 1044 m_SizeMap.GetNextAssoc( pos, Key, (void*&)pSizeCache); | 1043 m_SizeMap.GetNextAssoc( pos, Key, (void*&)pSizeCache); |
| 1045 delete pSizeCache; | 1044 delete pSizeCache; |
| 1046 } | 1045 } |
| 1047 m_SizeMap.RemoveAll(); | 1046 m_SizeMap.RemoveAll(); |
| 1048 pos = m_PathMap.GetStartPosition(); | 1047 pos = m_PathMap.GetStartPosition(); |
| 1049 void* key1; | 1048 void* key1; |
| 1050 CFX_PathData* pPath; | 1049 CFX_PathData* pPath; |
| 1051 while (pos) { | 1050 while (pos) { |
| 1052 m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath); | 1051 m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath); |
| 1053 delete pPath; | 1052 delete pPath; |
| 1054 } | 1053 } |
| 1055 delete m_pBitmap; | |
| 1056 m_PathMap.RemoveAll(); | 1054 m_PathMap.RemoveAll(); |
| 1057 } | 1055 } |
| 1058 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ | 1056 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ |
| 1059 void CFX_FaceCache::InitPlatform() | 1057 void CFX_FaceCache::InitPlatform() |
| 1060 { | 1058 { |
| 1061 } | 1059 } |
| 1062 #endif | 1060 #endif |
| 1063 CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
ineMatrix* pMatrix, | 1061 CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
ineMatrix* pMatrix, |
| 1064 CFX_ByteStringC& FaceGlyphsKey, FX_DWORD glyph_index, FX_BOOL bFontStyle
, | 1062 CFX_ByteStringC& FaceGlyphsKey, FX_DWORD glyph_index, FX_BOOL bFontStyle
, |
| 1065 int dest_width, int anti_alias) | 1063 int dest_width, int anti_alias) |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 { | 1684 { |
| 1687 va_list argList; | 1685 va_list argList; |
| 1688 va_start(argList, count); | 1686 va_start(argList, count); |
| 1689 for (int i = 0; i < count; i ++) { | 1687 for (int i = 0; i < count; i ++) { |
| 1690 int p = va_arg(argList, int); | 1688 int p = va_arg(argList, int); |
| 1691 ((FX_DWORD*)m_Key)[i] = p; | 1689 ((FX_DWORD*)m_Key)[i] = p; |
| 1692 } | 1690 } |
| 1693 va_end(argList); | 1691 va_end(argList); |
| 1694 m_KeyLen = count * sizeof(FX_DWORD); | 1692 m_KeyLen = count * sizeof(FX_DWORD); |
| 1695 } | 1693 } |
| OLD | NEW |