< prev index next >
src/java.desktop/share/classes/sun/java2d/opengl/OGLSurfaceData.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
@@ -89,11 +89,10 @@
* "type" constants and their corresponding SurfaceType:
*
* OGL Type Corresponding SurfaceType
* -------- -------------------------
* WINDOW OpenGLSurface
- * PBUFFER OpenGLSurface
* TEXTURE OpenGLTexture
* FLIP_BACKBUFFER OpenGLSurface
* FBOBJECT OpenGLSurfaceRTT
*/
public abstract class OGLSurfaceData extends SurfaceData
@@ -102,11 +101,10 @@
/**
* OGL-specific surface types
*
* @see sun.java2d.pipe.hw.AccelSurface
*/
- public static final int PBUFFER = RT_PLAIN;
public static final int FBOBJECT = RT_TEXTURE;
/**
* Pixel formats
*/
@@ -170,13 +168,10 @@
protected native boolean initFBObject(long pData,
boolean isOpaque, boolean texNonPow2,
boolean texRect,
int width, int height);
protected native boolean initFlipBackbuffer(long pData);
- protected abstract boolean initPbuffer(long pData, long pConfigInfo,
- boolean isOpaque,
- int width, int height);
private native int getTextureTarget(long pData);
private native int getTextureID(long pData);
static {
@@ -248,11 +243,10 @@
switch (oglType) {
case TEXTURE:
return OpenGLTexture;
case FBOBJECT:
return OpenGLSurfaceRTT;
- case PBUFFER:
default:
return OpenGLSurface;
}
}
@@ -264,17 +258,10 @@
private void initSurfaceNow(int width, int height) {
boolean isOpaque = (getTransparency() == Transparency.OPAQUE);
boolean success = false;
switch (type) {
- case PBUFFER:
- success = initPbuffer(getNativeOps(),
- graphicsConfig.getNativeConfigInfo(),
- isOpaque,
- width, height);
- break;
-
case TEXTURE:
success = initTexture(getNativeOps(),
isOpaque, isTexNonPow2Available(),
isTexRectAvailable(),
width, height);
@@ -309,14 +296,13 @@
OGLRenderQueue rq = OGLRenderQueue.getInstance();
rq.lock();
try {
switch (type) {
case TEXTURE:
- case PBUFFER:
case FBOBJECT:
// need to make sure the context is current before
- // creating the texture (or pbuffer, or fbobject)
+ // creating the texture or fbobject
OGLContext.setScratchSurface(graphicsConfig);
break;
default:
break;
}
< prev index next >