build image cache in cpp dispEngine

This commit is contained in:
2025-08-26 15:29:08 +08:00
parent 5ca836538d
commit e6db6cfa08
2 changed files with 1 additions and 7 deletions
-6
View File
@@ -253,7 +253,6 @@ namespace Hi.Wpf.Disp
#endregion
#region DispEngine_Rendering
private byte[] PreImageBgra { get; set; }
/// <summary>
/// Handles the buffer swapped event from DispEngine
/// </summary>
@@ -262,12 +261,7 @@ namespace Hi.Wpf.Disp
if (data == null)
return;
//since the treatment is different from Razor version,
//the image checking mechanism cannot be set in DispEngine.
Span<byte> bgra = new Span<byte>(data, w * h * 4);
if (PreImageBgra != null && bgra.SequenceEqual(PreImageBgra))
return;
PreImageBgra = bgra.ToArray();
// Copy pixel data from DispEngine
int n = w * h * 4;