当前位置: 首页>>代码示例>>Java>>正文


Java ScreenUpdateManager类代码示例

本文整理汇总了Java中sun.java2d.ScreenUpdateManager的典型用法代码示例。如果您正苦于以下问题:Java ScreenUpdateManager类的具体用法?Java ScreenUpdateManager怎么用?Java ScreenUpdateManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ScreenUpdateManager类属于sun.java2d包,在下文中一共展示了ScreenUpdateManager类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: sync

import sun.java2d.ScreenUpdateManager; //导入依赖的package包/类
/**
 * Flushes the single D3DRenderQueue instance synchronously.  If an
 * D3DRenderQueue has not yet been instantiated, this method is a no-op.
 * This method is useful in the case of Toolkit.sync(), in which we want
 * to flush the D3D pipeline, but only if the D3D pipeline is currently
 * enabled.  Since this class has few external dependencies, callers need
 * not be concerned that calling this method will trigger initialization
 * of the D3D pipeline and related classes.
 */
public static void sync() {
    if (theInstance != null) {
        // need to make sure any/all screen surfaces are presented prior
        // to completing the sync operation
        D3DScreenUpdateManager mgr =
            (D3DScreenUpdateManager)ScreenUpdateManager.getInstance();
        mgr.runUpdateNow();

        theInstance.lock();
        try {
            theInstance.ensureCapacity(4);
            theInstance.getBuffer().putInt(SYNC);
            theInstance.flushNow();
        } finally {
            theInstance.unlock();
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:28,代码来源:D3DRenderQueue.java

示例2: disableAccelerationForSurface

import sun.java2d.ScreenUpdateManager; //导入依赖的package包/类
@Override
void disableAccelerationForSurface() {
    // for on-screen surfaces we need to make sure a backup GDI surface is
    // is used until a new one is set (which may happen during a resize). We
    // don't want the screen update maanger to replace the surface right way
    // because it causes repainting issues in Swing, so we invalidate it,
    // this will prevent SUM from issuing a replaceSurfaceData call.
    setSurfaceLost(true);
    invalidate();
    flush();
    peer.disableAcceleration();
    ScreenUpdateManager.getInstance().dropScreenSurface(this);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:D3DSurfaceData.java

示例3: createScreenSurface

import sun.java2d.ScreenUpdateManager; //导入依赖的package包/类
public void createScreenSurface(boolean isResize)
{
    Win32GraphicsConfig gc = (Win32GraphicsConfig)getGraphicsConfiguration();
    ScreenUpdateManager mgr = ScreenUpdateManager.getInstance();

    surfaceData = mgr.createScreenSurface(gc, this, numBackBuffers, isResize);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:8,代码来源:WComponentPeer.java

示例4: disposeImpl

import sun.java2d.ScreenUpdateManager; //导入依赖的package包/类
@Override
protected void disposeImpl() {
    SurfaceData oldData = surfaceData;
    surfaceData = null;
    ScreenUpdateManager.getInstance().dropScreenSurface(oldData);
    oldData.invalidate();
    // remove from updater before calling targetDisposedPeer
    WToolkit.targetDisposedPeer(target, this);
    _dispose();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WComponentPeer.java

示例5: disposeImpl

import sun.java2d.ScreenUpdateManager; //导入依赖的package包/类
protected void disposeImpl() {
    SurfaceData oldData = surfaceData;
    surfaceData = null;
    ScreenUpdateManager.getInstance().dropScreenSurface(oldData);
    oldData.invalidate();
    // remove from updater before calling targetDisposedPeer
    WToolkit.targetDisposedPeer(target, this);
    _dispose();
}
 
开发者ID:openjdk,项目名称:jdk7-jdk,代码行数:10,代码来源:WComponentPeer.java


注:本文中的sun.java2d.ScreenUpdateManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。