Skip to content

Commit

Permalink
fix(RenderTargetBitmap): Compilation error after merge PR #8612
Browse files Browse the repository at this point in the history
  • Loading branch information
workgroupengineering committed Jul 8, 2022
1 parent 7b202db commit 24bc2cd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Uno.UI/UI/Xaml/Media/Imaging/RenderTargetBitmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ public IAsyncAction RenderAsync(UIElement? element, int scaledWidth, int scaledH
try
{
UIElement elementToRender = element
?? XamlRoot.Current.Content
?? throw new global::System.NullReferenceException("Invalid XamlRoot Content.");

?? Window.Current.Content;
(_bufferSize, PixelWidth, PixelHeight) = RenderAsBgra8_Premul(elementToRender, ref _buffer, new Size(scaledWidth, scaledHeight));
#if __WASM__ || __SKIA__
InvalidateSource();
Expand All @@ -111,8 +109,7 @@ public IAsyncAction RenderAsync(UIElement? element)
try
{
UIElement elementToRender = element
?? XamlRoot.Current.Content
?? throw new global::System.NullReferenceException("Invalid XamlRoot Content.");
?? Window.Current.Content;

(_bufferSize, PixelWidth, PixelHeight) = RenderAsBgra8_Premul(elementToRender, ref _buffer);
#if __WASM__ || __SKIA__
Expand Down

0 comments on commit 24bc2cd

Please sign in to comment.