build image cache in cpp dispEngine
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user