OLD | NEW |
1 /* | 1 /* |
2 * This file is part of the internal font implementation. It should not be incl
uded by anyone other than | 2 * This file is part of the internal font implementation. It should not be incl
uded by anyone other than |
3 * FontMac.cpp, FontWin.cpp and Font.cpp. | 3 * FontMac.cpp, FontWin.cpp and Font.cpp. |
4 * | 4 * |
5 * Copyright (C) 2006, 2007 Apple Inc. | 5 * Copyright (C) 2006, 2007 Apple Inc. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 11 matching lines...) Expand all Loading... |
22 */ | 22 */ |
23 | 23 |
24 #include "config.h" | 24 #include "config.h" |
25 #include "FontPlatformData.h" | 25 #include "FontPlatformData.h" |
26 | 26 |
27 #include <windows.h> | 27 #include <windows.h> |
28 #include <objidl.h> | 28 #include <objidl.h> |
29 #include <mlang.h> | 29 #include <mlang.h> |
30 | 30 |
31 #include "ChromiumBridge.h" | 31 #include "ChromiumBridge.h" |
| 32 #include "SkiaFontWin.h" |
32 | 33 |
33 namespace WebCore { | 34 namespace WebCore { |
34 | 35 |
35 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) | 36 FontPlatformData::FontPlatformData(WTF::HashTableDeletedValueType) |
36 : m_font(hashTableDeletedFontValue()) | 37 : m_font(hashTableDeletedFontValue()) |
37 , m_size(-1) | 38 , m_size(-1) |
38 , m_scriptCache(0) | 39 , m_scriptCache(0) |
39 , m_scriptFontProperties(0) | 40 , m_scriptFontProperties(0) |
40 { | 41 { |
41 } | 42 } |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 ScriptFreeCache(&m_scriptCache); | 97 ScriptFreeCache(&m_scriptCache); |
97 m_scriptCache = 0; | 98 m_scriptCache = 0; |
98 | 99 |
99 delete m_scriptFontProperties; | 100 delete m_scriptFontProperties; |
100 m_scriptFontProperties = 0; | 101 m_scriptFontProperties = 0; |
101 } | 102 } |
102 | 103 |
103 FontPlatformData::RefCountedHFONT::~RefCountedHFONT() | 104 FontPlatformData::RefCountedHFONT::~RefCountedHFONT() |
104 { | 105 { |
105 if (m_hfont != reinterpret_cast<HFONT>(-1)) { | 106 if (m_hfont != reinterpret_cast<HFONT>(-1)) { |
| 107 RemoveFontFromSkiaFontWinCache(m_hfont); |
106 DeleteObject(m_hfont); | 108 DeleteObject(m_hfont); |
107 } | 109 } |
108 } | 110 } |
109 | 111 |
110 FontPlatformData::RefCountedHFONT* FontPlatformData::hashTableDeletedFontValue() | 112 FontPlatformData::RefCountedHFONT* FontPlatformData::hashTableDeletedFontValue() |
111 { | 113 { |
112 static RefPtr<RefCountedHFONT> deletedValue = | 114 static RefPtr<RefCountedHFONT> deletedValue = |
113 RefCountedHFONT::create(reinterpret_cast<HFONT>(-1)); | 115 RefCountedHFONT::create(reinterpret_cast<HFONT>(-1)); |
114 return deletedValue.get(); | 116 return deletedValue.get(); |
115 } | 117 } |
(...skipping 25 matching lines...) Expand all Loading... |
141 } | 143 } |
142 | 144 |
143 SelectObject(dc, oldFont); | 145 SelectObject(dc, oldFont); |
144 ReleaseDC(0, dc); | 146 ReleaseDC(0, dc); |
145 } | 147 } |
146 } | 148 } |
147 return m_scriptFontProperties; | 149 return m_scriptFontProperties; |
148 } | 150 } |
149 | 151 |
150 } | 152 } |
OLD | NEW |