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

Print this page




 199         layer.textureID = 0;
 200     }
 201 }
 202 
 203 // Must be called on the AppKit thread and under the RQ lock.
 204 JNIEXPORT void JNICALL
 205 Java_sun_java2d_opengl_CGLLayer_blitTexture
 206 (JNIEnv *env, jclass cls, jlong layerPtr)
 207 {
 208     CGLLayer *layer = jlong_to_ptr(layerPtr);
 209 
 210     [layer blitTexture];
 211 }
 212 
 213 JNIEXPORT void JNICALL
 214 Java_sun_java2d_opengl_CGLLayer_nativeSetScale
 215 (JNIEnv *env, jclass cls, jlong layerPtr, jdouble scale)
 216 {
 217     JNF_COCOA_ENTER(env);
 218     CGLLayer *layer = jlong_to_ptr(layerPtr);
 219     [ThreadUtilities performOnMainThreadWaiting:NO block:^(){
 220         layer.contentsScale = scale;
 221     }];
 222     JNF_COCOA_EXIT(env);
 223 }


 199         layer.textureID = 0;
 200     }
 201 }
 202 
 203 // Must be called on the AppKit thread and under the RQ lock.
 204 JNIEXPORT void JNICALL
 205 Java_sun_java2d_opengl_CGLLayer_blitTexture
 206 (JNIEnv *env, jclass cls, jlong layerPtr)
 207 {
 208     CGLLayer *layer = jlong_to_ptr(layerPtr);
 209 
 210     [layer blitTexture];
 211 }
 212 
 213 JNIEXPORT void JNICALL
 214 Java_sun_java2d_opengl_CGLLayer_nativeSetScale
 215 (JNIEnv *env, jclass cls, jlong layerPtr, jdouble scale)
 216 {
 217     JNF_COCOA_ENTER(env);
 218     CGLLayer *layer = jlong_to_ptr(layerPtr);
 219     [ThreadUtilities performOnMainThreadWaiting:[NSThread isMainThread] block:^(){
 220         layer.contentsScale = scale;
 221     }];
 222     JNF_COCOA_EXIT(env);
 223 }