本文整理汇总了Java中sun.java2d.Disposer.addRecord方法的典型用法代码示例。如果您正苦于以下问题:Java Disposer.addRecord方法的具体用法?Java Disposer.addRecord怎么用?Java Disposer.addRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.java2d.Disposer
的用法示例。
在下文中一共展示了Disposer.addRecord方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt,
long configInfo, int maxTextureSize,
ContextCapabilities oglCaps) {
super(device);
this.pixfmt = pixfmt;
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
this.maxTextureSize = maxTextureSize;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
}
示例2: X11GraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
protected X11GraphicsConfig(X11GraphicsDevice device,
int visualnum, int depth,
int colormap, boolean doubleBuffer)
{
this.screen = device;
this.visual = visualnum;
this.doubleBuffer = doubleBuffer;
this.depth = depth;
this.colormap = colormap;
init (visualnum, screen.getScreen());
// add a record to the Disposer so that we destroy the native
// AwtGraphicsConfigData when this object goes away (i.e. after a
// display change event)
long x11CfgData = getAData();
Disposer.addRecord(disposerReferent,
new X11GCDisposerRecord(x11CfgData));
}
示例3: main
import sun.java2d.Disposer; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
Robot r = new Robot();
for (int i = 0; i < 100; i++) {
Frame f = new Frame();
f.pack();
f.dispose();
}
r.waitForIdle();
Disposer.addRecord(new Object(), () -> disposerPhantomComplete = true);
while (!disposerPhantomComplete) {
Util.generateOOME();
}
Vector<WeakReference<Window>> windowList =
(Vector<WeakReference<Window>>) AppContext.getAppContext().get(Window.class);
if (windowList != null && !windowList.isEmpty()) {
throw new RuntimeException("Test FAILED: Window list is not empty: " + windowList.size());
}
System.out.println("Test PASSED");
}
示例4: CGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt,
long configInfo, int maxTextureSize,
ContextCapabilities oglCaps) {
super(device);
this.pixfmt = pixfmt;
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
this.maxTextureSize = maxTextureSize;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
refPConfigInfo(pConfigInfo);
// add a record to the Disposer so that we destroy the native
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
}
示例5: CGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
protected CGLGraphicsConfig(CGraphicsDevice device, int pixfmt,
long configInfo, ContextCapabilities oglCaps)
{
super(device);
this.pixfmt = pixfmt;
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
// 7200762: Workaround a deadlock by caching the value
// A fix for JDK 8 will remove the workaround
this.cachedMaxTextureSize = _getMaxTextureSize();
}
示例6: WGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum,
long configInfo, ContextCapabilities oglCaps)
{
super(device, visualnum);
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// WGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new WGLGCDisposerRecord(pConfigInfo,
device.getScreen()));
}
示例7: WGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum,
long configInfo, ContextCapabilities oglCaps)
{
super(device, visualnum);
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// WGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new WGLGCDisposerRecord(pConfigInfo));
}
示例8: WGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
@SuppressWarnings("deprecation")
protected WGLGraphicsConfig(Win32GraphicsDevice device, int visualnum,
long configInfo, ContextCapabilities oglCaps)
{
super(device, visualnum);
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// WGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new WGLGCDisposerRecord(pConfigInfo,
device.getScreen()));
}
示例9: ownedInit
import sun.java2d.Disposer; //导入方法依赖的package包/类
private void ownedInit(Window owner) {
this.parent = owner;
if (owner != null) {
owner.addOwnedWindow(weakThis);
}
// Fix for 6758673: this call is moved here from init(gc), because
// WindowDisposerRecord requires a proper value of parent field.
Disposer.addRecord(anchor, new WindowDisposerRecord(appContext, this));
}
示例10: CGLGraphicsConfig
import sun.java2d.Disposer; //导入方法依赖的package包/类
private CGLGraphicsConfig(CGraphicsDevice device, int pixfmt,
long configInfo, ContextCapabilities oglCaps)
{
super(device);
this.pixfmt = pixfmt;
this.pConfigInfo = configInfo;
this.oglCaps = oglCaps;
context = new OGLContext(OGLRenderQueue.getInstance(), this);
// add a record to the Disposer so that we destroy the native
// CGLGraphicsConfigInfo data when this object goes away
Disposer.addRecord(disposerReferent,
new CGLGCDisposerRecord(pConfigInfo));
}
示例11: JPEGImageReader
import sun.java2d.Disposer; //导入方法依赖的package包/类
public JPEGImageReader(ImageReaderSpi originator) {
super(originator);
structPointer = initJPEGImageReader();
disposerRecord = new JPEGReaderDisposerRecord(structPointer);
Disposer.addRecord(disposerReferent, disposerRecord);
}
示例12: JPEGImageWriter
import sun.java2d.Disposer; //导入方法依赖的package包/类
public JPEGImageWriter(ImageWriterSpi originator) {
super(originator);
structPointer = initJPEGImageWriter();
disposerRecord = new JPEGWriterDisposerRecord(structPointer);
Disposer.addRecord(disposerReferent, disposerRecord);
}
示例13: WPrinterJob
import sun.java2d.Disposer; //导入方法依赖的package包/类
public WPrinterJob()
{
Disposer.addRecord(disposerReferent,
handleRecord = new HandleRecord());
initAttributeMembers();
}