6974985: Jave2Demo threw exceptions when xrender enabled in OEL5.5
Reviewed-by: prr
This commit is contained in:
parent
3c489ff5e2
commit
0b9cde591a
@ -424,6 +424,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
|
||||
Java_sun_java2d_xr_XRSurfaceData_initIDs;
|
||||
Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
|
||||
Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
|
||||
Java_sun_java2d_xr_XRBackendNative_initIDs;
|
||||
Java_sun_java2d_xr_XIDGenerator_bufferXIDs;
|
||||
Java_sun_java2d_xr_XRBackendNative_freeGC;
|
||||
|
@ -374,6 +374,7 @@ SUNWprivate_1.1 {
|
||||
Java_sun_java2d_xr_XRSurfaceData_initXRPicture;
|
||||
Java_sun_java2d_xr_XRSurfaceData_initIDs;
|
||||
Java_sun_java2d_xr_XRSurfaceData_XRInitSurface;
|
||||
Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture;
|
||||
Java_sun_java2d_xr_XRBackendNative_initIDs;
|
||||
Java_sun_java2d_xr_XRBackendNative_freeGC;
|
||||
Java_sun_java2d_xr_XRBackendNative_createGC;
|
||||
|
@ -55,6 +55,8 @@ public abstract class XRSurfaceData extends XSurfaceData {
|
||||
|
||||
native void initXRPicture(long xsdo, int pictForm);
|
||||
|
||||
native void freeXSDOPicture(long xsdo);
|
||||
|
||||
public static final String DESC_BYTE_A8_X11 = "Byte A8 Pixmap";
|
||||
public static final String DESC_INT_RGB_X11 = "Integer RGB Pixmap";
|
||||
public static final String DESC_INT_ARGB_X11 = "Integer ARGB-Pre Pixmap";
|
||||
@ -531,6 +533,17 @@ public abstract class XRSurfaceData extends XSurfaceData {
|
||||
public Object getDestination() {
|
||||
return peer.getTarget();
|
||||
}
|
||||
|
||||
public void invalidate() {
|
||||
try {
|
||||
SunToolkit.awtLock();
|
||||
freeXSDOPicture(getNativeOps());
|
||||
}finally {
|
||||
SunToolkit.awtUnlock();
|
||||
}
|
||||
|
||||
super.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
public static class XRInternalSurfaceData extends XRSurfaceData {
|
||||
|
@ -375,6 +375,12 @@ X11SD_Dispose(JNIEnv *env, SurfaceDataOps *ops)
|
||||
AWT_LOCK();
|
||||
|
||||
xsdo->invalid = JNI_TRUE;
|
||||
|
||||
if (xsdo->xrPic != None) {
|
||||
XRenderFreePicture(awt_display, xsdo->xrPic);
|
||||
xsdo->xrPic = None;
|
||||
}
|
||||
|
||||
if (xsdo->isPixmap == JNI_TRUE && xsdo->drawable != 0) {
|
||||
#ifdef MITSHM
|
||||
if (xsdo->shmPMData.shmSegInfo != NULL) {
|
||||
|
@ -114,3 +114,26 @@ Java_sun_java2d_xr_XRSurfaceData_XRInitSurface(JNIEnv *env, jclass xsd,
|
||||
XShared_initSurface(env, xsdo, depth, width, height, drawable);
|
||||
#endif /* !HEADLESS */
|
||||
}
|
||||
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_sun_java2d_xr_XRSurfaceData_freeXSDOPicture(JNIEnv *env, jobject xsd,
|
||||
jlong pXSData)
|
||||
{
|
||||
#ifndef HEADLESS
|
||||
X11SDOps *xsdo;
|
||||
|
||||
J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_freeXSDOPicture");
|
||||
|
||||
xsdo = X11SurfaceData_GetOps(env, xsd);
|
||||
if (xsdo == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(xsdo->xrPic != None) {
|
||||
XRenderFreePicture(awt_display, xsdo->xrPic);
|
||||
xsdo->xrPic = None;
|
||||
}
|
||||
#endif /* !HEADLESS */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user