Skip to content

Commit 04106a8

Browse files
authored
tidying up formatting (#1496)
* tidying up formatting * trying to unblock the tooling, which keeps getting stuck
1 parent 51a9db2 commit 04106a8

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

windows-apps-src/gaming/directx-and-xaml-interop.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ And here's a deeper dive into those steps, with source code examples.
259259
[**VirtualSurfaceImageSource**](/uwp/api/Windows.UI.Xaml.Media.Imaging.VirtualSurfaceImageSource) extends [**SurfaceImageSource**](/uwp/api/Windows.UI.Xaml.Media.Imaging.SurfaceImageSource), and it's for scenarios where the content is potentially too large to fit on the screen all at once (and/or too large to fit in video memory as a single texture), and so the content must be virtualized in order to render optimally. For example, mapping apps, or large document canvases.
260260
261261
> [!TIP]
262-
> The [Complex inking sample]/samples/microsoft/windows-universal-samples/complexink/) application demonstrates **VirtualSurfaceImageSource**.
262+
> The [Complex inking sample](/samples/microsoft/windows-universal-samples/complexink/) application demonstrates **VirtualSurfaceImageSource**.
263263
264264
**VirtualSurfaceImageSource** differs from [**SurfaceImageSource**](/uwp/api/Windows.UI.Xaml.Media.Imaging.SurfaceImageSource) in that it uses a callback—[**IVirtualSurfaceImageSourceCallbacksNative::UpdatesNeeded**](/windows/win32/api/windows.ui.xaml.media.dxinterop/nf-windows-ui-xaml-media-dxinterop-ivirtualsurfaceupdatescallbacknative-updatesneeded)—which you implement to update regions of the surface as they become visible on the screen. You don't need to clear regions that are hidden, because the XAML framework takes care of that for you.
265265
@@ -533,29 +533,29 @@ And here's a deeper dive into those steps, with source code examples.
533533
534534
```cppwinrt
535535
// MainPage.cpp | paste this at the end of MainPage::ClickHandler
536-
VirtualSurfaceImageSource virtualSurfaceImageSource(2000, 2000);
536+
VirtualSurfaceImageSource virtualSurfaceImageSource(2000, 2000);
537537
538-
winrt::com_ptr<::ISurfaceImageSourceNativeWithD2D> sisNativeWithD2D{
539-
virtualSurfaceImageSource.as<::ISurfaceImageSourceNativeWithD2D>() };
538+
winrt::com_ptr<::ISurfaceImageSourceNativeWithD2D> sisNativeWithD2D{
539+
virtualSurfaceImageSource.as<::ISurfaceImageSourceNativeWithD2D>() };
540540
541-
// Associate the Direct2D device with the SurfaceImageSource.
542-
sisNativeWithD2D->SetDevice(d2dDevice.get());
541+
// Associate the Direct2D device with the SurfaceImageSource.
542+
sisNativeWithD2D->SetDevice(d2dDevice.get());
543543
544-
// To enable multi-threaded access (optional)
545-
winrt::com_ptr<::ID3D11Multithread> d3dMultiThread{
546-
d3dDevice.as<::ID3D11Multithread>() };
547-
d3dMultiThread->SetMultithreadProtected(true);
544+
// To enable multi-threaded access (optional)
545+
winrt::com_ptr<::ID3D11Multithread> d3dMultiThread{
546+
d3dDevice.as<::ID3D11Multithread>() };
547+
d3dMultiThread->SetMultithreadProtected(true);
548548
549-
winrt::com_ptr<::IVirtualSurfaceImageSourceNative> vsisNative{
550-
virtualSurfaceImageSource.as<::IVirtualSurfaceImageSourceNative>() };
549+
winrt::com_ptr<::IVirtualSurfaceImageSourceNative> vsisNative{
550+
virtualSurfaceImageSource.as<::IVirtualSurfaceImageSourceNative>() };
551551
552-
m_cbi = winrt::make<CallbackImplementation>(sisNativeWithD2D, vsisNative, d2dDeviceContext);
553-
vsisNative->RegisterForUpdatesNeeded(m_cbi.as<::IVirtualSurfaceUpdatesCallbackNative>().get());
552+
m_cbi = winrt::make<CallbackImplementation>(sisNativeWithD2D, vsisNative, d2dDeviceContext);
553+
vsisNative->RegisterForUpdatesNeeded(m_cbi.as<::IVirtualSurfaceUpdatesCallbackNative>().get());
554554
555-
// The SurfaceImageSource object's underlying
556-
// ISurfaceImageSourceNativeWithD2D object will contain the completed bitmap.
555+
// The SurfaceImageSource object's underlying
556+
// ISurfaceImageSourceNativeWithD2D object will contain the completed bitmap.
557557
558-
theImage().Source(virtualSurfaceImageSource);
558+
theImage().Source(virtualSurfaceImageSource);
559559
```
560560
561561
6. Finally, add the following **Image** element inside the existing XAML markup in `MainPage.xaml`.
@@ -669,4 +669,3 @@ Here is basic process for creating and updating a [**SwapChainPanel**](/uwp/api/
669669
* [SwapChainPanel](/uwp/api/Windows.UI.Xaml.Controls.SwapChainPanel)
670670
* [ISwapChainPanelNative](/windows/win32/api/windows.ui.xaml.media.dxinterop/nn-windows-ui-xaml-media-dxinterop-iswapchainpanelnative)
671671
* [Programming Guide for Direct3D 11](/windows/win32/direct3d11/dx-graphics-overviews)
672-

0 commit comments

Comments
 (0)