SimplePrimQuality.java revision 2362
2362N/A * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. 430N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 430N/A * This code is free software; you can redistribute it and/or modify it 430N/A * under the terms of the GNU General Public License version 2 only, as 430N/A * published by the Free Software Foundation. 430N/A * This code is distributed in the hope that it will be useful, but WITHOUT 430N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 430N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 430N/A * version 2 for more details (a copy is included in the LICENSE file that 430N/A * accompanied this code). 430N/A * You should have received a copy of the GNU General Public License version 430N/A * 2 along with this work; if not, write to the Free Software Foundation, 430N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 430N/A * @bug 4832224 6322584 6328478 6328481 6322580 6588884 6587863 430N/A * @summary Verifies that the pixelization of simple primitives (drawLine, 430N/A * fillRect, drawRect, fill, draw) with the OGL pipeline enabled 430N/A * matches that produced by our software loops. (The primitives tested here 430N/A * are simple enough that the OGL results should match the software results 430N/A * exactly.) There is some overlap with PolyVertTest as we test both 430N/A * solid and XOR rendering here, but this testcase is a bit simpler and 430N/A * more appropriate for quick OGL testing. This test is also useful for 430N/A * comparing quality between our X11/GDI and software pipelines. 430N/A // Grab the screen region 430N/A // use fill() instead of fillOval(), since the former is more 430N/A // likely to be consistent with our software loops when the 430N/A // OGL pipeline cannot be enabled 430N/A // use draw() instead of drawOval(), since the former is more 430N/A // likely to be consistent with our software loops when the 430N/A // OGL pipeline cannot be enabled 430N/A // on the left side, render the shapes in solid mode 430N/A // on the right side, render the shapes in XOR mode 430N/A // Wait until the component's been painted 430N/A // REMIND: We will allow this test to pass silently on Windows 430N/A // (when OGL is not enabled) until we fix the GDI pipeline so that 430N/A // 6322554). This check should be removed when 6322554 is fixed. 430N/A "test considered PASSED");
430N/A // render to a VI instead of the screen 430N/A // Create reference image 430N/A for (
int y =
0; y < h; y++) {
430N/A for (
int x =
0; x < w; x++) {