/*
* 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 final int scale;
protected final int width;
protected final int height;
// TEXTURE shouldn't be scaled, it is used for managed BufferedImages.
}
{
this.graphicsConfig = gc;
long pPeerData = 0L;
boolean isOpaque = true;
}
}
{
this.graphicsConfig = gc;
long layerPtr = 0L;
boolean isOpaque = true;
}
}
@Override //SurfaceData
return graphicsConfig;
}
/**
* Creates a SurfaceData object representing the primary (front) buffer of
* an on-screen Window.
*/
}
/**
* Creates a SurfaceData object representing the intermediate buffer
* between the Java2D flusher thread and the AppKit thread.
*/
}
/**
* Creates a SurfaceData object representing the back buffer of a
* double-buffered on-screen Window.
*/
if (type == FLIP_BACKBUFFER) {
} else {
}
}
/**
* Creates a SurfaceData object representing an off-screen buffer (either a
* Pbuffer or Texture).
*/
type);
}
} else {
// REMIND: this should rarely (never?) happen, but what if
// default config is not CGL?
}
}
}
public void validate() {
// Overridden in CGLWindowSurfaceData below
}
public int getDefaultScale() {
return scale;
}
return false;
}
}
return true;
}
protected native void clearWindow();
}
return pView.getSurfaceData();
}
}
/**
* Returns destination Component associated with this SurfaceData.
*/
return pView.getDestination();
}
public void validate() {
try {
public void run() {
}
});
} finally {
}
}
public void invalidate() {
super.invalidate();
clearWindow();
}
}
/**
* A surface which implements an intermediate buffer between
* the Java2D flusher thread and the AppKit thread.
*
* This surface serves as a buffer attached to a CGLLayer and
* the layer redirects all painting to the buffer's graphics.
*/
}
return layer.getSurfaceData();
}
boolean isOnScreen() {
return true;
}
}
return layer.getDestination();
}
public int getTransparency() {
return layer.getTransparency();
}
public void invalidate() {
super.invalidate();
clearWindow();
}
}
/**
* A surface which implements a v-synced flip back-buffer with COPIED
* FlipContents.
*
* This surface serves as a back-buffer to the outside world, while it is
* actually an offscreen surface. When the BufferStrategy this surface
* belongs to is showed, it is first copied to the real private
* FLIP_BACKBUFFER, which is then flipped.
*/
public static class CGLVSyncOffScreenSurfaceData extends
}
return flipSurface;
}
public void flush() {
flipSurface.flush();
super.flush();
}
}
}
return restoreContents(offscreenImage);
}
if (type == FLIP_BACKBUFFER) {
} else {
}
}
/**
* Returns destination Image associated with this SurfaceData.
*/
return offscreenImage;
}
}
// given a surface create and attach GL context, then return it
long sharedContext);
if ((sd instanceof CGLSurfaceData) == true) {
} else {
return 0L;
}
}
// returns whether or not the makeCurrent operation succeeded
long ctx);
} else {
return false;
}
}
// additional cleanup
if (ctx != 0L) {
}
}
}