| Summary: | SDL_UpdateWindowSurfaceRects BitBlt the entire surface on Win32. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ryan C. Gordon <icculus> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | jk51435, libsdl.org, renesd |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Windows (All) | ||
| Attachments: | Windows SDL_UpdateWindowSurfaceRects to only do updates of rects passed in. | ||
|
Description
Ryan C. Gordon
2020-04-27 03:46:02 UTC
From a porter's perspective, I'd be curious to know what UpdateWindowFramebuffer ought to do if the platform does not cleanly support partial updates to the screen. Is the Rects argument intended to be only a hint for optimization, or is it a requirement that the function not "color outside the lines" defined by Rects? Like Win32, my DOS port ignores the Rects argument, copies the entire surface to the back buffer, then does a page flip. If the area outside of Rects is not supposed to be mutated, there's a potential problem where the back buffer may not match the front buffer. I could first copy that area of the front buffer to the back buffer before the page flip, but that seems counter-productive from a performance perspective. The rects argument is just supposed to be an optimization. Conceptually the entire back buffer is reflected to the front buffer. Created attachment 4346 [details]
Windows SDL_UpdateWindowSurfaceRects to only do updates of rects passed in.
Here's a patch.
Hi, I am the original poster of the bug on the forum and if I install the patch Rene Dudfield did I get the correct results for SDL_UpdateWindowSurfaceRects function. If this passes your tests I would be glad if you merge it in the next SDL official release. Thank you all for your work on this bug, I know this function is not used very much, so I am really glad you managed to fix it so soon. That patch would not have compiled as-is, so I fixed and committed it: https://hg.libsdl.org/SDL/rev/ba1ed72249c0 Thanks! Thanks :) |