Use the HANDLE for the swapchainin the core projection
This commit is contained in:
parent
e20caae758
commit
d667f3b633
|
@ -1213,7 +1213,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
}
|
||||
}
|
||||
|
||||
HANDLE ControlCore::GetSwapChainHandle() const
|
||||
uint64_t ControlCore::GetSwapChainHandle() const
|
||||
{
|
||||
// This is called by:
|
||||
// * TermControl::RenderEngineSwapChainChanged, who is only registered
|
||||
|
@ -1221,7 +1221,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
// * TermControl::_InitializeTerminal, after the call to Initialize, for
|
||||
// _AttachDxgiSwapChainToXaml.
|
||||
// In both cases, we'll have a _renderEngine by then.
|
||||
return _renderEngine->GetSwapChainHandle();
|
||||
return reinterpret_cast<uint64_t>(_renderEngine->GetSwapChainHandle());
|
||||
}
|
||||
|
||||
void ControlCore::_rendererWarning(const HRESULT hr)
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
void UpdateAppearance(const IControlAppearance& newAppearance);
|
||||
void SizeChanged(const double width, const double height);
|
||||
void ScaleChanged(const double scale);
|
||||
HANDLE GetSwapChainHandle() const;
|
||||
uint64_t GetSwapChainHandle() const;
|
||||
|
||||
void AdjustFontSize(int fontSizeDelta);
|
||||
void ResetFontSize();
|
||||
|
|
|
@ -30,7 +30,7 @@ namespace Microsoft.Terminal.Control
|
|||
String FontFaceName { get; };
|
||||
UInt16 FontWeight { get; };
|
||||
|
||||
// IDXGISwapChain1* GetSwapChain() const;
|
||||
UInt64 GetSwapChainHandle();
|
||||
// std::vector<std::wstring> SelectedText(bool trimTrailingWhitespace) const;
|
||||
void UpdateHoveredCell(Windows.Foundation.IReference<Microsoft.Terminal.Core.Point> terminalPosition);
|
||||
Windows.Foundation.IReference<Microsoft.Terminal.Core.Point> GetHoveredCell();
|
||||
|
|
|
@ -565,7 +565,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
|
||||
if (auto control{ weakThis.get() })
|
||||
{
|
||||
const auto chainHandle = control->_core.GetSwapChainHandle();
|
||||
const HANDLE chainHandle = reinterpret_cast<HANDLE>(control->_core.GetSwapChainHandle());
|
||||
_AttachDxgiSwapChainToXaml(chainHandle);
|
||||
}
|
||||
}
|
||||
|
@ -653,11 +653,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
}
|
||||
_interactivity.Initialize();
|
||||
|
||||
<<<<<<< HEAD
|
||||
_AttachDxgiSwapChainToXaml(_core.GetSwapChain());
|
||||
=======
|
||||
_AttachDxgiSwapChainToXaml(_core->GetSwapChainHandle());
|
||||
>>>>>>> dev/migrie/f/oop/use-dcomp-handle
|
||||
_AttachDxgiSwapChainToXaml(reinterpret_cast<HANDLE>(_core.GetSwapChainHandle()));
|
||||
|
||||
// Tell the DX Engine to notify us when the swap chain changes. We do
|
||||
// this after we initially set the swapchain so as to avoid unnecessary
|
||||
|
|
Loading…
Reference in a new issue