Bug 956401 - 7/9 - CompositorOGL::{Begin,End}Frame do not need to touch the scissor rect - r=nrc

This commit is contained in:
Benoit Jacob 2014-01-07 15:02:19 -05:00
Родитель 0b2996dff5
Коммит 341c6ae819
1 изменённых файлов: 2 добавлений и 16 удалений

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

@ -836,21 +836,10 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
mGLContext->fEnable(LOCAL_GL_SCISSOR_TEST);
if (!aClipRectIn) {
mGLContext->fScissor(0, FlipY(height), width, height);
if (aClipRectOut) {
aClipRectOut->SetRect(0, 0, width, height);
}
} else {
mGLContext->fScissor(aClipRectIn->x,
FlipY(aClipRectIn->y + aClipRectIn->height),
aClipRectIn->width,
aClipRectIn->height);
if (aClipRectOut && !aClipRectIn) {
aClipRectOut->SetRect(0, 0, width, height);
}
// Save the current scissor rect so that SetRenderTarget can pop back to it.
mGLContext->PushScissorRect();
// If the Android compositor is being used, this clear will be done in
// DrawWindowUnderlay. Make sure the bits used here match up with those used
// in mobile/android/base/gfx/LayerRenderer.java
@ -1400,9 +1389,6 @@ CompositorOGL::EndFrame()
return;
}
// Restore the scissor rect that we saved in BeginFrame.
mGLContext->PopScissorRect();
mCurrentRenderTarget = nullptr;
if (sDrawFPS && !mFPS) {