/*
* 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.
*/
/*
*
*
* Tests that the use of shared memory pixmaps isn't broken:
* create a VolatileImage, fill it with red color, copy it to the screen
* make sure the pixels on the screen are red.
*
* Note that we force the use of shared memory pixmaps in the shell script.
*
* @author Dmitri.Trembovetski
*/
public class SharedMemoryPixmapsTest {
static boolean show = false;
/** Creates a new instance of SharedMemoryPixmapsTest */
public SharedMemoryPixmapsTest() {
testFrame.setVisible(true);
}
if ("-show".equals(s)) {
show = true;
} else {
}
}
new SharedMemoryPixmapsTest();
}
boolean tested = false;
void initVI() {
int res;
} else {
}
}
}
}
do {
initVI();
} while (vi.contentsLost());
if (!tested) {
if (testRendering()) {
} else {
}
tested = true;
}
if (!show) {
testFrame.setVisible(false);
}
}
try {
} catch (InterruptedException ex) {}
try {
r = new Robot();
} catch (AWTException ex) {
throw new RuntimeException("Can't create Robot");
}
Point p = getLocationOnScreen();
BufferedImage b =
for (int y = 0; y < b.getHeight(); y++) {
for (int x = 0; x < b.getWidth(); x++) {
+ x + "x" + y + " : " +
if (show) {
return false;
}
}
}
}
return true;
}
}
}
}