diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-07-20 13:36:51 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-02 17:34:52 +0300 |
commit | dbb5a561c8ba6cc77c627730ba8ce70ea98d04dd (patch) | |
tree | 612770c00619b496449cfda72cbf1ee90332b2c8 /intern/ghost | |
parent | 80314489f5e5011132acc0275e0b49a83705a944 (diff) |
Benchmark: wm hacks to open a single window with benchmark space.
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowWin32.cpp | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowX11.cpp | 9 |
3 files changed, 9 insertions, 6 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 2b986428fd3..aa20f533069 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -533,8 +533,9 @@ GHOST_WindowCocoa::GHOST_WindowCocoa( rect.size.width = width; rect.size.height = height; + /* Benchmark: no window resize. */ m_window = [[CocoaWindow alloc] initWithContentRect:rect - styleMask:NSTitledWindowMask | NSClosableWindowMask | NSResizableWindowMask | NSMiniaturizableWindowMask + styleMask:NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask backing:NSBackingStoreBuffered defer:NO]; if (m_window == nil) { diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 676a29f28d4..570a447a352 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -149,7 +149,8 @@ GHOST_WindowWin32::GHOST_WindowWin32(GHOST_SystemWin32 *system, else if (top < monitor.rcWork.top) top = monitor.rcWork.top; - int wintype = WS_OVERLAPPEDWINDOW; + /* Benchmark: no window resize. */ + int wintype = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX; if (m_parentWindowHwnd != 0) { wintype = WS_CHILD; GetWindowRect((HWND)m_parentWindowHwnd, &rect); diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp index e740542961e..c7d1329a3c8 100644 --- a/intern/ghost/intern/GHOST_WindowX11.cpp +++ b/intern/ghost/intern/GHOST_WindowX11.cpp @@ -484,10 +484,11 @@ GHOST_WindowX11(GHOST_SystemX11 *system, xsizehints->y = top; xsizehints->width = width; xsizehints->height = height; - xsizehints->min_width = 320; /* size hints, could be made apart of the ghost api */ - xsizehints->min_height = 240; /* limits are also arbitrary, but should not allow 1x1 window */ - xsizehints->max_width = 65535; - xsizehints->max_height = 65535; + /* Benchmark: fixed window size. */ + xsizehints->min_width = width; /* size hints, could be made apart of the ghost api */ + xsizehints->min_height = height; /* limits are also arbitrary, but should not allow 1x1 window */ + xsizehints->max_width = width; + xsizehints->max_height = height; XSetWMNormalHints(m_display, m_window, xsizehints); XFree(xsizehints); } |