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

mrobinson at webkit.org mrobinson at webkit.org
Wed Dec 22 11:35:24 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 63c5ad6417b834447211ba1454f2fc0f77e3d467
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 29 23:43:54 2010 +0000

    2010-07-29  Martin Robinson  <mrobinson at igalia.com>
    
            Unreviewed, rolling out r64318.
            http://trac.webkit.org/changeset/64318
            https://bugs.webkit.org/show_bug.cgi?id=41732
    
            This change broke many tests.
    
            * platform/graphics/cairo/GraphicsContextCairo.cpp:
            (WebCore::GraphicsContext::drawEllipse):
            (WebCore::GraphicsContext::drawConvexPolygon):
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
            (WebCore::GraphicsContext::drawPath):
            (WebCore::GraphicsContext::drawFocusRing):
            (WebCore::GraphicsContext::addInnerRoundedRectClip):
            (WebCore::GraphicsContext::beginPath):
            (WebCore::GraphicsContext::addPath):
            (WebCore::GraphicsContext::clipOut):
            (WebCore::GraphicsContext::fillRoundedRect):
            * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64322 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 8a14e5c..a94e091 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,27 @@
 2010-07-29  Martin Robinson  <mrobinson at igalia.com>
 
+        Unreviewed, rolling out r64318.
+        http://trac.webkit.org/changeset/64318
+        https://bugs.webkit.org/show_bug.cgi?id=41732
+
+        This change broke many tests.
+
+        * platform/graphics/cairo/GraphicsContextCairo.cpp:
+        (WebCore::GraphicsContext::drawEllipse):
+        (WebCore::GraphicsContext::drawConvexPolygon):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::drawPath):
+        (WebCore::GraphicsContext::drawFocusRing):
+        (WebCore::GraphicsContext::addInnerRoundedRectClip):
+        (WebCore::GraphicsContext::beginPath):
+        (WebCore::GraphicsContext::addPath):
+        (WebCore::GraphicsContext::clipOut):
+        (WebCore::GraphicsContext::fillRoundedRect):
+        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
+
+2010-07-29  Martin Robinson  <mrobinson at igalia.com>
+
         Reviewed by Dirk Schulze.
 
         [Cairo] Bring behavior of paths on the Cairo GraphicsContext into line with the CoreGraphics port
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index e0aa551..79431f0 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -4,7 +4,6 @@
  * Copyright (C) 2008, 2009 Dirk Schulze <krit at webkit.org>
  * Copyright (C) 2008 Nuanti Ltd.
  * Copyright (C) 2009 Brent Fulgham <bfulgham at webkit.org>
- * Copyright (C) 2010 Igalia S.L.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -144,27 +143,6 @@ static inline void copyContextProperties(cairo_t* srcCr, cairo_t* dstCr)
     cairo_set_fill_rule(dstCr, cairo_get_fill_rule(srcCr));
 }
 
-static void appendPathToCairoContext(cairo_t* to, cairo_t* from)
-{
-    cairo_path_t* cairoPath = cairo_copy_path(from);
-    cairo_append_path(to, cairoPath);
-    cairo_path_destroy(cairoPath);
-}
-
-// We apply the pending path built via addPath to the Cairo context
-// lazily. This prevents interaction between the path and other routines
-// such as fillRect.
-static void setPathOnCairoContext(cairo_t* to, cairo_t* from)
-{
-    cairo_new_path(to);
-    appendPathToCairoContext(to, from);
-}
-
-static void appendWebCorePathToCairoContext(cairo_t* context, const Path& path)
-{
-    appendPathToCairoContext(context, path.platformPath()->m_cr);
-}
-
 void GraphicsContext::calculateShadowBufferDimensions(IntSize& shadowBufferSize, FloatRect& shadowRect, float& kernelSize, const FloatRect& sourceRect, const FloatSize& shadowSize, float shadowBlur)
 {
 #if ENABLE(FILTERS)
@@ -402,8 +380,9 @@ void GraphicsContext::drawEllipse(const IntRect& rect)
         setColor(cr, strokeColor());
         cairo_set_line_width(cr, strokeThickness());
         cairo_stroke(cr);
-    } else
-        cairo_new_path(cr);
+    }
+
+    cairo_new_path(cr);
 }
 
 void GraphicsContext::strokeArc(const IntRect& rect, int startAngle, int angleSpan)
@@ -519,9 +498,9 @@ void GraphicsContext::drawConvexPolygon(size_t npoints, const FloatPoint* points
         setColor(cr, strokeColor());
         cairo_set_line_width(cr, strokeThickness());
         cairo_stroke(cr);
-    } else
-        cairo_new_path(cr);
+    }
 
+    cairo_new_path(cr);
     cairo_restore(cr);
 }
 
