Skip to content

Commit

Permalink
Tweak things...
Browse files Browse the repository at this point in the history
  • Loading branch information
mattleibow committed Apr 27, 2020
1 parent c7162db commit e034226
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ protected override void OnRenderFrame(Rect rect)
lastPaintEventArgs = null;
}

// start drawing
// create or recreate the event args
if (!reusePaintEventArgsInstance || lastPaintEventArgs == null)
lastPaintEventArgs = new SKPaintGLSurfaceEventArgs(surface, renderTarget, surfaceOrigin, colorType, glInfo);

// reset the draw matrix just in case
canvas.RestoreToCount(1);

// start drawing
OnPaintSurface(lastPaintEventArgs);
canvas.RestoreToCount(0);

// update the control
canvas.Flush();
Expand Down

0 comments on commit e034226

Please sign in to comment.