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

paroga at webkit.org paroga at webkit.org
Wed Dec 22 17:55:41 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit c4c09cd080f9895f3907d426998ea4c72f23890e
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 2 20:36:04 2010 +0000

    2010-12-02  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by Andreas Kling.
    
            [WINCE] Remove "current path" of GraphicsContext
            https://bugs.webkit.org/show_bug.cgi?id=50284
    
            * platform/graphics/GraphicsContext.h:
            * platform/graphics/wince/GraphicsContextWinCE.cpp:
            (WebCore::GraphicsContext::fillPath):
            (WebCore::GraphicsContext::strokePath):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73183 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 4f1b676..e9e196e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-02  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        [WINCE] Remove "current path" of GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=50284
+
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/wince/GraphicsContextWinCE.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+
 2010-12-02  Johnny Ding  <jnd at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 0134510..9dbbabf 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -301,7 +301,7 @@ namespace WebCore {
 
         void setCompositeOperation(CompositeOperator);
 
-#if PLATFORM(SKIA) || PLATFORM(OPENVG) || OS(WINCE)
+#if PLATFORM(SKIA) || PLATFORM(OPENVG)
         void beginPath();
         void addPath(const Path&);
 #endif
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp b/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
index 4faa29d..917d585 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
@@ -173,7 +173,6 @@ public:
 
     AffineTransform m_transform;
     float m_opacity;
-    Vector<Path> m_paths;
 };
 
 enum AlphaPaintType {
@@ -1182,16 +1181,6 @@ void GraphicsContext::setCompositeOperation(CompositeOperator op)
     notImplemented();
 }
 
-void GraphicsContext::beginPath()
-{
-    m_data->m_paths.clear();
-}
-
-void GraphicsContext::addPath(const Path& path)
-{
-    m_data->m_paths.append(path);
-}
-
 void GraphicsContext::clip(const Path& path)
 {
     notImplemented();
@@ -1327,10 +1316,6 @@ Color gradientAverageColor(const Gradient* gradient)
 
 void GraphicsContext::fillPath(const Path& path)
 {
-    // FIXME: Be smarter about this.
-    beginPath();
-    addPath(path);
-
     Color c = m_common->state.fillGradient
         ? gradientAverageColor(m_common->state.fillGradient.get())
         : fillColor();
@@ -1345,33 +1330,30 @@ void GraphicsContext::fillPath(const Path& path)
     OwnPtr<HBRUSH> brush = createBrush(c);
 
     if (m_data->m_opacity < 1.0f || m_data->hasAlpha()) {
-        for (Vector<Path>::const_iterator i = m_data->m_paths.begin(); i != m_data->m_paths.end(); ++i) {
-            IntRect trRect = enclosingIntRect(m_data->mapRect(i->boundingRect()));
-            trRect.inflate(1);
-            TransparentLayerDC transparentDC(m_data, trRect);
-            HDC dc = transparentDC.hdc();
-            if (!dc)
-                continue;
-
-            AffineTransform tr = m_data->m_transform;
-            tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
-
-            SelectObject(dc, GetStockObject(NULL_PEN));
-            HGDIOBJ oldBrush = SelectObject(dc, brush.get());
-            i->platformPath()->fillPath(dc, &tr);
-            SelectObject(dc, oldBrush);
-        }
+        IntRect trRect = enclosingIntRect(m_data->mapRect(path.boundingRect()));
+        trRect.inflate(1);
+        TransparentLayerDC transparentDC(m_data, trRect);
+        HDC dc = transparentDC.hdc();
+        if (!dc)
+            return;
+
+        AffineTransform tr = m_data->m_transform;
+        tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
+
+        SelectObject(dc, GetStockObject(NULL_PEN));
+        HGDIOBJ oldBrush = SelectObject(dc, brush.get());
+        path.platformPath()->fillPath(dc, &tr);
+        SelectObject(dc, oldBrush);
     } else {
         SelectObject(m_data->m_dc, GetStockObject(NULL_PEN));
         HGDIOBJ oldBrush = SelectObject(m_data->m_dc, brush.get());
-        for (Vector<Path>::const_iterator i = m_data->m_paths.begin(); i != m_data->m_paths.end(); ++i)
-            i->platformPath()->fillPath(m_data->m_dc, &m_data->m_transform);
+        path.platformPath()->fillPath(m_data->m_dc, &m_data->m_transform);
         SelectObject(m_data->m_dc, oldBrush);
     }
 }
 
 
-void GraphicsContext::strokePath()
+void GraphicsContext::strokePath(const Path& path)
 {
     if (!m_data->m_opacity)
         return;
@@ -1380,34 +1362,27 @@ void GraphicsContext::strokePath()
     if (!m_data->m_dc)
         return;
 
-    // FIXME: Be smarter about this.
-    beginPath();
-    addPath(path);
-
     OwnPtr<HPEN> pen = createPen(strokeColor(), strokeThickness(), strokeStyle());
 
     if (m_data->m_opacity < 1.0f || m_data->hasAlpha()) {
-        for (Vector<Path>::const_iterator i = m_data->m_paths.begin(); i != m_data->m_paths.end(); ++i) {
-            IntRect trRect = enclosingIntRect(m_data->mapRect(i->boundingRect()));
-            trRect.inflate(1);
-            TransparentLayerDC transparentDC(m_data, trRect);
-            HDC dc = transparentDC.hdc();
-            if (!dc)
-                continue;
-
-            AffineTransform tr = m_data->m_transform;
-            tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
-
-            SelectObject(dc, GetStockObject(NULL_BRUSH));
-            HGDIOBJ oldPen = SelectObject(dc, pen.get());
-            i->platformPath()->strokePath(dc, &tr);
-            SelectObject(dc, oldPen);
-        }
+        IntRect trRect = enclosingIntRect(m_data->mapRect(path.boundingRect()));
+        trRect.inflate(1);
+        TransparentLayerDC transparentDC(m_data, trRect);
+        HDC dc = transparentDC.hdc();
+        if (!dc)
+            return;
+
+        AffineTransform tr = m_data->m_transform;
+        tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height());
+
+        SelectObject(dc, GetStockObject(NULL_BRUSH));
+        HGDIOBJ oldPen = SelectObject(dc, pen.get());
+        path.platformPath()->strokePath(dc, &tr);
+        SelectObject(dc, oldPen);
     } else {
         SelectObject(m_data->m_dc, GetStockObject(NULL_BRUSH));
         HGDIOBJ oldPen = SelectObject(m_data->m_dc, pen.get());
-        for (Vector<Path>::const_iterator i = m_data->m_paths.begin(); i != m_data->m_paths.end(); ++i)
-            i->platformPath()->strokePath(m_data->m_dc, &m_data->m_transform);
+        path.platformPath()->strokePath(m_data->m_dc, &m_data->m_transform);
         SelectObject(m_data->m_dc, oldPen);
     }
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list