[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andersca at apple.com andersca at apple.com
Wed Dec 22 14:35:44 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 5bf3c7ccf2e6288f78407ffa9555d151c18a106e
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 13 21:44:08 2010 +0000

    Don't set the fill/stroke colorspace before filling/stroking
    https://bugs.webkit.org/show_bug.cgi?id=47619
    
    Reviewed by Beth Dakin.
    
    Setting the colorspace has the side-effect of setting the color to black, which is
    not what we want. When fill/stroke is called, a fill/stroke color should already have been set.
    
    Pixel tests show no regressions from this change.
    
    * platform/graphics/cg/GraphicsContextCG.cpp:
    (WebCore::GraphicsContext::fillPath):
    (WebCore::GraphicsContext::strokePath):
    (WebCore::GraphicsContext::fillRect):
    (WebCore::GraphicsContext::strokeRect):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69700 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7cfa4bb..4edbd84 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,21 @@
+2010-10-13  Anders Carlsson  <andersca at apple.com>
+
+        Reviewed by Beth Dakin.
+
+        Don't set the fill/stroke colorspace before filling/stroking
+        https://bugs.webkit.org/show_bug.cgi?id=47619
+
+        Setting the colorspace has the side-effect of setting the color to black, which is
+        not what we want. When fill/stroke is called, a fill/stroke color should already have been set.
+
+        Pixel tests show no regressions from this change.
+
+        * platform/graphics/cg/GraphicsContextCG.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::fillRect):
+        (WebCore::GraphicsContext::strokeRect):
+
 2010-10-13  Brent Fulgham  <bfulgham at webkit.org>
 
         Unreviewed WinCairo build fix.
diff --git a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
index 06c0f00..a7aa764 100644
--- a/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
+++ b/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
@@ -79,34 +79,6 @@ static void setCGStrokeColor(CGContextRef context, const Color& color, ColorSpac
     CGContextSetStrokeColorWithColor(context, cachedCGColor(color, colorSpace));
 }
 
-static void setCGFillColorSpace(CGContextRef context, ColorSpace colorSpace)
-{
-    switch (colorSpace) {
-    case DeviceColorSpace:
-        break;
-    case sRGBColorSpace:
-        CGContextSetFillColorSpace(context, sRGBColorSpaceRef());
-        break;
-    default:
-        ASSERT_NOT_REACHED();
-        break;
-    }
-}
-
-static void setCGStrokeColorSpace(CGContextRef context, ColorSpace colorSpace)
-{
-    switch (colorSpace) {
-    case DeviceColorSpace:
-        break;
-    case sRGBColorSpace:
-        CGContextSetStrokeColorSpace(context, sRGBColorSpaceRef());
-        break;
-    default:
-        ASSERT_NOT_REACHED();
-        break;
-    }
-}
-
 CGColorSpaceRef deviceRGBColorSpaceRef()
 {
     static CGColorSpaceRef deviceSpace = CGColorSpaceCreateDeviceRGB();
@@ -568,9 +540,6 @@ void GraphicsContext::fillPath()
 
     CGContextRef context = platformContext();
 
-    // FIXME: Is this helpful and correct in the fillPattern and fillGradient cases?
-    setCGFillColorSpace(context, m_common->state.fillColorSpace);
-
     if (m_common->state.fillGradient) {
         CGContextSaveGState(context);
         if (fillRule() == RULE_EVENODD)
@@ -595,9 +564,6 @@ void GraphicsContext::strokePath()
 
     CGContextRef context = platformContext();
 
-    // FIXME: Is this helpful and correct in the strokePattern and strokeGradient cases?
-    setCGStrokeColorSpace(context, m_common->state.strokeColorSpace);
-
     if (m_common->state.strokeGradient) {
         CGContextSaveGState(context);
         CGContextReplacePathWithStrokedPath(context);
@@ -620,9 +586,6 @@ void GraphicsContext::fillRect(const FloatRect& rect)
 
     CGContextRef context = platformContext();
 
-    // FIXME: Is this helpful and correct in the fillPattern and fillGradient cases?
-    setCGFillColorSpace(context, m_common->state.fillColorSpace);
-
     if (m_common->state.fillGradient) {
         CGContextSaveGState(context);
         CGContextClipToRect(context, rect);
@@ -845,9 +808,6 @@ void GraphicsContext::strokeRect(const FloatRect& r, float lineWidth)
 
     CGContextRef context = platformContext();
 
-    // FIXME: Is this helpful and correct in the strokePattern and strokeGradient cases?
-    setCGStrokeColorSpace(context, m_common->state.strokeColorSpace);
-
     if (m_common->state.strokeGradient) {
         CGContextSaveGState(context);
         setStrokeThickness(lineWidth);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list