MCPcopy Create free account
hub / github.com/MicrosoftEdge/WebView2Samples / SetRoot

Method SetRoot

SampleApps/WebView2APISample/DCompTargetImpl.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19HRESULT __stdcall DCompTargetImpl::SetRoot(IDCompositionVisual* visual)
20{
21 HRESULT hr = S_OK;
22 if (m_viewComponentOwner)
23 {
24 hr = m_viewComponentOwner->m_dcompWebViewVisual->RemoveAllVisuals();
25 if (SUCCEEDED(hr) && visual)
26 {
27 hr = m_viewComponentOwner->m_dcompWebViewVisual->AddVisual(visual, FALSE, nullptr);
28 }
29 }
30
31 return hr;
32}

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected