Bug 715699. Mark the Thebes surface dirty when we change it the canvas implemention. r=bas
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Tue, 13 Dec 2011 15:44:41 -0500
changeset 85176 24a58ac9dca221c194c0da899c84866639e5bcc6
parent 85175 fdc667b43e1112175b7a711b557497b64248b7ed
child 85177 9ba8b867f96655ee07a8e86d7302503639975872
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)
reviewersbas
bugs715699
milestone12.0a1
Bug 715699. Mark the Thebes surface dirty when we change it the canvas implemention. r=bas We need to tell cairo when we've changed the Thebes surface. This was causing bugs on the CG backend.
content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
--- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
@@ -1160,16 +1160,19 @@ nsCanvasRenderingContext2DAzure::Redraw(
 
   mIsEntireFrameInvalid = true;
 
   if (!mCanvasElement) {
     NS_ASSERTION(mDocShell, "Redraw with no canvas element or docshell!");
     return NS_OK;
   }
 
+  if (mThebesSurface)
+      mThebesSurface->MarkDirty();
+
   nsSVGEffects::InvalidateDirectRenderingObservers(HTMLCanvasElement());
 
   HTMLCanvasElement()->InvalidateCanvasContent(nsnull);
 
   return NS_OK;
 }
 
 void
@@ -1187,16 +1190,19 @@ nsCanvasRenderingContext2DAzure::Redraw(
     return;
   }
 
   if (!mCanvasElement) {
     NS_ASSERTION(mDocShell, "Redraw with no canvas element or docshell!");
     return;
   }
 
+  if (mThebesSurface)
+      mThebesSurface->MarkDirty();
+
   nsSVGEffects::InvalidateDirectRenderingObservers(HTMLCanvasElement());
 
   gfxRect tmpR = ThebesRect(r);
   HTMLCanvasElement()->InvalidateCanvasContent(&tmpR);
 
   return;
 }