Package sun.awt.image

Examples of sun.awt.image.CachingSurfaceManager


            // Getting the DataBuffer for an image (as it's done below) defeats
            // possible future acceleration.
            // Calling setLocalAccelerationEnabled on that image's surface
            // manager re-enables it.
            boolean accelerated = false;
            CachingSurfaceManager csm = null;
            SurfaceManager sm = SurfaceManager.getManager(image);
            if (sm instanceof CachingSurfaceManager) {
                csm = (CachingSurfaceManager)sm;
                accelerated = csm.isLocalAccelerationEnabled();
            }

            DataBufferInt data = (DataBufferInt)image.getRaster().getDataBuffer();
            synchronized(sun.awt.UNIXToolkit.GTK_LOCK) {
                native_get_image(data.getData(), size.width, size.height,
                                 widgetType, state);
            }
           
            if (csm != null && accelerated != csm.isLocalAccelerationEnabled()) {
                csm.setLocalAccelerationEnabled(accelerated);
                csm.rasterChanged();
            }
           
            return images[state] = image;
        }
       
View Full Code Here

TOP

Related Classes of sun.awt.image.CachingSurfaceManager

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.