src/macosx/native/sun/java2d/opengl/CGLLayer.m

Print this page

        

*** 214,223 **** Java_sun_java2d_opengl_CGLLayer_nativeSetScale (JNIEnv *env, jclass cls, jlong layerPtr, jdouble scale) { JNF_COCOA_ENTER(env); CGLLayer *layer = jlong_to_ptr(layerPtr); ! [ThreadUtilities performOnMainThreadWaiting:NO block:^(){ layer.contentsScale = scale; }]; JNF_COCOA_EXIT(env); } --- 214,223 ---- Java_sun_java2d_opengl_CGLLayer_nativeSetScale (JNIEnv *env, jclass cls, jlong layerPtr, jdouble scale) { JNF_COCOA_ENTER(env); CGLLayer *layer = jlong_to_ptr(layerPtr); ! [ThreadUtilities performOnMainThreadWaiting:[NSThread isMainThread] block:^(){ layer.contentsScale = scale; }]; JNF_COCOA_EXIT(env); }