mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1142975 - Check for Present()-caused context loss. - r=kamidphish
This commit is contained in:
parent
c252976203
commit
7b8e15b12b
@ -821,6 +821,11 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
// If we've already drawn, we should commit the current buffer.
|
||||
PresentScreenBuffer();
|
||||
|
||||
if (IsContextLost()) {
|
||||
GenerateWarning("WebGL context was lost due to swap failure.");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// ResizeOffscreen scraps the current prod buffer before making a new one.
|
||||
if (!ResizeBackbuffer(width, height)) {
|
||||
GenerateWarning("WebGL context failed to resize.");
|
||||
|
Loading…
Reference in New Issue
Block a user