< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/font/CCharToGlyphMapper.m
Print this page
rev 54096 : 8259651: [macOS] Replace JNF_COCOA_ENTER/EXIT macros
rev 54098 : 8260616: Removing remaining JNF dependencies in the java.desktop module
8259729: Missed JNFInstanceOf -> IsInstanceOf conversion
*** 21,31 ****
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! #import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "AWTFont.h"
#import "CoreTextSupport.h"
#import "sun_font_CCharToGlyphMapper.h"
--- 21,31 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
! #import "JNIUtilities.h"
#import "AWTFont.h"
#import "CoreTextSupport.h"
#import "sun_font_CCharToGlyphMapper.h"
*** 39,54 ****
Java_sun_font_CCharToGlyphMapper_countGlyphs
(JNIEnv *env, jclass clazz, jlong awtFontPtr)
{
jint numGlyphs = 0;
! JNF_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
numGlyphs = [awtFont->fFont numberOfGlyphs];
! JNF_COCOA_EXIT(env);
return numGlyphs;
}
static inline void
--- 39,54 ----
Java_sun_font_CCharToGlyphMapper_countGlyphs
(JNIEnv *env, jclass clazz, jlong awtFontPtr)
{
jint numGlyphs = 0;
! JNI_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
numGlyphs = [awtFont->fFont numberOfGlyphs];
! JNI_COCOA_EXIT(env);
return numGlyphs;
}
static inline void
*** 88,98 ****
JNIEXPORT void JNICALL
Java_sun_font_CCharToGlyphMapper_nativeCharsToGlyphs
(JNIEnv *env, jclass clazz,
jlong awtFontPtr, jint count, jcharArray unicodes, jintArray glyphs)
{
! JNF_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
// check the array size
jint len = (*env)->GetArrayLength(env, glyphs);
--- 88,98 ----
JNIEXPORT void JNICALL
Java_sun_font_CCharToGlyphMapper_nativeCharsToGlyphs
(JNIEnv *env, jclass clazz,
jlong awtFontPtr, jint count, jcharArray unicodes, jintArray glyphs)
{
! JNI_COCOA_ENTER(env);
AWTFont *awtFont = (AWTFont *)jlong_to_ptr(awtFontPtr);
// check the array size
jint len = (*env)->GetArrayLength(env, glyphs);
*** 109,115 ****
(*env)->ReleasePrimitiveArrayCritical(env, unicodes,
unicodesAsChars, JNI_ABORT);
}
! JNF_COCOA_EXIT(env);
}
--- 109,115 ----
(*env)->ReleasePrimitiveArrayCritical(env, unicodes,
unicodesAsChars, JNI_ABORT);
}
! JNI_COCOA_EXIT(env);
}
< prev index next >