//----------------
#endregion
+ /// <summary>
+ /// 現在時刻から、DirectComposition Engine による次のフレーム表示時刻までの間隔[秒]を返す。
+ /// </summary>
+ /// <remarks>
+ /// この時刻の仕様と使い方については、以下を参照。
+ /// Architecture and components - MSDN
+ /// https://msdn.microsoft.com/en-us/library/windows/desktop/hh437350.aspx
+ /// </remarks>
+ public double 次のDComp表示までの残り時間sec
+ {
+ get
+ {
+ var fs = this.DCompDevice.FrameStatistics;
+ return ( fs.NextEstimatedFrameTime - fs.CurrentTime ) / fs.TimeFrequency;
+ }
+ }
+
/// <summary>
/// 初期化処理。
this._スワップチェーンに依存するグラフィックリソースを作成する( d3dDevice );
}
-#if DEBUG
- public void DCompDebug_CurrentTimeを保存する()
- {
- this._Currenttime = this.DCompDevice.FrameStatistics.CurrentTime;
- }
- public double DCompDebug_経過時間msを返す()
- {
- return 1000.0 * FDK.カウンタ.QPCTimer.生カウント相対値を秒へ変換して返す( this.DCompDevice.FrameStatistics.CurrentTime - this._Currenttime );
- }
- public void DCompDebug_16ms以上かかってたら画面をフラッシュする()
- {
- if( this.DCompDebug_経過時間msを返す() > 16.6 )
- {
- this.D2DDeviceContext.BeginDraw();
- this.D2DDeviceContext.Clear( Color4.White );
- this.D2DDeviceContext.EndDraw();
- }
- }
-
- private long _Currenttime = 0;
-#endif
-
/// <summary>
/// バックバッファに対応するウィンドウのハンドル。
/// コンストラクタで指定する。