Seam occurred between pieces of ShadowBlur on floating point zoom
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 03:03:07 +0000 (03:03 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 03:03:07 +0000 (03:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=101435

Patch by KyungTae Kim <ktf.kim@samsung.com> on 2012-11-07
Reviewed by Simon Fraser.

When paint Shadow that doesn't have blurred edge on floating point zoom,
pixel seam (pixel cracks) occurred between pieces of the ShadowBlur because of unaligned clip rect.
So, enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing)
even if the unaligned clip rect occurred.

* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::calculateLayerBoundingRect):

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

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

index b316ad1..08ccf61 100644 (file)
@@ -1,3 +1,19 @@
+2012-11-07  KyungTae Kim  <ktf.kim@samsung.com>
+
+        Seam occurred between pieces of ShadowBlur on floating point zoom
+        https://bugs.webkit.org/show_bug.cgi?id=101435
+
+        Reviewed by Simon Fraser.
+
+        When paint Shadow that doesn't have blurred edge on floating point zoom,
+        pixel seam (pixel cracks) occurred between pieces of the ShadowBlur because of unaligned clip rect.
+        So, enlarge the clipping area 1 pixel so that the fill does not bleed (due to antialiasing)
+        even if the unaligned clip rect occurred.
+
+
+        * platform/graphics/ShadowBlur.cpp:
+        (WebCore::ShadowBlur::calculateLayerBoundingRect):
+
 2012-11-07  Tim Horton  <timothy_horton@apple.com>
 
         Repaint issues with -webkit-svg-shadow used on a container
index e60f5c5..3359283 100644 (file)
@@ -411,6 +411,11 @@ IntRect ShadowBlur::calculateLayerBoundingRect(GraphicsContext* context, const F
         if (m_type == BlurShadow) {
             inflatedClip.inflateX(edgeSize.width());
             inflatedClip.inflateY(edgeSize.height());
+        } else {
+            // Enlarge the clipping area 1 pixel so that the fill does not
+            // bleed (due to antialiasing) even if the unaligned clip rect occurred
+            inflatedClip.inflateX(1);
+            inflatedClip.inflateY(1);
         }
         
         layerRect.intersect(inflatedClip);