Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: src/effects/SkDashPathEffect.cpp

Issue 270223003: Fix Dash Effect readback calc for fPhase from old skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkDashPathEffect.h" 10 #include "SkDashPathEffect.h"
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 buffer.readScalarArray(fIntervals, fCount); 561 buffer.readScalarArray(fIntervals, fCount);
562 } else { 562 } else {
563 fIntervals = NULL; 563 fIntervals = NULL;
564 } 564 }
565 565
566 if (useOldPic) { 566 if (useOldPic) {
567 fPhase = 0; 567 fPhase = 0;
568 for (int i = 0; i < fInitialDashIndex; ++i) { 568 for (int i = 0; i < fInitialDashIndex; ++i) {
569 fPhase += fIntervals[i]; 569 fPhase += fIntervals[i];
570 } 570 }
571 fPhase += fInitialDashLength; 571 fPhase += fIntervals[fInitialDashIndex] - fInitialDashLength;
572 } else { 572 } else {
573 this->setInternalMembers(fPhase); 573 this->setInternalMembers(fPhase);
574 } 574 }
575 } 575 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698