Package sun.java2d.pipe.hw

Examples of sun.java2d.pipe.hw.AccelSurface


                    throw new RuntimeException("Failed: created VI is not " +
                                               "DestSurfaceProvider");
                }
                Surface s = ((DestSurfaceProvider) vi).getDestSurface();
                if (s instanceof AccelSurface) {
                    AccelSurface as = (AccelSurface) s;
                    printSurface(as);
                    if (as.getType() != type) {
                        throw new RuntimeException("Failed: returned VI is" +
                                " of incorrect type: " + as.getType() +
                                " requested type=" + type);
                    } else {
                        System.out.printf("Passed: VI of type %d was " +
                                "created for cap=%d\n", type, cap);
                    }
                    if (as.getType() == TEXTURE) {
                        boolean ex = false;
                        try {
                            Graphics g = vi.getGraphics();
                            g.dispose();
                        } catch (UnsupportedOperationException e) {
View Full Code Here


        }
    }

    private static void printSurface(Surface s) {
        if (s instanceof AccelSurface) {
            final AccelSurface surface = (AccelSurface) s;
            System.out.println(" Accel Surface: ");
            System.out.println("  type=" + surface.getType());
            System.out.println("  bounds=" + surface.getBounds());
            System.out.println("  nativeBounds=" + surface.getNativeBounds());
            System.out.println("  isSurfaceLost=" + surface.isSurfaceLost());
            System.out.println("  isValid=" + surface.isValid());
            RenderQueue rq = surface.getContext().getRenderQueue();
            rq.lock();
            try {
                rq.flushAndInvokeNow(new Runnable() {
                    public void run() {
                        System.out.printf("  getNativeResource(TEXTURE)=0x%x\n",
                            surface.getNativeResource(TEXTURE));
                        System.out.printf("  getNativeResource(RT_TEXTURE)=0x%x\n",
                            surface.getNativeResource(RT_TEXTURE));
                        System.out.printf("  getNativeResource(RT_PLAIN)=0x%x\n",
                            surface.getNativeResource(RT_PLAIN));
                        System.out.printf(
                            "  getNativeResource(FLIP_BACKBUFFER)=0x%x\n",
                            surface.getNativeResource(FLIP_BACKBUFFER));

                        testD3DDeviceResourceField(surface);

                        testInvalidType(surface, -1);
                        testInvalidType(surface, -150);
View Full Code Here

                    throw new RuntimeException("Failed: created VI is not " +
                                               "DestSurfaceProvider");
                }
                Surface s = ((DestSurfaceProvider) vi).getDestSurface();
                if (s instanceof AccelSurface) {
                    AccelSurface as = (AccelSurface) s;
                    printSurface(as);
                    if (as.getType() != type) {
                        throw new RuntimeException("Failed: returned VI is" +
                                " of incorrect type: " + as.getType() +
                                " requested type=" + type);
                    } else {
                        System.out.printf("Passed: VI of type %d was " +
                                "created for cap=%d\n", type, cap);
                    }
                    if (as.getType() == TEXTURE) {
                        boolean ex = false;
                        try {
                            Graphics g = vi.getGraphics();
                            g.dispose();
                        } catch (UnsupportedOperationException e) {
View Full Code Here

TOP

Related Classes of sun.java2d.pipe.hw.AccelSurface

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.