changeset 10735:02fd713f25df

8078654: CloseTTFontFileFunc callback should be removed Reviewed-by: prr, martin
author prr
date Thu, 30 Apr 2015 14:20:26 -0700
parents 1e595c8af465
children 3ad03712ea43
files src/share/native/sun/font/freetypeScaler.c
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/font/freetypeScaler.c	Thu Apr 30 16:02:42 2015 +0300
+++ b/src/share/native/sun/font/freetypeScaler.c	Thu Apr 30 14:20:26 2015 -0700
@@ -147,20 +147,6 @@
 
 #define FILEDATACACHESIZE 1024
 
-/* NB: is it ever called? */
-static void CloseTTFontFileFunc(FT_Stream stream) {
-    FTScalerInfo *scalerInfo = (FTScalerInfo *) stream->pathname.pointer;
-    JNIEnv* env = scalerInfo->env;
-    jclass tmpClass = (*env)->FindClass(env, "sun/font/TrueTypeFont");
-    jfieldID platNameField =
-         (*env)->GetFieldID(env, tmpClass, "platName", "Ljava/lang/String;");
-    jstring platName = (*env)->GetObjectField(env,
-                                              scalerInfo->font2D,
-                                              platNameField);
-    const char *name = JNU_GetStringPlatformChars(env, platName, NULL);
-    JNU_ReleaseStringPlatformChars(env, platName, name);
-}
-
 static unsigned long ReadTTFontFileFunc(FT_Stream stream,
                                         unsigned long offset,
                                         unsigned char* destBuffer,
@@ -305,7 +291,7 @@
                     ftstream->size = filesize;
                     ftstream->pos = 0;
                     ftstream->read = (FT_Stream_IoFunc) ReadTTFontFileFunc;
-                    ftstream->close = (FT_Stream_CloseFunc) CloseTTFontFileFunc;
+                    ftstream->close = NULL;
                     ftstream->pathname.pointer = (void *) scalerInfo;
 
                     memset(&ft_open_args, 0, sizeof(FT_Open_Args));