/*
* 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.
*
* 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.
*/
/*
* @test
* @bug 6635805 6653780 6667607
* @summary Tests that the resource sharing layer API is not broken
* @author Dmitri.Trembovetski@sun.com: area=Graphics
* @compile -XDignore.symbol.file=true RSLAPITest.java
*/
public class RSLAPITest {
private static volatile boolean failed = false;
if (failed) {
throw new RuntimeException("Test FAILED. See err output for more");
}
}
if (ret != 0l) {
"FAILED: surface.getNativeResource(%d) returned" +
" 0x%s. It should have have returned 0L\n",
failed = true;
}
}
try {
f.setAccessible(true);
" getNativeResource(D3D_DEVICE_RESOURCE)=0x%x\n",
}
} catch (ClassNotFoundException e) {}
catch (IllegalAccessException e) {}
catch (NoSuchFieldException e) {
" field not found!");
failed = true;
}
}
if (s instanceof AccelSurface) {
try {
public void run() {
" getNativeResource(FLIP_BACKBUFFER)=0x%x\n",
}
});
} finally {
}
} else {
}
}
}
if (!(gc instanceof AccelGraphicsConfig)) {
return;
}
if (vi instanceof DestSurfaceProvider) {
if (s instanceof AccelSurface) {
printSurface((AccelSurface) s);
}
if (g instanceof DestSurfaceProvider) {
"DestSurfaceProvider");
}
} else {
}
TEXTURE);
}
int transparency, int type)
{
int w = 11, h = 17;
"image wasn't created\n", cap);
throw new RuntimeException("Failed: image wasn't created " +
"for supported cap");
} else {
if (!(vi instanceof DestSurfaceProvider)) {
throw new RuntimeException("Failed: created VI is not " +
"DestSurfaceProvider");
}
if (s instanceof AccelSurface) {
throw new RuntimeException("Failed: returned VI is" +
" requested type=" + type);
} else {
}
boolean ex = false;
try {
g.dispose();
} catch (UnsupportedOperationException e) {
ex = true;
}
if (!ex) {
throw new RuntimeException("Failed: " +
"texture.getGraphics() didn't throw exception");
} else {
" threw exception for texture-based VI");
}
}
} else {
"created for cap=%d but accel surface is null\n",
}
}
} else {
throw new RuntimeException("Failed: created VI for " +
"unsupported cap=" + cap);
}
}
}
final AccelDeviceEventListener l = new AccelDeviceEventListener() {
public void onDeviceDispose() {
agc.removeDeviceEventListener(this);
}
public void onDeviceReset() {
}
};
try {
c.saveState();
c.restoreState();
} finally {
}
}
int iterations = 100;
if (ram > 0) {
// guesstimate the number of iterations needed to exhaust vram
int i = 2 *
}
for (int i = 0; i < iterations; i++) {
break;
}
}
}
"during VI creation");
}
}