зеркало из https://github.com/mozilla/gecko-dev.git
Bug 956401 - 7/9 - CompositorOGL::{Begin,End}Frame do not need to touch the scissor rect - r=nrc
This commit is contained in:
Родитель
0b2996dff5
Коммит
341c6ae819
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче