Skip to content

Commit

Permalink
fix(RenderTargetBitmap): Compilation error after merge PR unoplatform…
Browse files Browse the repository at this point in the history
  • Loading branch information
workgroupengineering committed Jul 8, 2022
1 parent 514c401 commit 0a927e1
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 0a927e1

Please sign in to comment.