You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using our SKGLSurfaceView to render a map that can be panned smoothly.
The issue we're having here is what is rendered is a blending of the previous 2-3 frames! Nothing we do seems to be able to stop this. I even tried "RenderMode = WhenDirty", to see if that stopped it (it did not).
So as we're rendering here at 60 FPS, a simple Animation of a Circle being drawn each frame (onPaint)... and moving it from Left to Right. As you can see below, there are two copies of this circle showing at the same time. This is NOT what we want to be seeing here. This is an unwanted MotionBlur effect, essentially.
Is there any trick to make SKGLSurfaceView ONLY render the most recently drawn Canvas output?
Note, for the paint, I tried various BlendModes: Src, SrcIn, SrcOver, SrcATop. All produced the same blurred double-images.
have you tried clearing the canvas inside of PaintSurface ?
this should ensure a clean canvas for each render frame
privatevoid_sImgView_PaintSurface(objectsender,SKPaintGLSurfaceEventArgse){// this ⬇️e.Surface.Canvas.Clear(SKColors.White);SKPointpt=newSKPoint(180+_xOfs,200);_xOfs+=20;if(_xOfs>500)_xOfs=0;e.Surface.Canvas.DrawCircle(pt,77,_paint);}
@nor0x - thank you for your help. I did try that several different ways. In the end, it might help, but doesn't resolve it.
It's difficult to parse out the contributing factors of this double image, which are:
I'm taking a picture -- so shutter speed might be slow enough to capture two frames.
The screen itself has a bit of "memory too"
My eyes have memory.
Since clearing it first with White does seem to help (maybe it's the placebo effect) - It's still looking blurred to me.
I posted here, hoping to hear some advice regarding some hidden "blend mode" effect purposefully done with the SKGLSurfaceView itself -- like it was a "feature" (which for some cases, is true - you want subtle blur).
Description
We are using our SKGLSurfaceView to render a map that can be panned smoothly.
The issue we're having here is what is rendered is a blending of the previous 2-3 frames! Nothing we do seems to be able to stop this. I even tried "RenderMode = WhenDirty", to see if that stopped it (it did not).
So as we're rendering here at 60 FPS, a simple Animation of a Circle being drawn each frame (onPaint)... and moving it from Left to Right. As you can see below, there are two copies of this circle showing at the same time. This is NOT what we want to be seeing here. This is an unwanted MotionBlur effect, essentially.
Is there any trick to make SKGLSurfaceView ONLY render the most recently drawn Canvas output?
Note, for the paint, I tried various BlendModes: Src, SrcIn, SrcOver, SrcATop. All produced the same blurred double-images.
Code
Expected Behavior
Single solid-line Circle.
Actual Behavior
Two-Blurred Circles!
Version of SkiaSharp
2.88.3 (Current)
Last Known Good Version of SkiaSharp
Other (Please indicate in the description)
IDE / Editor
Visual Studio (Windows)
Platform / Operating System
Android
Platform / Operating System Version
Android 12
Devices
All of my devices.
Relevant Screenshots
It should look more like this one (but solid, not blurred):

Relevant Log Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: