Bug 711063 - Part 6: Adjust nsRenderingContext to be compatible with Azure wrapper. r=joedrew
authorBas Schouten <bschouten@mozilla.com>
Thu, 05 Jan 2012 08:17:52 +0100
changeset 85072 d8d656a32dbc9920655ca51a0eeee4269f44c320
parent 85071 7a442aaed755d10839a85d4b1edb48d55e40adfb
child 85073 880ba940def0bf9b2bb7a512d506c0606cf1b96f
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoedrew
bugs711063
milestone12.0a1
Bug 711063 - Part 6: Adjust nsRenderingContext to be compatible with Azure wrapper. r=joedrew
gfx/src/nsRenderingContext.cpp
--- a/gfx/src/nsRenderingContext.cpp
+++ b/gfx/src/nsRenderingContext.cpp
@@ -120,19 +120,19 @@ nsRenderingContext::PopState()
 
 void
 nsRenderingContext::IntersectClip(const nsRect& aRect)
 {
     mThebes->NewPath();
     gfxRect clipRect(GFX_RECT_FROM_TWIPS_RECT(aRect));
     if (mThebes->UserToDevicePixelSnapped(clipRect, true)) {
         gfxMatrix mat(mThebes->CurrentMatrix());
-        mThebes->IdentityMatrix();
+        mat.Invert();
+        clipRect = mat.Transform(clipRect);
         mThebes->Rectangle(clipRect);
-        mThebes->SetMatrix(mat);
     } else {
         mThebes->Rectangle(clipRect);
     }
 
     mThebes->Clip();
 }
 
 void