Win2D 0.0.13 – geometry, layers, and custom fonts

Win2D version 0.0.13 is now available on NuGet and Github.

New this sprint:

  • Resizing a CanvasAnimatedControl now triggers redraw even if the control is paused


Comments (6)

  1. Andriy says:

    Could you say a couple of words about concurrent usage of the graphical device on a resource-limited unit like phone? In particular, if I use Win2D to heavily render images (say, map tiles) on a background thread, how does this affect the XAML UI rendering?

    (Unfortunately, software device (WARP) is still not available on WP, otherwise the question wouldn't arise).

  2. Andriy, my main advice is just to try it and see what you get!   Preparing data on a background thread is a common pattern in Phone rendering (many of the built-in apps do this) but if you saturate the GPU with strenuous work, that will obviously affect UI responsiveness no matter what thread the rendering tasks are submitted from.

    In some (rare) cases, IDXGIDevice::SetGPUThreadPriority may be useful to more finely control the scheduling across multiple devices.  That's not part of the Win2D API, but you can access it by interopping from Win2D to native DXGI.

  3. Andriy says:

    Shawn Hargreaves, thanks for your reply!

    I still hope WP team will add WARP support at least in Windows 10…

  4. Alex B. says:

    I was wondering what's the proper way to implement scroll/zoom for CanvasControl.

    Is it handled internally, so should I just put it into a ScrollViewer and be done with it.

    Or am I supposed to handle the scroll/zoom events and convert them into a translation in the form of a Matrix3x2.

  5. CanvasControl will always draw to a GPU surface sized the entire extents of the control.  If you are ok with that (ie. your scene isn't so large that you can't fit it all in a single GPU surface at one time) you could put the control in a scroll viewer which would then display just a part of the larger image.

    If your scene is very large or expensive to draw so you don't want to waste time drawing parts of it that aren't actually visible, you can do your own scrolling and have your CanvasControl only draw the currently visible portion of the scene.

  6. Alex B. says:

    OK, thought so.


Skip to main content