C# Class System.Windows.Interop.D3DImage

Inheritance: System.Windows.Media.ImageSource, MS.Internal.IAppDomainShutdownListener
显示文件 Open project: mahasak/dotnet452 Class Usage Examples

Public Properties

Property Type Description
IsFrontBufferAvailableProperty DependencyProperty

Public Methods

Method Description
Clone ( ) : D3DImage

Shadows inherited Clone() with a strongly typed version for convenience.

CloneCurrentValue ( ) : D3DImage

Shadows inherited CloneCurrentValue() with a strongly typed version for convenience.

Lock ( ) : void

Locks the D3DImage While locked you can call AddDirtyRect, SetBackBuffer, and Unlock. You can also write to your back buffer. You should not write to the back buffer without being locked.

SetBackBuffer ( D3DResourceType backBufferType, IntPtr backBuffer ) : void

Sets a back buffer source for this D3DImage. See the 2nd overload for details.

TryLock ( Duration timeout ) : bool

Trys to lock the D3DImage but gives up once duration expires. Returns true if the lock was obtained. See Lock for more details.

Unlock ( ) : void

Unlocks the D3DImage Can only be called while locked. If you have dirtied the image with AddDirtyRect, Unlocking will trigger us to copy the dirty regions from the back buffer to the front buffer. While this is taking place, Lock will block. To avoid locking indefinitely, use TryLock.

Protected Methods

Method Description
CloneCore ( Freezable sourceFreezable ) : void

Clone overrides Not sealed to allow subclasses to clone their private data

CloneCurrentValueCore ( Freezable sourceFreezable ) : void
CreateInstanceCore ( ) : Freezable

Implementation of Freezable.CreateInstanceCore.

FreezeCore ( bool isChecking ) : bool

Freezing is not allowed because the user will always have to make changes to the object based upon IsFrontBufferAvailable. We could consider SetBackBuffer to not count as a "change" but any thread could call it and that would violate our synchronization assumptions. Sealed to prevent subclasses from modifying the correct behavior.

GetAsFrozenCore ( Freezable sourceFreezable ) : void
GetCurrentValueAsFrozenCore ( Freezable sourceFreezable ) : void

Private Methods

Method Description
AddDirtyRect ( Int32Rect dirtyRect ) : void
AddRefOnChannelCore ( DUCE.Channel channel ) : DUCE.ResourceHandle
Callback ( bool isFrontBufferAvailable, uint version ) : void

*** WARNING ***: This runs on the composition thread! What the composition thread calls when it wants to update D3DImage about front buffer state. It may be called multiple times with the same value. Since we're on a different thread we can't touch this, so queue a dispatcher operation.

CloneCommon ( Freezable sourceFreezable ) : void
CopyBackBuffer ( ) : BitmapSource
D3DImage ( ) : MS.Internal
D3DImage ( double dpiX, double dpiY ) : MS.Internal
GetChannelCore ( int index ) : DUCE.Channel
GetChannelCountCore ( ) : int
GetHandleCore ( DUCE.Channel channel ) : DUCE.ResourceHandle
IAppDomainShutdownListener ( ) : void
IsFrontBufferAvailablePropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void
LockImpl ( Duration timeout ) : bool

Lock implementation shared by Lock and TryLock

ReleaseOnChannelCore ( DUCE.Channel channel ) : void
SendPresent ( object sender, EventArgs args ) : void
SetBackBuffer ( D3DResourceType backBufferType, IntPtr backBuffer, bool enableSoftwareFallback ) : void
SetIsFrontBufferAvailable ( object isAvailableVersionPair ) : object

The DispatcherOperation corresponding to the composition thread callback. If the back buffer version matches the current version, update the front buffer status.

SubscribeToCommittingBatch ( ) : void
UnsubscribeFromCommittingBatch ( ) : void
UpdateResource ( DUCE.Channel channel, bool skipOnChannelCheck ) : void

Method Details

Clone() public method

Shadows inherited Clone() with a strongly typed version for convenience.
public Clone ( ) : D3DImage
return D3DImage

CloneCore() protected method

Clone overrides Not sealed to allow subclasses to clone their private data
protected CloneCore ( Freezable sourceFreezable ) : void
sourceFreezable Freezable
return void

CloneCurrentValue() public method

Shadows inherited CloneCurrentValue() with a strongly typed version for convenience.
public CloneCurrentValue ( ) : D3DImage
return D3DImage

CloneCurrentValueCore() protected method

protected CloneCurrentValueCore ( Freezable sourceFreezable ) : void
sourceFreezable Freezable
return void

CreateInstanceCore() protected method

Implementation of Freezable.CreateInstanceCore.
protected CreateInstanceCore ( ) : Freezable
return Freezable

FreezeCore() protected final method

Freezing is not allowed because the user will always have to make changes to the object based upon IsFrontBufferAvailable. We could consider SetBackBuffer to not count as a "change" but any thread could call it and that would violate our synchronization assumptions. Sealed to prevent subclasses from modifying the correct behavior.
protected final FreezeCore ( bool isChecking ) : bool
isChecking bool
return bool

GetAsFrozenCore() protected method

protected GetAsFrozenCore ( Freezable sourceFreezable ) : void
sourceFreezable Freezable
return void

GetCurrentValueAsFrozenCore() protected method

protected GetCurrentValueAsFrozenCore ( Freezable sourceFreezable ) : void
sourceFreezable Freezable
return void

Lock() public method

Locks the D3DImage While locked you can call AddDirtyRect, SetBackBuffer, and Unlock. You can also write to your back buffer. You should not write to the back buffer without being locked.
public Lock ( ) : void
return void

SetBackBuffer() public method

Sets a back buffer source for this D3DImage. See the 2nd overload for details.
public SetBackBuffer ( D3DResourceType backBufferType, IntPtr backBuffer ) : void
backBufferType D3DResourceType
backBuffer IntPtr
return void

TryLock() public method

Trys to lock the D3DImage but gives up once duration expires. Returns true if the lock was obtained. See Lock for more details.
public TryLock ( Duration timeout ) : bool
timeout Duration
return bool

Unlock() public method

Unlocks the D3DImage Can only be called while locked. If you have dirtied the image with AddDirtyRect, Unlocking will trigger us to copy the dirty regions from the back buffer to the front buffer. While this is taking place, Lock will block. To avoid locking indefinitely, use TryLock.
public Unlock ( ) : void
return void

Property Details

IsFrontBufferAvailableProperty public_oe static_oe property

public static DependencyProperty IsFrontBufferAvailableProperty
return DependencyProperty