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 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1062 delete cache->m_Obj; | 1062 delete cache->m_Obj; |
1063 delete cache; | 1063 delete cache; |
1064 m_ExtFaceMap.erase(curr_it); | 1064 m_ExtFaceMap.erase(curr_it); |
1065 } | 1065 } |
1066 } | 1066 } |
1067 } | 1067 } |
1068 | 1068 |
1069 CFX_FaceCache::CFX_FaceCache(FXFT_Face face) | 1069 CFX_FaceCache::CFX_FaceCache(FXFT_Face face) |
1070 { | 1070 { |
1071 m_Face = face; | 1071 m_Face = face; |
1072 m_pBitmap = NULL; | |
1073 } | 1072 } |
1074 CFX_FaceCache::~CFX_FaceCache() | 1073 CFX_FaceCache::~CFX_FaceCache() |
1075 { | 1074 { |
1076 FX_POSITION pos = m_SizeMap.GetStartPosition(); | 1075 FX_POSITION pos = m_SizeMap.GetStartPosition(); |
1077 CFX_ByteString Key; | 1076 CFX_ByteString Key; |
1078 CFX_SizeGlyphCache* pSizeCache = NULL; | 1077 CFX_SizeGlyphCache* pSizeCache = NULL; |
1079 while(pos) { | 1078 while(pos) { |
1080 m_SizeMap.GetNextAssoc( pos, Key, (void*&)pSizeCache); | 1079 m_SizeMap.GetNextAssoc( pos, Key, (void*&)pSizeCache); |
1081 delete pSizeCache; | 1080 delete pSizeCache; |
1082 } | 1081 } |
1083 m_SizeMap.RemoveAll(); | 1082 m_SizeMap.RemoveAll(); |
1084 pos = m_PathMap.GetStartPosition(); | 1083 pos = m_PathMap.GetStartPosition(); |
1085 void* key1; | 1084 void* key1; |
1086 CFX_PathData* pPath; | 1085 CFX_PathData* pPath; |
1087 while (pos) { | 1086 while (pos) { |
1088 m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath); | 1087 m_PathMap.GetNextAssoc(pos, key1, (void*&)pPath); |
1089 delete pPath; | 1088 delete pPath; |
1090 } | 1089 } |
1091 delete m_pBitmap; | |
1092 m_PathMap.RemoveAll(); | 1090 m_PathMap.RemoveAll(); |
1093 } | 1091 } |
1094 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ | 1092 #if _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ |
1095 void CFX_FaceCache::InitPlatform() | 1093 void CFX_FaceCache::InitPlatform() |
1096 { | 1094 { |
1097 } | 1095 } |
1098 #endif | 1096 #endif |
1099 CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
ineMatrix* pMatrix, | 1097 CFX_GlyphBitmap* CFX_FaceCache::LookUpGlyphBitmap(CFX_Font* pFont, const CFX_Aff
ineMatrix* pMatrix, |
1100 CFX_ByteStringC& FaceGlyphsKey, FX_DWORD glyph_index, FX_BOOL bFontStyle
, | 1098 CFX_ByteStringC& FaceGlyphsKey, FX_DWORD glyph_index, FX_BOOL bFontStyle
, |
1101 int dest_width, int anti_alias) | 1099 int dest_width, int anti_alias) |
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 { | 1710 { |
1713 va_list argList; | 1711 va_list argList; |
1714 va_start(argList, count); | 1712 va_start(argList, count); |
1715 for (int i = 0; i < count; i ++) { | 1713 for (int i = 0; i < count; i ++) { |
1716 int p = va_arg(argList, int); | 1714 int p = va_arg(argList, int); |
1717 ((FX_DWORD*)m_Key)[i] = p; | 1715 ((FX_DWORD*)m_Key)[i] = p; |
1718 } | 1716 } |
1719 va_end(argList); | 1717 va_end(argList); |
1720 m_KeyLen = count * sizeof(FX_DWORD); | 1718 m_KeyLen = count * sizeof(FX_DWORD); |
1721 } | 1719 } |
OLD | NEW |