зеркало из https://github.com/AvaloniaUI/angle.git
Only use CompositorNativeWindow11 when the window is non-null.
SurfaceD3D always instantiates a NativeWindow object even for pbuffers. A null window pointer now creates a CompositorNativeWindow11 instead of a NativeWindow11Win32 which instantiates an RoHelper in the constructor. This is expensive for some use cases that create a pbuffer surface every frame. BUG=angleproject:2956 Change-Id: If43930d4960c2510b6b96291aab971e3f3abf665 Reviewed-on: https://chromium-review.googlesource.com/c/1333967 Reviewed-by: James Clarke <james.clarke@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
This commit is contained in:
Родитель
2778029563
Коммит
f914372547
|
@ -1272,7 +1272,7 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window,
|
|||
const egl::Config *config,
|
||||
const egl::AttributeMap &attribs) const
|
||||
{
|
||||
auto useWinUiComp = !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
|
||||
|
||||
if (useWinUiComp)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче