зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1186236 - Fix drawQuad culling bug. r=nical
Consider the render target size for drawQuad culling.
This commit is contained in:
Родитель
1fe487642d
Коммит
1f237a5ad2
|
@ -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;
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче