[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r110517: * nsfont.m (nsfont_open): Re
From: |
Jan D. |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r110517: * nsfont.m (nsfont_open): Remove font cache, it is not GC correct. |
Date: |
Fri, 12 Oct 2012 12:01:05 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 110517
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Fri 2012-10-12 12:01:05 +0200
message:
* nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
modified:
src/ChangeLog
src/nsfont.m
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-10-12 01:47:40 +0000
+++ b/src/ChangeLog 2012-10-12 10:01:05 +0000
@@ -1,3 +1,7 @@
+2012-10-12 Jan Djärv <address@hidden>
+
+ * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.
+
2012-10-12 Glenn Morris <address@hidden>
* buffer.c (Fset_buffer): Doc fix. (Bug#12624)
=== modified file 'src/nsfont.m'
--- a/src/nsfont.m 2012-10-09 18:33:01 +0000
+++ b/src/nsfont.m 2012-10-12 10:01:05 +0000
@@ -729,16 +729,6 @@
NSRect brect;
Lisp_Object font_object;
int fixLeopardBug;
- static NSMutableDictionary *fontCache = nil;
- NSNumber *cached;
-
- /* 2008/03/08: The same font may end up being requested for different
- entities, due to small differences in numeric values or other issues,
- or for different copies of the same entity. Therefore we cache to
- avoid creating multiple struct font objects (with metrics cache, etc.)
- for the same NSFont object. */
- if (fontCache == nil)
- fontCache = [[NSMutableDictionary alloc] init];
if (NSFONT_TRACE)
{
@@ -794,28 +784,8 @@
if (NSFONT_TRACE)
NSLog (@"address@hidden", nsfont);
- /* Check the cache */
- cached = [fontCache objectForKey: nsfont];
- if (cached != nil && !synthItal)
- {
- if (NSFONT_TRACE)
- fprintf(stderr, "*** nsfont_open CACHE HIT!\n");
- XHASH (font_object) = [cached unsignedLongLongValue];
- return font_object;
- }
- else
- {
- font_object = font_make_object (VECSIZE (struct nsfont_info),
- font_entity, pixel_size);
- if (!synthItal)
- {
- [fontCache setObject: [NSNumber
- numberWithUnsignedLongLong:
- (unsigned long long) XHASH (font_object)]
- forKey: nsfont];
- }
- }
-
+ font_object = font_make_object (VECSIZE (struct nsfont_info),
+ font_entity, pixel_size);
font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
font = (struct font *) font_info;
if (!font)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r110517: * nsfont.m (nsfont_open): Remove font cache, it is not GC correct.,
Jan D. <=