build image cache in cpp dispEngine

This commit is contained in:
unknown 2025-08-26 15:29:08 +08:00
parent 5ca836538d
commit e6db6cfa08
2 changed files with 1 additions and 7 deletions

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;

View File

@ -12,7 +12,7 @@
HiAPI wpf canvas.
</Description>
<Configurations>Debug;Release</Configurations>
<VersionBuild>24</VersionBuild>
<VersionBuild>25</VersionBuild>
<VersionPrefix>3.1.$(VersionBuild)</VersionPrefix>
<PackageTags>HiAPI</PackageTags>
<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>