jdk/src/share/native/sun/font/sunFont.c
changeset 887 0aab8d3fa11a
parent 2 90ce3da70b43
child 3928 be186a33df9b
--- a/jdk/src/share/native/sun/font/sunFont.c	Tue Jul 15 16:04:08 2008 +0400
+++ b/jdk/src/share/native/sun/font/sunFont.c	Fri Jul 18 10:48:44 2008 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@
 #include "sun_font_StrikeCache.h"
 
 static void *theNullScalerContext = NULL;
+extern void AccelGlyphCache_RemoveAllCellInfos(GlyphInfo *glyph);
+
 
 JNIEXPORT jlong JNICALL
 Java_sun_font_NullFontScaler_getNullScalerContext
@@ -294,7 +296,7 @@
                 GlyphInfo *ginfo = (GlyphInfo *)ptrs[i];
                 if (ginfo->cellInfo != NULL) {
                     // invalidate this glyph's accelerated cache cell
-                    ginfo->cellInfo->glyphInfo = NULL;
+                    AccelGlyphCache_RemoveAllCellInfos(ginfo);
                 }
                 free((void*)ginfo);
             }
@@ -324,8 +326,7 @@
             if (ptrs[i] != 0L) {
                 GlyphInfo *ginfo = (GlyphInfo *) jlong_to_ptr(ptrs[i]);
                 if (ginfo->cellInfo != NULL) {
-                    // invalidate this glyph's accelerated cache cell
-                    ginfo->cellInfo->glyphInfo = NULL;
+                    AccelGlyphCache_RemoveAllCellInfos(ginfo);
                 }
                 free((void*)ginfo);
             }