jdk/test/sun/java2d/DirectX/IAEforEmptyFrameTest/IAEforEmptyFrameTest.java
author tdv
Fri, 18 Jul 2008 10:48:44 -0700
changeset 887 0aab8d3fa11a
child 5506 202f599c92aa
permissions -rw-r--r--
6725214: D3D: forward-port the new pipeline from 6u10 Summary: Forward port of the new Direct3D 9 rendering pipeline from 6u10. Also includes fixes for 6690659 6689025 6658398 6596234. Reviewed-by: campbell, prr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
887
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     1
/*
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     2
 * Copyright 2007-2008 Sun Microsystems, Inc.  All Rights Reserved.
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     4
 *
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     7
 * published by the Free Software Foundation.
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     8
 *
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    13
 * accompanied this code).
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    14
 *
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    18
 *
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    21
 * have any questions.
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    22
 */
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    23
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    24
/*
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    25
 * @test
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    26
 * @bug 6668439
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    27
 * @summary Verifies that no exceptions are thrown when frame is resized to 0x0
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    28
 * @author Dmitri.Trembovetski@sun.com: area=Graphics
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    29
 * @run main/othervm IAEforEmptyFrameTest
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    30
 * @run main/othervm -Dsun.java2d.d3d=false IAEforEmptyFrameTest
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    31
 */
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    32
import javax.swing.JFrame;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    33
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    34
public class IAEforEmptyFrameTest {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    35
    public static void main(String[] args) {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    36
        JFrame f = null;
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    37
        try {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    38
            f = new JFrame("IAEforEmptyFrameTest");
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    39
            f.setUndecorated(true);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    40
            f.setBounds(100, 100, 320, 240);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    41
            f.setVisible(true);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    42
            try { Thread.sleep(1000); } catch (Exception z) {}
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    43
            f.setBounds(0, 0, 0, 0);
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    44
            try { Thread.sleep(1000); } catch (Exception z) {}
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    45
            f.dispose();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    46
        } finally {
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    47
            f.dispose();
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    48
        };
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    49
    }
0aab8d3fa11a 6725214: D3D: forward-port the new pipeline from 6u10
tdv
parents:
diff changeset
    50
}