Title: [97319] trunk/Source/WebCore
Revision
97319
Author
[email protected]
Date
2011-10-12 16:59:48 -0700 (Wed, 12 Oct 2011)

Log Message

[skia] Implement Path.currentPoint for skia
https://bugs.webkit.org/show_bug.cgi?id=69817

Replace FIXME with implementation.

Patch by Ben Wells <[email protected]> on 2011-10-12
Reviewed by Kenneth Russell.

* platform/graphics/skia/PathSkia.cpp:
(WebCore::Path::currentPoint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97318 => 97319)


--- trunk/Source/WebCore/ChangeLog	2011-10-12 23:44:10 UTC (rev 97318)
+++ trunk/Source/WebCore/ChangeLog	2011-10-12 23:59:48 UTC (rev 97319)
@@ -1,5 +1,17 @@
 2011-10-12  Ben Wells  <[email protected]>
 
+        [skia] Implement Path.currentPoint for skia
+        https://bugs.webkit.org/show_bug.cgi?id=69817
+
+        Replace FIXME with implementation.
+
+        Reviewed by Kenneth Russell.
+
+        * platform/graphics/skia/PathSkia.cpp:
+        (WebCore::Path::currentPoint):
+
+2011-10-12  Ben Wells  <[email protected]>
+
         Incorrect rendering with one-sided thick border and border-radius
         https://bugs.webkit.org/show_bug.cgi?id=38787
 

Modified: trunk/Source/WebCore/platform/graphics/skia/PathSkia.cpp (97318 => 97319)


--- trunk/Source/WebCore/platform/graphics/skia/PathSkia.cpp	2011-10-12 23:44:10 UTC (rev 97318)
+++ trunk/Source/WebCore/platform/graphics/skia/PathSkia.cpp	2011-10-12 23:59:48 UTC (rev 97319)
@@ -76,7 +76,15 @@
 
 FloatPoint Path::currentPoint() const 
 {
-    // FIXME: return current point of subpath.
+    if (m_path->countPoints() > 0) {
+        SkPoint skResult;
+        m_path->getLastPt(&skResult);
+        FloatPoint result;
+        result.setX(SkScalarToFloat(skResult.fX));
+        result.setY(SkScalarToFloat(skResult.fY));
+        return result;
+    }
+
     float quietNaN = std::numeric_limits<float>::quiet_NaN();
     return FloatPoint(quietNaN, quietNaN);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to