Package sun.awt

Examples of sun.awt.Win32GraphicsConfig


     */

    public void createBuffers(int numBuffers, BufferCapabilities caps)
        throws AWTException
    {
        Win32GraphicsConfig gc =
            (Win32GraphicsConfig)getGraphicsConfiguration();
        gc.assertOperationSupported((Component)target, numBuffers, caps);

        // Re-create the primary surface with the new number of back buffers
        try {
            replaceSurfaceData(numBuffers - 1);
        } catch (InvalidPipeException e) {
View Full Code Here


    public synchronized void flip(BufferCapabilities.FlipContents flipAction) {
        if (backBuffer == null) {
            throw new IllegalStateException("Buffers have not been created");
        }
        Win32GraphicsConfig gc =
            (Win32GraphicsConfig)getGraphicsConfiguration();
        gc.flip(this, (Component)target, backBuffer, flipAction);
    }
View Full Code Here

    }

    protected SurfaceData createAccelSurface() {
        int transparency = vImg.getTransparency();
        ColorModel cm;
        Win32GraphicsConfig gc = (Win32GraphicsConfig) vImg.getGraphicsConfig();
        if (transparency != Transparency.TRANSLUCENT) {
            // REMIND: This will change when we accelerate bitmask VImages.
            // Currently, we can only reach here if the image is either
            // opaque or translucent
            cm = getDeviceColorModel();
        } else {
            cm = gc.getColorModel(Transparency.TRANSLUCENT);
        }

        // createData will return null if the device doesnt support d3d surfaces
        SurfaceData ret = null;
        // avoid pulling in D3D classes unless d3d is enabled on the device
        if (d3dAccelerationEnabled &&
            ((Win32GraphicsDevice)gc.getDevice()).isD3DEnabledOnDevice())
        {
            try {
                ret =
                    D3DSurfaceData.createData(vImg.getWidth(), vImg.getHeight(),
                                              D3DSurfaceData.D3D_PLAIN_SURFACE,
View Full Code Here

        acceleratedSurfaceLost();
        return super.restoreContents();
    }

    protected ColorModel getDeviceColorModel() {
        Win32GraphicsConfig gc = (Win32GraphicsConfig)vImg.getGraphicsConfig();
        return gc.getDeviceColorModel();
    }
View Full Code Here

TOP

Related Classes of sun.awt.Win32GraphicsConfig

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.