Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer.
authorryumiel@company100.net <ryumiel@company100.net@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Dec 2013 21:39:23 +0000 (21:39 +0000)
committerryumiel@company100.net <ryumiel@company100.net@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Dec 2013 21:39:23 +0000 (21:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=126150

Reviewed by Simon Fraser.

Since ScratchBuffer::clearScratchBuffer only clears m_lastRadius,
ShadowBlur doesn't draw shadow into the re-created scratch buffer if it
tries to draw shadow without blurRadius.

Clear m_lastLayerSize to empty is enought to ensure that there is no
drawn contents in the scratch buffer.

No new tests due to the flaky nature of reproducing the issue.

* platform/graphics/ShadowBlur.cpp:
(WebCore::ScratchBuffer::clearScratchBuffer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@161014 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ShadowBlur.cpp

index d102477..c98ab03 100644 (file)
@@ -1,3 +1,22 @@
+2013-12-23  Gwang Yoon Hwang  <ryumiel@company100.net>
+
+        Clear ScratchBuffer::m_lastLayerSize when clearing the scratch buffer.
+        https://bugs.webkit.org/show_bug.cgi?id=126150
+
+        Reviewed by Simon Fraser.
+
+        Since ScratchBuffer::clearScratchBuffer only clears m_lastRadius,
+        ShadowBlur doesn't draw shadow into the re-created scratch buffer if it
+        tries to draw shadow without blurRadius.
+
+        Clear m_lastLayerSize to empty is enought to ensure that there is no
+        drawn contents in the scratch buffer.
+
+        No new tests due to the flaky nature of reproducing the issue.
+
+        * platform/graphics/ShadowBlur.cpp:
+        (WebCore::ScratchBuffer::clearScratchBuffer):
+
 2013-12-23  Benjamin Poulain  <benjamin@webkit.org>
 
         Add id matching to the Selector Code Generator
index 89a449d..82b180a 100644 (file)
@@ -139,6 +139,7 @@ private:
     {
         m_imageBuffer = nullptr;
         m_lastRadius = FloatSize();
+        m_lastLayerSize = FloatSize();
     }
 
     std::unique_ptr<ImageBuffer> m_imageBuffer;