本文整理汇总了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();
}
}
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}