Bug 924241 - Don't force-present after post-resize clear. r=bjacob

This commit is contained in:
Jeff Gilbert 2013-10-31 09:52:24 -04:00
parent 7c73e41e2d
commit 86d60e0305

View File

@ -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;
}