Skip to content

Commit

Permalink
[NUI.Devel.Tests] Fix mis-implements for NativeImageSource TCT
Browse files Browse the repository at this point in the history
- We MUST call ReleaseBuffer after call AcquireBuffer
- We MUST call AcquireBUffer before call ReleaseBuffer

If not, exception or deadlock will occured.

Signed-off-by: Eunki, Hong <[email protected]>
  • Loading branch information
Eunki, Hong committed Jan 7, 2025
1 parent 936628d commit a415667
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public void NativeImageSourceAcquireBuffer()
tlog.Debug(tag, e.Message.ToString());
Assert.Fail("Caught Exception : Failed!");
}
testingTarget.ReleaseBuffer();

testingTarget.Dispose();
tlog.Debug(tag, $"NativeImageSourceAcquireBuffer END (OK)");
Expand All @@ -114,6 +115,7 @@ public void NativeImageSourceReleaseBuffer()
Assert.IsNotNull(testingTarget, "Can't create success object NativeImageSource");
Assert.IsInstanceOf<NativeImageSource>(testingTarget, "Should be an instance of NativeImageSource type.");

testingTarget.AcquireBuffer(ref width, ref height, ref stride);
try
{
testingTarget.ReleaseBuffer();
Expand Down

0 comments on commit a415667

Please sign in to comment.