< prev index next >
test/jdk/sun/java2d/pipe/hw/RSLAPITest/RSLAPITest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, 2018, 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.
--- 1,7 ----
/*
! * Copyright (c) 2007, 2019, 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.
*** 42,52 ****
import java.awt.Transparency;
import java.awt.image.VolatileImage;
import java.util.HashSet;
import sun.java2d.DestSurfaceProvider;
import sun.java2d.Surface;
- import sun.java2d.pipe.BufferedContext;
import sun.java2d.pipe.RenderQueue;
import sun.java2d.pipe.hw.AccelGraphicsConfig;
import sun.java2d.pipe.hw.AccelSurface;
import static java.awt.Transparency.*;
import java.lang.reflect.Field;
--- 42,51 ----
*** 159,170 ****
}
System.out.println("AccelGraphicsConfig exists, testing.");
AccelGraphicsConfig agc = (AccelGraphicsConfig) gc;
printAGC(agc);
- testContext(agc);
-
VolatileImage vi = gc.createCompatibleVolatileImage(10, 10);
vi.validate(gc);
if (vi instanceof DestSurfaceProvider) {
System.out.println("Passed: VI is DestSurfaceProvider");
Surface s = ((DestSurfaceProvider) vi).getDestSurface();
--- 158,167 ----
*** 248,273 ****
"unsupported cap=" + cap);
}
}
}
- private static void testContext(final AccelGraphicsConfig agc) {
- BufferedContext c = agc.getContext();
-
- RenderQueue rq = c.getRenderQueue();
- rq.lock();
- try {
- c.saveState();
- rq.flushNow();
- c.restoreState();
- rq.flushNow();
- System.out.println("Passed: Save/Restore");
- } finally {
- rq.unlock();
- }
- }
-
private static void testForNPEDuringCreation(AccelGraphicsConfig agc) {
int iterations = 100;
HashSet<VolatileImage> vis = new HashSet<VolatileImage>();
GraphicsConfiguration gc = (GraphicsConfiguration)agc;
Rectangle r = gc.getBounds();
--- 245,254 ----
< prev index next >