Bug 696093 - Fix ResizeOffscreenFBO not properly retrying when AA fails - r=bjacob

This commit is contained in:
Jeff Gilbert 2011-10-20 23:41:02 -04:00
parent 72ac2e4c02
commit f8971f0786
2 changed files with 9 additions and 5 deletions

View File

@ -1030,14 +1030,14 @@ GLContext::ResizeOffscreenFBO(const gfxIntSize& aSize, const bool aUseReadFBO, c
const int stencil = mCreationFormat.stencil;
int samples = mCreationFormat.samples;
const bool useDrawMSFBO = (samples > 0) && SupportsFramebufferMultisample();
if (!SupportsFramebufferMultisample() || aDisableAA)
samples = 0;
const bool useDrawMSFBO = (samples > 0);
if (!useDrawMSFBO && !aUseReadFBO)
return true;
if (!useDrawMSFBO || aDisableAA)
samples = 0;
const bool firstTime = (mOffscreenDrawFBO == 0 && mOffscreenReadFBO == 0);
GLuint curBoundFramebufferDraw = 0;

View File

@ -1328,7 +1328,11 @@ protected:
if (!mCreationFormat.samples)
return false;
printf("ResizeOffscreenFBO failed with AA, retrying without...\n");
if (mDebugMode) {
printf_stderr("Requested level of multisampling is unavailable, continuing without multisampling\n");
}
return ResizeOffscreenFBO(aSize, aUseReadFBO, true);
}
void DeleteOffscreenFBO();