/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* 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.
*/
protected int depth;
private static native void initIDs();
long drawable, int pictFormat);
public static final SurfaceType
public static final SurfaceType
public static final SurfaceType
throw new InternalError("not implemented yet");
}
public static void initXRSurfaceData() {
if (!isX11SurfaceDataInitialized()) {
initIDs();
}
}
/**
* Synchronized accessor method for isDrawableValid.
*/
protected boolean isXRDrawableValid() {
try {
return isDrawableValid();
} finally {
}
}
}
boolean validated = false;
/*
* The textpipe for now can't handle TexturePaint when extra-alpha is
* specified nore XOR mode
*/
{
} else {
super.validatePipe(sg2d);
validated = true;
}
/*
* TODO: Can we rely on the GC for ARGB32 surfaces?
*/
}
}
// custom paints handled by super.validatePipe() below
}
}
{
} else {
} else {
}
} else {
if (!validated) {
super.validatePipe(sg2d);
}
}
}
// install the text pipe based on our earlier decision
// always override the image pipe with the specialized XRender pipe
}
{
return null;
}
return super.getMaskFill(sg2d);
}
{
return solidloops;
}
return super.getRenderLoops(sg2d);
}
return graphicsConfig;
}
/**
* Method for instantiating a Window SurfaceData
*/
}
/**
* Method for instantiating a Pixmap SurfaceData (offscreen).
* otherwise a 32-bit ARGB surface.
*/
long drawable,
int transparency) {
if (depth == 24) {
0x00FF0000, 0x0000FF00, 0x000000FF);
} else {
0x000000FF, 0xFF000000);
}
return new XRPixmapSurfaceData
}
{
this.graphicsConfig = gc;
}
super(XRSurfaceData.IntRgbX11,
this.renderQueue = renderQueue;
}
/**
* Inits the XRender-data-structures which belong to the XRSurfaceData.
*
* @param pictureFormat
*/
try {
} finally {
}
}
} else {
}
}
/**
* Returns a boolean indicating whether or not a copyArea from the given
* rectangle source coordinates might be incomplete and result in X11
* GraphicsExposure events being generated from XCopyArea. This method
* allows the SurfaceData copyArea method to determine if it needs to set
* the GraphicsExposures attribute of the X11 GC to True or False to receive
* or avoid the events.
*
* @return true if there is any chance that an XCopyArea from the given
* source coordinates could produce any X11 Exposure events.
*/
public abstract boolean canSourceSendExposures(int x, int y, int w, int h);
/**
* CopyArea is implemented using the "old" X11 GC, therefor clip and
* needExposures have to be validated against that GC. Pictures and GCs
* don't share state.
*/
if (validatedGCClip != gcClip) {
}
if (validatedExposures != needExposures) {
}
if (validatedXorComp != null) {
}
}
if (!isXRDrawableValid()) {
return true;
}
makePipes();
}
{
try {
boolean needExposures = canSourceSendExposures(x, y, w, h);
} finally {
}
return true;
}
return false;
}
/**
* Returns the XRender SurfaceType which is able to fullfill the specified
* transparency requirement.
*/
int transparency) {
switch (transparency) {
case Transparency.OPAQUE:
break;
case Transparency.BITMASK:
case Transparency.TRANSLUCENT:
break;
}
return sType;
}
public void invalidate() {
if (isValid()) {
setInvalid();
super.invalidate();
}
}
private int xid;
public int picture;
private boolean validatedExposures = true;
boolean transformInUse = false;
/**
* Validates an XRSurfaceData when used as source. Note that the clip is
* applied when used as source as well as destination.
*/
if (validatedClip != null) {
}
}
if (transformInUse) {
transformInUse = false;
}
} else if (!transformInUse ||
sxForm.getTranslateY());
transformInUse = true;
}
}
}
/**
* Validates the Surface when used as destination.
*/
if (!isValid()) {
throw new InvalidPipeException("bounds changed");
}
boolean updateGCClip = false;
if (clip != validatedClip) {
updateGCClip = true;
}
// validate pixel
if (validatedGCForegroundPixel != pixel) {
}
}
if (updateGCClip) {
}
}
}
* TODO: Why is this synchronized,
* but access not?
*/
try {
xrDrawImage = new XRDrawImage();
if (JulesPathBuf.isCairoAvailable()) {
}
} finally {
}
}
}
if (isXRDrawableValid()) {
makePipes();
}
}
return peer.getSurfaceData();
}
r.x = r.y = 0;
return r;
}
public boolean canSourceSendExposures(int x, int y, int w, int h) {
return true;
}
/**
* Returns destination Component associated with this SurfaceData.
*/
}
public void invalidate() {
try {
}finally {
}
super.invalidate();
}
}
super(renderQueue);
this.validatedSourceTransform = transform;
if (validatedSourceTransform != null) {
transformInUse = true;
}
}
public boolean canSourceSendExposures(int x, int y, int w, int h) {
return false;
}
return null;
}
return null;
}
return null;
}
}
int width;
int height;
int transparency;
int transparency, int pictFormat,
int depth) {
this.transparency = transparency;
makePipes();
}
long drawable, int pictFormat) {
try {
} finally {
}
}
return restoreContents(offscreenImage);
}
/**
* Need this since the surface data is created with the color model of
* the target GC, which is always opaque. But in SunGraphics2D.blitSD we
* choose loops based on the transparency on the source SD, so it could
* choose wrong loop (blit instead of blitbg, for example).
*/
public int getTransparency() {
return transparency;
}
}
public boolean canSourceSendExposures(int x, int y, int w, int h) {
}
public void flush() {
/*
* We need to invalidate the surface before disposing the native
* Drawable and Picture. This way if an application tries to render
* to an already flushed XRSurfaceData, we will notice in the
* validate() method above that it has been invalidated, and we will
* avoid using those native resources that have already been
* disposed.
*/
invalidate();
}
/**
* Returns destination Image associated with this SurfaceData.
*/
return offscreenImage;
}
}
public long getGC() {
return xgc;
}
if (!xsd.isXRDrawableValid()) {
return false;
}
}
}
public int getPicture() {
return picture;
}
public int getXid() {
return xid;
}
return graphicsConfig;
}
}