Bug 806428 - Do not abort when a ThebesLayer's size changes when previous size was (0,0). r=BenWa
authorNicolas Silva <nical.bugzilla@gmail.com>
Thu, 15 Nov 2012 07:23:13 +0100
changeset 113628 571ae303c8dc7bb364dfc481b319752a22cd6a5f
parent 113627 940e9616ec59e34ab334440d753517aa2c1b6e22
child 113629 5cb2cc9be615d66b1eb96843a4c8c45b9b60e29d
push id18271
push usernsilva@mozilla.com
push dateSun, 18 Nov 2012 00:21:37 +0000
treeherdermozilla-inbound@571ae303c8dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersBenWa
bugs806428
milestone19.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
Bug 806428 - Do not abort when a ThebesLayer's size changes when previous size was (0,0). r=BenWa
gfx/layers/basic/BasicBuffers.h
--- a/gfx/layers/basic/BasicBuffers.h
+++ b/gfx/layers/basic/BasicBuffers.h
@@ -43,17 +43,17 @@ public:
    * Swap out the old backing buffer for |aBuffer| and attributes.
    */
   void SetBackingBuffer(gfxASurface* aBuffer,
                         const nsIntRect& aRect, const nsIntPoint& aRotation)
   {
 #ifdef DEBUG
     gfxIntSize prevSize = gfxIntSize(BufferRect().width, BufferRect().height);
     gfxIntSize newSize = aBuffer->GetSize();
-    NS_ABORT_IF_FALSE(newSize == prevSize,
+    NS_ABORT_IF_FALSE(newSize == prevSize || prevSize == gfxIntSize(0,0),
                       "Swapped-in buffer size doesn't match old buffer's!");
 #endif
     nsRefPtr<gfxASurface> oldBuffer;
     oldBuffer = SetBuffer(aBuffer, aRect, aRotation);
   }
 
   void SetBackingBufferAndUpdateFrom(
     gfxASurface* aBuffer,