From 565e48de649d3d14e6b82012b6aa2e3819a3c82c Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 4 Mar 2020 14:09:45 +0200 Subject: Improved BitmapCliper. Implemented auto throw when max differences reached. Implemented fallback TurboJpeg encoder. Fixed issue with UpdateMachine.xml script removing DISPENSERS before IDS_PACKS. Added GlobalHost.Configuration.MaxIncomingWebSocketMessageSize for WebSockets support for large messages on SignalR. --- .../Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Software/Visual_Studio/Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs') diff --git a/Software/Visual_Studio/Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs b/Software/Visual_Studio/Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs index 7f6dd9ccf..338318177 100644 --- a/Software/Visual_Studio/Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs +++ b/Software/Visual_Studio/Tango.RemoteDesktop/Comparers/VectorBitmapComparer.cs @@ -16,6 +16,12 @@ namespace Tango.RemoteDesktop.Comparers /// public class VectorBitmapComparer : IBitmapComparer { + /// + /// When max number of differences reached, the comparer will immediately return the current difference frame. + /// This should enforce the screen capture engine to report 'No Difference Available'. + /// + public long? MaxDifferencesThrow { get; set; } + /// /// Creates the difference as . /// @@ -105,6 +111,13 @@ namespace Tango.RemoteDesktop.Comparers }); count++; + + if (MaxDifferencesThrow != null && count > MaxDifferencesThrow.Value) + { + previousBitmap.UnlockBits(data1); + currentBitmap.UnlockBits(data2); + throw new MaxDifferencesReachedException(); + } } } -- cgit v1.3.1