Fix Dash Effect readback calc for fPhase from old skps
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 May 2014 17:35:05 +0000 (17:35 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 7 May 2014 17:35:05 +0000 (17:35 +0000)
BUG=skia:
R=reed@google.com, bsalomon@google.com

Author: egdaniel@google.com

Review URL: https://codereview.chromium.org/270223003

git-svn-id: http://skia.googlecode.com/svn/trunk@14620 2bbb7eff-a529-9590-31e7-b0007b416f81

src/effects/SkDashPathEffect.cpp

index 6f132e0be573a568dcda60a45ee11f31d8daecb4..24361bd3697bbbc686f4267c149202507e9d4191 100644 (file)
@@ -568,7 +568,7 @@ SkDashPathEffect::SkDashPathEffect(SkReadBuffer& buffer) : INHERITED(buffer) {
         for (int i = 0; i < fInitialDashIndex; ++i) {
             fPhase += fIntervals[i];
         }
-        fPhase += fInitialDashLength;
+        fPhase += fIntervals[fInitialDashIndex] - fInitialDashLength;
     } else {
         this->setInternalMembers(fPhase);
     }