mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 06:15:43 +00:00
Bug 924241 - Don't force-present after post-resize clear. r=bjacob
This commit is contained in:
parent
7c73e41e2d
commit
86d60e0305
@ -392,6 +392,10 @@ WebGLContext::SetDimensions(int32_t width, int32_t height)
|
||||
if (gl) {
|
||||
MakeContextCurrent();
|
||||
|
||||
// If we've already drawn, we should commit the current buffer.
|
||||
PresentScreenBuffer();
|
||||
|
||||
// ResizeOffscreen scraps the current prod buffer before making a new one.
|
||||
gl->ResizeOffscreen(gfxIntSize(width, height)); // Doesn't matter if it succeeds (soft-fail)
|
||||
// It's unlikely that we'll get a proper-sized context if we recreate if we didn't on resize
|
||||
|
||||
@ -400,9 +404,7 @@ WebGLContext::SetDimensions(int32_t width, int32_t height)
|
||||
mHeight = gl->OffscreenSize().height;
|
||||
mResetLayer = true;
|
||||
|
||||
ScopedBindFramebuffer autoFB(gl, 0);
|
||||
gl->ClearSafely();
|
||||
mShouldPresent = true;
|
||||
ClearScreen();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user