[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:43 UTC 2010


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

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

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index e9e196e..8235c95 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -2,6 +2,24 @@
 
         Reviewed by Andreas Kling.
 
+        [OpenVG] Remove "current path" of GraphicsContext
+        https://bugs.webkit.org/show_bug.cgi?id=50294
+
+        * platform/graphics/GraphicsContext.h:
+        * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::clipPath):
+        * platform/graphics/openvg/PainterOpenVG.cpp:
+        (WebCore::PainterOpenVG::PainterOpenVG):
+        (WebCore::PainterOpenVG::~PainterOpenVG):
+        (WebCore::PainterOpenVG::drawPath):
+        * platform/graphics/openvg/PainterOpenVG.h:
+
+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
 
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 9dbbabf..551adc3 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)
+#if PLATFORM(SKIA)
         void beginPath();
         void addPath(const Path&);
 #endif
diff --git a/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
index 04a5e26..5b1eb1d 100644
--- a/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
@@ -144,11 +144,7 @@ void GraphicsContext::fillPath(const Path& path)
     if (paintingDisabled())
         return;
 
-    // FIXME: Be smarter about this.
-    beginPath();
-    addPath(path);
-
-    m_data->drawPath(VG_FILL_PATH, m_common->state.fillRule);
+    m_data->drawPath(path, VG_FILL_PATH, m_common->state.fillRule);
 }
 
 void GraphicsContext::strokePath(const Path& path)
@@ -156,11 +152,7 @@ void GraphicsContext::strokePath(const Path& path)
     if (paintingDisabled())
         return;
 
-    // FIXME: Be smarter about this.
-    beginPath();
-    addPath(path);
-
-    m_data->drawPath(VG_STROKE_PATH, m_common->state.fillRule);
+    m_data->drawPath(path, VG_STROKE_PATH, m_common->state.fillRule);
 }
 
 void GraphicsContext::fillRect(const FloatRect& rect)
@@ -197,22 +189,6 @@ void GraphicsContext::fillRoundedRect(const IntRect& rect, const IntSize& topLef
     UNUSED_PARAM(colorSpace); // FIXME
 }
 
-void GraphicsContext::beginPath()
-{
-    if (paintingDisabled())
-        return;
-
-    m_data->beginPath();
-}
-
-void GraphicsContext::addPath(const Path& path)
-{
-    if (paintingDisabled())
-        return;
-
-    m_data->addPath(path);
-}
-
 void GraphicsContext::clip(const FloatRect& rect)
 {
     if (paintingDisabled())
@@ -226,11 +202,7 @@ void GraphicsContext::clipPath(const Path& path, WindRule clipRule)
     if (paintingDisabled())
         return;
 
-    // FIXME: Be smarter about this.
-    beginPath();
-    addPath(path);
-
-    m_data->clipPath(*(m_data->currentPath()), PainterOpenVG::IntersectClip, clipRule);
+    m_data->clipPath(path, PainterOpenVG::IntersectClip, clipRule);
 }
 
 void GraphicsContext::drawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color)
diff --git a/WebCore/platform/graphics/openvg/PainterOpenVG.cpp b/WebCore/platform/graphics/openvg/PainterOpenVG.cpp
index b2f2302..7409a97 100644
--- a/WebCore/platform/graphics/openvg/PainterOpenVG.cpp
+++ b/WebCore/platform/graphics/openvg/PainterOpenVG.cpp
@@ -399,14 +399,12 @@ struct PlatformPainterState {
 PainterOpenVG::PainterOpenVG()
     : m_state(0)
     , m_surface(0)
-    , m_currentPath(0)
 {
 }
 
 PainterOpenVG::PainterOpenVG(SurfaceOpenVG* surface)
     : m_state(0)
     , m_surface(0)
-    , m_currentPath(0)
 {
     ASSERT(surface);
     begin(surface);
@@ -415,7 +413,6 @@ PainterOpenVG::PainterOpenVG(SurfaceOpenVG* surface)
 PainterOpenVG::~PainterOpenVG()
 {
     end();
-    delete m_currentPath;
 }
 
 void PainterOpenVG::begin(SurfaceOpenVG* surface)
@@ -717,26 +714,7 @@ void PainterOpenVG::translate(float dx, float dy)
     setTransformation(transformation);
 }
 
-void PainterOpenVG::beginPath()
-{
-    delete m_currentPath;
-    m_currentPath = new Path();
-}
-
-void PainterOpenVG::addPath(const Path& path)
-{
-    m_currentPath->platformPath()->makeCompatibleContextCurrent();
-
-    vgAppendPath(m_currentPath->platformPath()->vgPath(), path.platformPath()->vgPath());
-    ASSERT_VG_NO_ERROR();
-}
-
-Path* PainterOpenVG::currentPath() const
-{
-    return m_currentPath;
-}
-
-void PainterOpenVG::drawPath(VGbitfield specifiedPaintModes, WindRule fillRule)
+void PainterOpenVG::drawPath(const Path& path, VGbitfield specifiedPaintModes, WindRule fillRule)
 {
     ASSERT(m_state);
 
@@ -754,7 +732,7 @@ void PainterOpenVG::drawPath(VGbitfield specifiedPaintModes, WindRule fillRule)
     m_surface->makeCurrent();
 
     vgSeti(VG_FILL_RULE, toVGFillRule(fillRule));
-    vgDrawPath(m_currentPath->platformPath()->vgPath(), paintModes);
+    vgDrawPath(path.platformPath()->vgPath(), paintModes);
     ASSERT_VG_NO_ERROR();
 }
 
diff --git a/WebCore/platform/graphics/openvg/PainterOpenVG.h b/WebCore/platform/graphics/openvg/PainterOpenVG.h
index e4c6688..24fd8a0 100644
--- a/WebCore/platform/graphics/openvg/PainterOpenVG.h
+++ b/WebCore/platform/graphics/openvg/PainterOpenVG.h
@@ -111,10 +111,7 @@ public:
     void rotate(float radians);
     void translate(float dx, float dy);
 
-    void beginPath();
-    void addPath(const Path&);
-    Path* currentPath() const;
-    void drawPath(VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH), WindRule fillRule = RULE_NONZERO);
+    void drawPath(const Path&, VGbitfield paintModes = (VG_STROKE_PATH | VG_FILL_PATH), WindRule fillRule = RULE_NONZERO);
 
     void intersectClipRect(const FloatRect&);
     void clipPath(const Path&, PainterOpenVG::ClipOperation, WindRule clipRule = RULE_NONZERO);
@@ -137,7 +134,6 @@ private:
     Vector<PlatformPainterState*> m_stateStack;
     PlatformPainterState* m_state;
     SurfaceOpenVG* m_surface;
-    Path* m_currentPath;
 };
 
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list