Flickering issue with VirtualSurfaceImageSource RRS feed

  • Question

  • I'm considering using VirtualSurfaceImageSource 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 VirtualSurfaceImageSource (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.


    Tuesday, May 15, 2012 3:41 PM


  • 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