< prev index next >

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTSurfaceLayers.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

*** 24,35 **** */ #import "AWTSurfaceLayers.h" #import "ThreadUtilities.h" #import "LWCToolkit.h" - #import <JavaNativeFoundation/JavaNativeFoundation.h> #import <QuartzCore/CATransaction.h> @implementation AWTSurfaceLayers @synthesize windowLayer; --- 24,35 ---- */ #import "AWTSurfaceLayers.h" #import "ThreadUtilities.h" #import "LWCToolkit.h" + #import "JNIUtilities.h" #import <QuartzCore/CATransaction.h> @implementation AWTSurfaceLayers @synthesize windowLayer;
*** 99,117 **** Java_sun_lwawt_macosx_CPlatformComponent_nativeCreateComponent (JNIEnv *env, jobject obj, jlong windowLayerPtr) { __block AWTSurfaceLayers *surfaceLayers = nil; ! JNF_COCOA_ENTER(env); [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ CALayer *windowLayer = jlong_to_ptr(windowLayerPtr); surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer]; }]; ! JNF_COCOA_EXIT(env); return ptr_to_jlong(surfaceLayers); } /* --- 99,117 ---- Java_sun_lwawt_macosx_CPlatformComponent_nativeCreateComponent (JNIEnv *env, jobject obj, jlong windowLayerPtr) { __block AWTSurfaceLayers *surfaceLayers = nil; ! JNI_COCOA_ENTER(env); [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ CALayer *windowLayer = jlong_to_ptr(windowLayerPtr); surfaceLayers = [[AWTSurfaceLayers alloc] initWithWindowLayer: windowLayer]; }]; ! JNI_COCOA_EXIT(env); return ptr_to_jlong(surfaceLayers); } /*
*** 120,136 **** * Signature: (JIIII)V */ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformComponent_nativeSetBounds (JNIEnv *env, jclass clazz, jlong surfaceLayersPtr, jint x, jint y, jint width, jint height) { ! JNF_COCOA_ENTER(env); AWTSurfaceLayers *surfaceLayers = OBJC(surfaceLayersPtr); [ThreadUtilities performOnMainThreadWaiting:NO block:^(){ CGRect rect = CGRectMake(x, y, width, height); [surfaceLayers setBounds: rect]; }]; ! JNF_COCOA_EXIT(env); } --- 120,136 ---- * Signature: (JIIII)V */ JNIEXPORT void JNICALL Java_sun_lwawt_macosx_CPlatformComponent_nativeSetBounds (JNIEnv *env, jclass clazz, jlong surfaceLayersPtr, jint x, jint y, jint width, jint height) { ! JNI_COCOA_ENTER(env); AWTSurfaceLayers *surfaceLayers = OBJC(surfaceLayersPtr); [ThreadUtilities performOnMainThreadWaiting:NO block:^(){ CGRect rect = CGRectMake(x, y, width, height); [surfaceLayers setBounds: rect]; }]; ! JNI_COCOA_EXIT(env); }
< prev index next >