Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move HWND render target creation to WM_CREATE. #916

Merged
merged 1 commit into from
May 22, 2020

Conversation

xStrom
Copy link
Member

@xStrom xStrom commented May 11, 2020

This PR should help with the initial white flash reported in #914. On my Windows 7 desktop I measured the HWND render target creation at 39ms. This is definitely too long to lazily create in WM_PAINT so I moved it to WM_CREATE.

Even if it doesn't fully fix the white flash, it cuts down the first frame time by 39ms on my machine, so it's worth a merge regardless.

I left the check in WM_PAINT intact, because there are failure paths with dcomp that may need it.

@xStrom xStrom added shell/win concerns the Windows backend S-needs-review waits for review labels May 11, 2020
@cmyr
Copy link
Member

cmyr commented May 20, 2020

I don't have access to a windows machine right now, so I can't test this. :(

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems reasonable to me. I didn't do careful measurement, but the flash on startup does appear to be shorter on my Windows 7 test machine, and I also didn't find anything that breaks. Thanks!

@xStrom xStrom removed the S-needs-review waits for review label May 22, 2020
@xStrom xStrom merged commit 1cacd85 into linebender:master May 22, 2020
@xStrom xStrom deleted the first-frame branch May 22, 2020 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell/win concerns the Windows backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants