Package sun.java2d

Examples of sun.java2d.SurfaceData


        // transform, or shape clip
        if ((srcWidthFlip == dstWidthFlip)                  &&
            (srcHeightFlip == dstHeightFlip)                &&
            (sg.transformState < sg.TRANSFORM_GENERIC))
        {
            SurfaceData sData =
                SurfaceData.getSurfaceDataFromImage(img, sg.surfaceData,
                                                    sg.imageComp, bgColor, true);
            if (!isBgOperation(sData, bgColor)) {
                // only accelerate scale if there is no bg color involved
                SurfaceType src = sData.getSurfaceType();
                SurfaceType dst = sg.surfaceData.getSurfaceType();
                if (scaleSurfaceData(sg, sData, sg.surfaceData, src, dst,
                                     dstX, dstY, srcX, srcY,
                                     dstW, dstH,
                                     srcW, srcH, null))
View Full Code Here


        pReshapePrivate(x, y, width, height);

        if ((width != oldWidth) || (height != oldHeight))
        {
            SurfaceData oldData = surfaceData;
            if (oldData != null) {
                surfaceData = graphicsConfig.createSurfaceData(this);
                oldData.invalidate();
            }
            oldWidth = width;
            oldHeight = height;
        }
        validateSurface(width, height);
View Full Code Here

        setSizeHints(flags, x, y, width, height);
    }

      void validateSurface() {
        if ((width != oldWidth) || (height != oldHeight)) {
            SurfaceData oldData = surfaceData;
            if (oldData != null) {
                surfaceData = graphicsConfig.createSurfaceData(this);
                oldData.invalidate();
            }
            oldWidth = width;
            oldHeight = height;
        }
    }
View Full Code Here

    public SurfaceData getSurfaceData() {
        return surfaceData;
    }

    public void dispose() {
        SurfaceData oldData = surfaceData;
        surfaceData = null;
        if (oldData != null) {
            oldData.invalidate();
        }
        XToolkit.targetDisposedPeer(target, this);
        destroy();
    }
View Full Code Here

    /**
     * Create a pixmap-based SurfaceData object
     */
    protected SurfaceData initAcceleratedSurface() {
        SurfaceData sData;

        try {
            X11GraphicsConfig gc = (X11GraphicsConfig)vImg.getGraphicsConfig();
            ColorModel cm = gc.getColorModel();
            long drawable = 0;
View Full Code Here

            synchronized(this) {
                if (pData == 0) {
                    return;
                }
                numBackBuffers = newNumBackBuffers;
                SurfaceData oldData = surfaceData;
                Win32GraphicsConfig gc =
                    (Win32GraphicsConfig)getGraphicsConfiguration();
                surfaceData = gc.createSurfaceData(this, numBackBuffers);
                if (oldData != null) {
                    oldData.invalidate();
                    // null out the old data to make it collected faster
                    oldData = null;
                }

                if (backBuffer != null) {
View Full Code Here

    // fallback default font object
    final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);

    public Graphics getGraphics() {
        SurfaceData surfaceData = this.surfaceData;
        if (!isDisposed() && surfaceData != null) {
            /* Fix for bug 4746122. Color and Font shouldn't be null */
            Color bgColor = background;
            if (bgColor == null) {
                bgColor = SystemColor.window;
View Full Code Here

        return WFontMetrics.getFontMetrics(font);
    }

    private synchronized native void _dispose();
    protected void disposeImpl() {
        SurfaceData oldData = surfaceData;
        surfaceData = null;
        oldData.invalidate();
        // remove from updater before calling targetDisposedPeer
        WToolkit.targetDisposedPeer(target, this);
        _dispose();
    }
View Full Code Here

        } 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 {
View Full Code Here

    /**
     * Create a vram-based SurfaceData object
     */
    public sun.java2d.SurfaceData initAcceleratedSurface() {
        SurfaceData sData;

        try {
            sData = createAccelSurface();
        } catch (sun.java2d.InvalidPipeException e) {
            // Problems during creation.  Don't propagate the exception, just
View Full Code Here

TOP

Related Classes of sun.java2d.SurfaceData

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.