--- old/src/java.desktop/macosx/native/libawt_lwawt/font/AWTFont.m 2019-03-06 15:02:13.111928300 +0300 +++ new/src/java.desktop/macosx/native/libawt_lwawt/font/AWTFont.m 2019-03-06 15:02:12.610352500 +0300 @@ -42,33 +42,10 @@ if (self) { fFont = [font retain]; fNativeCGFont = CTFontCopyGraphicsFont((CTFontRef)font, NULL); - layoutTableCache = NULL; } return self; } -static TTLayoutTableCache* newCFontLayoutTableCache() { - TTLayoutTableCache* ltc = calloc(1, sizeof(TTLayoutTableCache)); - if (ltc) { - int i; - for(i=0;ientries[i].len = -1; - } - } - return ltc; -} - -static void freeCFontLayoutTableCache(TTLayoutTableCache* ltc) { - if (ltc) { - int i; - for(i=0;ientries[i].ptr) free (ltc->entries[i].ptr); - } - if (ltc->kernPairs) free(ltc->kernPairs); - free(ltc); - } -} - - (void) dealloc { [fFont release]; fFont = nil; @@ -76,10 +53,6 @@ if (fNativeCGFont) { CGFontRelease(fNativeCGFont); fNativeCGFont = NULL; - if (layoutTableCache != NULL) { - freeCFontLayoutTableCache(layoutTableCache); - layoutTableCache = NULL; - } } [super dealloc]; @@ -90,10 +63,6 @@ CGFontRelease(fNativeCGFont); fNativeCGFont = NULL; } - if (layoutTableCache != NULL) { - freeCFontLayoutTableCache(layoutTableCache); - layoutTableCache = NULL; - } [super finalize]; } @@ -432,23 +401,6 @@ } /* - * Class: sun_font_CFont - * Method: getLayoutTableCacheNative - * Signature: (J)J - */ -JNIEXPORT jlong JNICALL -Java_sun_font_CFont_getLayoutTableCacheNative - (JNIEnv *env, jclass clazz, - jlong awtFontPtr) -{ - AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr); - if (awtFont->layoutTableCache == NULL) { - awtFont->layoutTableCache = newCFontLayoutTableCache(); - } - return (jlong)(awtFont->layoutTableCache); -} - -/* * Class: sun_font_CFont * Method: getTableBytesNative * Signature: (JI)[B