SHA256
Replace Throttle Busy Wait With Dequeue Signal And Byte Limit
This commit is contained in:
3 files changed
+59
-6
No files matched your search
@@ -73,6 +73,16 @@ namespace ADOFAIRenderer.Util
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Bytes of the readback buffer of one frame: Width x Height x 3 / 2 when the GPU conversion to NV12 / YUV420P
|
||||
/// is used, Width x Height x 4 (RGBA) otherwise. The same size as ReadbackRequestState.Setup uses.
|
||||
/// </summary>
|
||||
public long GetFrameBufferBytes(int width, int height)
|
||||
{
|
||||
var pixels = (long)width * height;
|
||||
return _useGPUConversion ? pixels * 3 / 2 : pixels * 4;
|
||||
}
|
||||
|
||||
public void RequestFrameCapture(Texture texture, long currentFrame)
|
||||
{
|
||||
if (!RenderManager.IsCapturingActive) return;
|
||||
|
||||
Reference in new issue
Block a user