< prev index next >
src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRSurfaceData.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2010, 2013, 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
--- 1,7 ----
/*
! * Copyright (c) 2010, 2020, 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
*** 21,30 ****
--- 21,34 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
+ #ifdef HEADLESS
+ #error This file should not be included in headless library
+ #endif
+
#include "GraphicsPrimitiveMgr.h"
#include "Region.h"
#include "Trace.h"
#include "X11SurfaceData.h"
*** 41,64 ****
#include <sys/uio.h>
#include <dlfcn.h>
#include <setjmp.h>
- #ifndef HEADLESS
jfieldID pictID;
jfieldID xidID;
jfieldID blitMaskPMID;
jfieldID blitMaskPictID;
- #endif /* !HEADLESS */
JNIEXPORT void JNICALL
Java_sun_java2d_xr_XRSurfaceData_initXRPicture(JNIEnv *env, jobject xsd,
jlong pXSData,
jint pictFormat)
{
- #ifndef HEADLESS
-
X11SDOps *xsdo;
XRenderPictFormat *fmt;
J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_initXRender");
--- 45,64 ----
*** 76,92 ****
CPRepeat, &pict_attr);
}
(*env)->SetIntField (env, xsd, pictID, xsdo->xrPic);
(*env)->SetIntField (env, xsd, xidID, xsdo->drawable);
- #endif /* !HEADLESS */
}
JNIEXPORT void JNICALL
Java_sun_java2d_xr_XRSurfaceData_initIDs(JNIEnv *env, jclass xsd)
{
- #ifndef HEADLESS
J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_initIDs");
pictID = (*env)->GetFieldID(env, xsd, "picture", "I");
if (pictID == NULL) {
return;
--- 76,90 ----
*** 95,135 ****
if (xidID == NULL) {
return;
}
XShared_initIDs(env, JNI_FALSE);
- #endif /* !HEADLESS */
}
-
JNIEXPORT void JNICALL
Java_sun_java2d_xr_XRSurfaceData_XRInitSurface(JNIEnv *env, jclass xsd,
jint depth,
jint width, jint height,
jlong drawable, jint pictFormat)
{
- #ifndef HEADLESS
X11SDOps *xsdo;
J2dTraceLn(J2D_TRACE_INFO, "in XRSurfaceData_initSurface");
xsdo = X11SurfaceData_GetOps(env, xsd);
if (xsdo == NULL) {
return;
}
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);
--- 93,126 ----
*** 139,145 ****
if(xsdo->xrPic != None) {
XRenderFreePicture(awt_display, xsdo->xrPic);
xsdo->xrPic = None;
}
- #endif /* !HEADLESS */
}
--- 130,135 ----
< prev index next >