Commit f9143725 by Geoff Lang Committed by Commit Bot

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/1333967Reviewed-by: 's avatarJames Clarke <james.clarke@microsoft.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 27780295
...@@ -1272,7 +1272,7 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window, ...@@ -1272,7 +1272,7 @@ NativeWindowD3D *Renderer11::createNativeWindow(EGLNativeWindowType window,
const egl::Config *config, const egl::Config *config,
const egl::AttributeMap &attribs) const const egl::AttributeMap &attribs) const
{ {
auto useWinUiComp = !NativeWindow11Win32::IsValidNativeWindow(window); auto useWinUiComp = window != nullptr && !NativeWindow11Win32::IsValidNativeWindow(window);
if (useWinUiComp) if (useWinUiComp)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment