Bug 612320 - remove useless viewport changes - r=vlad

This commit is contained in:
Benoit Jacob 2012-01-16 17:07:18 -05:00
Родитель 938902615b
Коммит e2ed3400bd
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1024,10 +1024,12 @@ WebGLContext::ForceClearFramebufferWithDefaultValues(PRUint32 mask, const nsIntR
bool initializeDepthBuffer = 0 != (mask & LOCAL_GL_DEPTH_BUFFER_BIT);
bool initializeStencilBuffer = 0 != (mask & LOCAL_GL_STENCIL_BUFFER_BIT);
// fun GL fact: no need to worry about the viewport here, glViewport is just setting up a coordinates transformation,
// it doesn't affect glClear at all
// prepare GL state for clearing
gl->fDisable(LOCAL_GL_SCISSOR_TEST);
gl->fDisable(LOCAL_GL_DITHER);
gl->PushViewportRect(viewportRect);
if (initializeColorBuffer) {
gl->fColorMask(1, 1, 1, 1);
@ -1070,8 +1072,6 @@ WebGLContext::ForceClearFramebufferWithDefaultValues(PRUint32 mask, const nsIntR
gl->fClearStencil(mStencilClearValue);
}
gl->PopViewportRect();
if (mDitherEnabled)
gl->fEnable(LOCAL_GL_DITHER);
else