Backout d22512e72e42 (bug 798990) for reftest failures in empty-transaction-1.html
authorEd Morley <emorley@mozilla.com>
Mon, 08 Oct 2012 13:50:42 +0100
changeset 113268 824316b5a366e5aa7fa4ab3fcf58737b433ebe20
parent 113267 d22512e72e429ece699b986fc3f418b4cde393b3
child 113269 6bd2c54df256773f6f10ec6764a25a41f96765bb
push id2248
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 19:23:44 +0000
treeherdermozilla-aurora@118a3b748323 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs798990
milestone18.0a1
backs outd22512e72e429ece699b986fc3f418b4cde393b3
Backout d22512e72e42 (bug 798990) for reftest failures in empty-transaction-1.html
content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
--- a/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
+++ b/content/canvas/src/nsCanvasRenderingContext2DAzure.cpp
@@ -4625,21 +4625,18 @@ nsCanvasRenderingContext2DAzure::SetMozI
 
 static uint8_t g2DContextLayerUserData;
 
 already_AddRefed<CanvasLayer>
 nsCanvasRenderingContext2DAzure::GetCanvasLayer(nsDisplayListBuilder* aBuilder,
                                                 CanvasLayer *aOldLayer,
                                                 LayerManager *aManager)
 {
-  // Don't call EnsureTarget() ... if there isn't already a surface, then
-  // we have nothing to paint and there is no need to create a surface just
-  // to paint nothing. Also, EnsureTarget() can cause creation of a persistent
-  // layer manager which must NOT happen during a paint.
-  if (!mTarget || !IsTargetValid()) {
+  EnsureTarget();
+  if (!IsTargetValid()) {
     // No DidTransactionCallback will be received, so mark the context clean
     // now so future invalidations will be dispatched.
     MarkContextClean();
     return nullptr;
   }
 
   mTarget->Flush();