author | Jerry Shih <hshih@mozilla.com> |
Thu, 13 Aug 2015 08:22:58 -0700 | |
changeset 257593 | 513d1660a8d4719915678d2b99a46e98dd9acd04 |
parent 257592 | 373f429e2549d67dab20a0209dadeb51f41a13e4 |
child 257594 | 87347323281a0eddb0ed1c2af6b1acf57565b4f7 |
push id | 29223 |
push user | kwierso@gmail.com |
push date | Thu, 13 Aug 2015 22:18:08 +0000 |
treeherder | mozilla-central@4b35236fc76e [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nical |
bugs | 1192192 |
milestone | 43.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/opengl/CompositorOGL.cpp +++ b/gfx/layers/opengl/CompositorOGL.cpp @@ -985,19 +985,22 @@ CompositorOGL::DrawQuad(const Rect& aRec return; } // XXX: This doesn't handle 3D transforms. It also doesn't handled rotated // quads. Fix me. Rect destRect = aTransform.TransformBounds(aRect); mPixelsFilled += destRect.width * destRect.height; + IntPoint offset = mCurrentRenderTarget->GetOrigin(); + // 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); + destRect.MoveBy(-offset); if (!mRenderBound.Intersects(destRect)) { return; } LayerScope::DrawBegin(); Rect clipRect = aClipRect; // aClipRect is in destination coordinate space (after all @@ -1087,17 +1090,16 @@ CompositorOGL::DrawQuad(const Rect& aRec program->SetLayerTransform(aTransform); LayerScope::SetLayerTransform(aTransform); if (colorMatrix) { EffectColorMatrix* effectColorMatrix = static_cast<EffectColorMatrix*>(aEffectChain.mSecondaryEffects[EffectTypes::COLOR_MATRIX].get()); program->SetColorMatrix(effectColorMatrix->mColorMatrix); } - IntPoint offset = mCurrentRenderTarget->GetOrigin(); program->SetRenderOffset(offset.x, offset.y); LayerScope::SetRenderOffset(offset.x, offset.y); if (aOpacity != 1.f) program->SetLayerOpacity(aOpacity); if (config.mFeatures & ENABLE_TEXTURE_RECT) { TexturedEffect* texturedEffect = static_cast<TexturedEffect*>(aEffectChain.mPrimaryEffect.get());