| 2190 | #endif |
| 2191 | |
| 2192 | WindowingData CaptureContext::CreateWindowingData(QWidget *window) |
| 2193 | { |
| 2194 | if(!GUIInvoke::onUIThread()) |
| 2195 | qCritical() << "CreateWindowingData called on non-UI thread"; |
| 2196 | |
| 2197 | #if defined(WIN32) |
| 2198 | |
| 2199 | return CreateWin32WindowingData((HWND)window->winId()); |
| 2200 | |
| 2201 | #elif defined(RENDERDOC_PLATFORM_LINUX) |
| 2202 | |
| 2203 | if(m_CurWinSystem == WindowingSystem::Wayland) |
| 2204 | { |
| 2205 | // we don't need this, we just need to force creation of a window handle |
| 2206 | window->winId(); |
| 2207 | wl_surface *surface = |
| 2208 | (wl_surface *)AccessWaylandPlatformInterface("surface", window->windowHandle()); |
| 2209 | return CreateWaylandWindowingData(m_WaylandDisplay, surface); |
| 2210 | } |
| 2211 | else if(m_CurWinSystem == WindowingSystem::XCB) |
| 2212 | { |
| 2213 | return CreateXCBWindowingData(m_XCBConnection, (xcb_window_t)window->winId()); |
| 2214 | } |
| 2215 | else if(m_CurWinSystem == WindowingSystem::Xlib) |
| 2216 | { |
| 2217 | return CreateXlibWindowingData(m_X11Display, (Drawable)window->winId()); |
| 2218 | } |
| 2219 | else |
| 2220 | { |
| 2221 | return CreateHeadlessWindowingData(1, 1); |
| 2222 | } |
| 2223 | |
| 2224 | #elif defined(RENDERDOC_PLATFORM_APPLE) |
| 2225 | |
| 2226 | void *view = (void *)window->winId(); |
| 2227 | |
| 2228 | void *layer = makeNSViewMetalCompatible(view); |
| 2229 | |
| 2230 | return CreateMacOSWindowingData(view, layer); |
| 2231 | |
| 2232 | #else |
| 2233 | |
| 2234 | #error "Unknown platform" |
| 2235 | |
| 2236 | #endif |
| 2237 | } |
| 2238 | |
| 2239 | IMainWindow *CaptureContext::GetMainWindow() |
| 2240 | { |
nothing calls this directly
no test coverage detected