@@ -543,8 +522,6 @@ void GraphicsContext::fillPath()
 
     cairo_t* cr = m_data->cr;
 
-    setPathOnCairoContext(cr, m_data->m_pendingPath.m_cr);
-
     cairo_set_fill_rule(cr, fillRule() == RULE_EVENODD ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
     drawPathShadow(this, m_common, true, false);
 
@@ -558,9 +535,6 @@ void GraphicsContext::strokePath()
         return;
 
     cairo_t* cr = m_data->cr;
-
-    setPathOnCairoContext(cr, m_data->m_pendingPath.m_cr);
-
     drawPathShadow(this, m_common, false, true);
 
     setPlatformStroke(this, cr, m_common);
@@ -575,8 +549,6 @@ void GraphicsContext::drawPath()
 
     cairo_t* cr = m_data->cr;
 
-    setPathOnCairoContext(cr, m_data->m_pendingPath.m_cr);
-
     cairo_set_fill_rule(cr, fillRule() == RULE_EVENODD ? CAIRO_FILL_RULE_EVEN_ODD : CAIRO_FILL_RULE_WINDING);
     drawPathShadow(this, m_common, true, true);
 
@@ -701,7 +673,7 @@ void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int
 #else
     int radius = (width - 1) / 2;
     for (unsigned i = 0; i < rectCount; i++)
-        appendWebCorePathToCairoContext(cr, Path::createRoundedRectangle(rects[i], FloatSize(radius, radius)));
+        addPath(Path::createRoundedRectangle(rects[i], FloatSize(radius, radius)));
 
     // Force the alpha to 50%.  This matches what the Mac does with outline rings.
     Color ringColor(color.red(), color.green(), color.blue(), 127);
@@ -868,7 +840,6 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
     if (paintingDisabled())
         return;
 
-    cairo_t* cr = m_data->cr;
     clip(rect);
 
     Path p;
@@ -878,8 +849,9 @@ void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness
     // Add inner ellipse
     r.inflate(-thickness);
     p.addEllipse(r);
-    appendWebCorePathToCairoContext(cr, p);
+    addPath(p);
 
+    cairo_t* cr = m_data->cr;
     cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr);
     cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
     cairo_clip(cr);
@@ -1107,7 +1079,8 @@ void GraphicsContext::beginPath()
     if (paintingDisabled())
         return;
 
-    cairo_new_path(m_data->m_pendingPath.m_cr);
+    cairo_t* cr = m_data->cr;
+    cairo_new_path(cr);
 }
 
 void GraphicsContext::addPath(const Path& path)
@@ -1115,10 +1088,10 @@ void GraphicsContext::addPath(const Path& path)
     if (paintingDisabled())
         return;
 
-    cairo_matrix_t currentMatrix;
-    cairo_get_matrix(m_data->cr, &currentMatrix);
-    cairo_set_matrix(m_data->m_pendingPath.m_cr, &currentMatrix);
-    appendWebCorePathToCairoContext(m_data->m_pendingPath.m_cr, path);
+    cairo_t* cr = m_data->cr;
+    cairo_path_t* p = cairo_copy_path(path.platformPath()->m_cr);
+    cairo_append_path(cr, p);
+    cairo_path_destroy(p);
 }
 
 void GraphicsContext::clip(const Path& path)
@@ -1151,7 +1124,7 @@ void GraphicsContext::clipOut(const Path& path)
     double x1, y1, x2, y2;
     cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
     cairo_rectangle(cr, x1, y1, x2 - x1, y2 - y1);
-    appendWebCorePathToCairoContext(cr, path);
+    addPath(path);
 
     cairo_fill_rule_t savedFillRule = cairo_get_fill_rule(cr);
     cairo_set_fill_rule(cr, CAIRO_FILL_RULE_EVEN_ODD);
@@ -1210,7 +1183,8 @@ void GraphicsContext::fillRoundedRect(const IntRect& r, const IntSize& topLeft,
 
     cairo_t* cr = m_data->cr;
     cairo_save(cr);
-    appendWebCorePathToCairoContext(cr, Path::createRoundedRectangle(r, topLeft, topRight, bottomLeft, bottomRight));
+    beginPath();
+    addPath(Path::createRoundedRectangle(r, topLeft, topRight, bottomLeft, bottomRight));
     setColor(cr, color);
     drawPathShadow(this, m_common, true, false);
     cairo_fill(cr);
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
index 97e7e07..5e38832 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
+++ b/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
@@ -95,7 +95,6 @@ public:
 
     cairo_t* cr;
     Vector<float> layers;
-    CairoPath m_pendingPath;
 
 #if PLATFORM(GTK)
     GdkEventExpose* expose;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list