< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/ImageSurfaceData.m
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -32,13 +32,10 @@
#import "jni_util.h"
#import <JavaNativeFoundation/JavaNativeFoundation.h>
#import "BufImgSurfaceData.h"
-#import "ThreadUtilities.h"
-
-
//#define DEBUG 1
#if defined DEBUG
#define IMAGE_SURFACE_INLINE
#define PRINT(msg) {fprintf(stderr, "%s\n", msg);fflush(stderr);}
@@ -193,14 +190,13 @@
IMAGE_SURFACE_INLINE void customPixelsFromJava(JNIEnv *env, ImageSDOps *isdo)
{
PRINT(" customPixelsFromJava")
SurfaceDataOps *sdo = (SurfaceDataOps*)isdo;
- JNFCallVoidMethod([ThreadUtilities getJNIEnv], sdo->sdObject, jm_syncFromCustom); // AWT_THREADING Safe (known object)
+ JNFCallVoidMethod(env, sdo->sdObject, jm_syncFromCustom); // AWT_THREADING Safe (known object)
}
-
IMAGE_SURFACE_INLINE void copyBits(jint w, jint h, jint javaPixelsBytesPerRow, Pixel8bit *pixelsSrc, jint dstPixelsBytesPerRow, Pixel8bit *pixelsDst)
{
PRINT(" copyBits")
if (javaPixelsBytesPerRow == dstPixelsBytesPerRow)
@@ -425,11 +421,11 @@
IMAGE_SURFACE_INLINE void customPixelsToJava(JNIEnv *env, ImageSDOps *isdo)
{
PRINT(" customPixelsToJava")
SurfaceDataOps *sdo = (SurfaceDataOps*)isdo;
- JNFCallVoidMethod([ThreadUtilities getJNIEnv], sdo->sdObject, jm_syncToCustom); // AWT_THREADING Safe (known object)
+ JNFCallVoidMethod(env, sdo->sdObject, jm_syncToCustom); // AWT_THREADING Safe (known object)
}
IMAGE_SURFACE_INLINE void removeAlphaPre_32bit(jint w, jint h, jint javaPixelsBytesPerRow, jint javaPixelBytes, Pixel32bit *pixelsSrc)
{
PRINT(" removeAlphaPre_32bit")
@@ -993,13 +989,13 @@
static void imageDataProvider_UnholdJavaPixels(void *info, const void *data, size_t size)
{
PRINT("imageDataProvider_UnholdJavaPixels")
- ImageSDOps* isdo = (ImageSDOps*)info;
- unholdJavaPixels([ThreadUtilities getJNIEnv], isdo);
+ // Currently do nothing
}
+
static void imageDataProvider_FreeTempPixels(void *info, const void *data, size_t size)
{
PRINT("imageDataProvider_FreeTempPixels")
free((void *)data);
< prev index next >