[Webkit-unassigned] [Bug 55830] REGRESSION: Animated gifs blink and cause high CPU usage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 7 14:00:07 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=55830





--- Comment #15 from David <david at wmol.com>  2011-03-07 14:00:07 PST ---
Here is a diff that causes "a1 = 1" to flood my xterm.  So, it does indeed hit the code path.



--- GIFImageDecoder.cpp.orig    Mon Mar  7 16:59:34 2011
+++ GIFImageDecoder.cpp Mon Mar  7 16:49:46 2011
@@ -342,10 +342,11 @@
         ASSERT(prevBuffer->status() == RGBA32Buffer::FrameComplete);

         if ((prevMethod == RGBA32Buffer::DisposeNotSpecified) || (prevMethod == RGBA32Buffer::DisposeKeep)) {
-            // Preserve the last frame as the starting state for this frame.
-            if (!buffer->copyBitmapData(*prevBuffer));
-                return setFailed();
-        } else {
+            int a1;
+               // Preserve the last frame as the starting state for this frame.
+            a1 = buffer->copyBitmapData(*prevBuffer);
+               printf("a1 = %d\n", a1);  
+      } else {
             // We want to clear the previous frame to transparent, without
             // affecting pixels in the image outside of the frame.
             const IntRect& prevRect = prevBuffer->rect();
@@ -356,10 +357,11 @@
                 if (!buffer->setSize(bufferSize.width(), bufferSize.height()))
                     return setFailed();
             } else {
+               int a2;
               // Copy the whole previous buffer, then clear just its frame.
-              if (!buffer->copyBitmapData(*prevBuffer));
-                  return setFailed();
-              for (int y = prevRect.y(); y < prevRect.bottom(); ++y) {
+              a2 = buffer->copyBitmapData(*prevBuffer);
+              printf("a2 = %d\n", a2);
+               for (int y = prevRect.y(); y < prevRect.bottom(); ++y) {
                   for (int x = prevRect.x(); x < prevRect.right(); ++x)
                       buffer->setRGBA(x, y, 0, 0, 0, 0);
               }

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list