Bug 1186236 - Fix drawQuad culling bug. r=nical

Consider the render target size for drawQuad culling.
This commit is contained in:
JerryShih 2015-08-04 03:16:00 -04:00
Родитель 1fe487642d
Коммит 1f237a5ad2
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -451,6 +451,8 @@ CompositorOGL::PrepareViewport(CompositingRenderTargetOGL* aRenderTarget)
// Set the viewport correctly.
mGLContext->fViewport(0, 0, size.width, size.height);
mRenderBound = Rect(0, 0, size.width, size.height);
mViewportSize = size;
if (!aRenderTarget->HasComplexProjection()) {
@ -629,8 +631,6 @@ CompositorOGL::BeginFrame(const nsIntRegion& aInvalidRegion,
*aRenderBoundsOut = rect;
}
mRenderBoundsOut = rect;
GLint width = rect.width;
GLint height = rect.height;
@ -989,7 +989,7 @@ CompositorOGL::DrawQuad(const Rect& aRect,
// Do a simple culling if this rect is out of target buffer.
// Inflate a small size to avoid some numerical imprecision issue.
destRect.Inflate(1, 1);
if (!mRenderBoundsOut.Intersects(destRect)) {
if (!mRenderBound.Intersects(destRect)) {
return;
}

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

@ -457,7 +457,7 @@ private:
FenceHandle mReleaseFenceHandle;
ShaderProgramOGL *mCurrentProgram;
gfx::Rect mRenderBoundsOut;
gfx::Rect mRenderBound;
CompositorOGLVRObjects mVR;
};