Bug 614651: Intersect clip rects properly in D3D9 layers. r=bas a=blocking-final
authorMatt Woodrow <mwoodrow@mozilla.com>
Wed, 15 Dec 2010 21:37:07 +0100
changeset 59255 74bd849a56d633fbb4afdf93468ae33268ef878f
parent 59254 76f51caf3a169b9d8a4cb60eddce09dae1fd6cde
child 59256 e6ee4b05d44af68c9b8500f6364a033722d68aed
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersbas, blocking-final
bugs614651
milestone2.0b9pre
Bug 614651: Intersect clip rects properly in D3D9 layers. r=bas a=blocking-final
gfx/layers/d3d9/ContainerLayerD3D9.cpp
--- a/gfx/layers/d3d9/ContainerLayerD3D9.cpp
+++ b/gfx/layers/d3d9/ContainerLayerD3D9.cpp
@@ -229,17 +229,17 @@ ContainerLayerD3D9::RenderLayer()
       D3DSURFACE_DESC desc;
       renderSurface->GetDesc(&desc);
 
       if (!useIntermediate) {
         // Intersect with current clip rect.
         r.left = NS_MAX<PRInt32>(oldClipRect.left, r.left);
         r.right = NS_MIN<PRInt32>(oldClipRect.right, r.right);
         r.top = NS_MAX<PRInt32>(oldClipRect.top, r.top);
-        r.bottom = NS_MAX<PRInt32>(oldClipRect.bottom, r.bottom);
+        r.bottom = NS_MIN<PRInt32>(oldClipRect.bottom, r.bottom);
       } else {
         // > 0 is implied during the intersection when useIntermediate == true;
         r.left = NS_MAX<LONG>(0, r.left);
         r.top = NS_MAX<LONG>(0, r.top);
       }
       r.bottom = NS_MIN<LONG>(r.bottom, desc.Height);
       r.right = NS_MIN<LONG>(r.right, desc.Width);