Answered by:
Flickering issue with VirtualSurfaceImageSource

Question
-
I'm considering using VirtualSurfaceI
mageSource in my application, and I've implemented something similar to the Direct2D magazine app sample, but I've run into a problem which occurs when the virtual surface is several times larger than the display area. Basically, I have a horizontally scrolling ScrollViewer which contains an Image. The source of the image is a wide VirtualSurfaceI
mageSource (at least ~10000 x 500 px). The width of the ScrollViewer is 1200 px. When I scroll the ScrollViewer with touch panning, the image sometimes flicker - a part of the image disappears and then it's redrawn. This usually happens when the inertial scrolling stops. The image is already fully drawn when it scrolls into the view, but for some reason it's cleared and IVirtualSurfaceUpdatesCallbackNative::UpdatesNeeded() is called.
Any ideas why this is happening?
I've also noticed that the flickering doesn't occur if the image width is ~5000 px or less.
If you want to reproduce this, start from the Direct2D magazine app sample and add more text in the Sample.story, under the <text name="butterfly
-body"> tag - just copy the existing text 10 times or so. Try scrolling the butterfly page in both directions and with varying speed, and you should see what appears to be the same problem. Thanks
/DankoTuesday, May 15, 2012 3:41 PM
Answers
-
The scrolling seems to work fine in Windows 8 Release Preview, so it was probably just a bug in the Consumer Preview.
Thanks for fixing it!
- Marked as answer by Danko D Friday, June 1, 2012 12:45 PM
Friday, June 1, 2012 12:45 PM
All replies
-
Hello,
You can try the code in this thread, maybe it can help you
Best regards,
Jesse
Jesse Jiang [MSFT]
MSDN Community Support | Feedback to us
Wednesday, May 16, 2012 8:29 AM -
Thanks Jesse,
My application is doing the same things as the code in that thread, so that's not the problem.
I've uploaded a video of the application running in the simulator, http://youtu.be/9ShSMgWnZvE. Watch what happens when the scrolling stops (at 0:02, 0:17, etc...)
Regards,
/DankoWednesday, May 16, 2012 9:45 AM -
The scrolling seems to work fine in Windows 8 Release Preview, so it was probably just a bug in the Consumer Preview.
Thanks for fixing it!
- Marked as answer by Danko D Friday, June 1, 2012 12:45 PM
Friday, June 1, 2012 12:45 PM