APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.prism.d3d

pack-priv Class D3DResource

extends BaseGraphicsResource
Class Inheritance
Known Direct Subclasses
com.sun.prism.d3d.D3DShader, com.sun.prism.d3d.D3DSwapChain
Imports
com.sun.prism.impl.BaseGraphicsResource, .Disposer

This class provides base functionality for tracking and releasing native d3d-related resources. When a Direct3D resource (such as texture, swap chain or pixel shader) is created at the native level it is added to the list of resources (see D3DResourceManager.cc) on both native and java level. This is needed because if a d3d device is lost and needs to be reset we must release all resources created in the default pool first. We must have references to all allocated resources in order to do that. In some cases we need to release all resources (when the device needs to be released, which may happen when a monitor is added or removed). There are several different ways a resource could be disposed of: - explicit disposal (dispose() is called) - the resource is released by the resource manager at the native level, disposer record is updated to reflect that - resource became unreachable - then the disposer will eventulally call dispose() for this resource - resource is disposed of at the native level when trying to reset the device. In this case the native code will call appropriate method to mark default pool or all resources as released (the release itself will happen at the native level) - see D3DResourceManager In all these cases resource disposal happens on the same thread (the Rendering Thread). Note that some d3d-related resources are not derived from this class - like D3DTexture. This is a bit confusing. But they do use this class's disposer record (they must).

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
protected final D3DResource.D3DRecord
Inherited from com.sun.prism.impl.BaseGraphicsResource:
disposerRecord

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void

Field Detail

d3dResRecordback to summary
protected final D3DResource.D3DRecord d3dResRecord

Constructor Detail

D3DResourceback to summary
pack-priv D3DResource(D3DResource.D3DRecord disposerRecord)

Method Detail

disposeback to summary
public void dispose()

Implements abstract com.sun.prism.impl.BaseGraphicsResource.dispose.

Implements com.sun.prism.GraphicsResource.dispose.

Annotations
@Override
com.sun.prism.d3d back to summary

pack-priv Class D3DResource.D3DRecord

extends Object
implements Record
Class Inheritance
All Implemented Interfaces
com.sun.prism.impl.Disposer.Record
Known Direct Subclasses
com.sun.prism.d3d.D3DTextureData

Field Summary

Modifier and TypeField and Description
private final D3DContext
private boolean
private long

Constructor Summary

AccessConstructor and Description
pack-priv
D3DRecord(D3DContext context, long pResource)

Method Summary

Modifier and TypeMethod and Description
public void
pack-priv D3DContext
pack-priv long
pack-priv boolean
protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
private final D3DContext context
isDefaultPoolback to summary
private boolean isDefaultPool
pResourceback to summary
private long pResource

Constructor Detail

D3DRecordback to summary
pack-priv D3DRecord(D3DContext context, long pResource)

Method Detail

disposeback to summary
public void dispose()

Implements com.sun.prism.impl.Disposer.Record.dispose.

Annotations
@Override
getContextback to summary
pack-priv D3DContext getContext()
getResourceback to summary
pack-priv long getResource()
isDefaultPoolback to summary
pack-priv boolean isDefaultPool()
markDisposedback to summary
protected void markDisposed()