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

Side by Side Diff: include/effects/SkDashPathEffect.h

Issue 395603002: Simplify flattening to just write enough to call the factory (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkDashPathEffect_DEFINED 8 #ifndef SkDashPathEffect_DEFINED
9 #define SkDashPathEffect_DEFINED 9 #define SkDashPathEffect_DEFINED
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual bool asPoints(PointData* results, const SkPath& src, 48 virtual bool asPoints(PointData* results, const SkPath& src,
49 const SkStrokeRec&, const SkMatrix&, 49 const SkStrokeRec&, const SkMatrix&,
50 const SkRect*) const SK_OVERRIDE; 50 const SkRect*) const SK_OVERRIDE;
51 51
52 virtual DashType asADash(DashInfo* info) const SK_OVERRIDE; 52 virtual DashType asADash(DashInfo* info) const SK_OVERRIDE;
53 53
54 virtual Factory getFactory() const SK_OVERRIDE; 54 virtual Factory getFactory() const SK_OVERRIDE;
55 55
56 static SkFlattenable* CreateProc(SkReadBuffer&); 56 static SkFlattenable* CreateProc(SkReadBuffer&);
57 57
58 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
59 static SkFlattenable* DeepCreateProc(SkReadBuffer& buffer);
60 #endif
61
58 protected: 62 protected:
59 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase); 63 SkDashPathEffect(const SkScalar intervals[], int count, SkScalar phase);
60 explicit SkDashPathEffect(SkReadBuffer&); 64 explicit SkDashPathEffect(SkReadBuffer&);
61 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 65 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
62 66
63 private: 67 private:
64 SkScalar* fIntervals; 68 SkScalar* fIntervals;
65 int32_t fCount; 69 int32_t fCount;
66 SkScalar fPhase; 70 SkScalar fPhase;
67 // computed from phase 71 // computed from phase
68 SkScalar fInitialDashLength; 72 SkScalar fInitialDashLength;
69 int32_t fInitialDashIndex; 73 int32_t fInitialDashIndex;
70 SkScalar fIntervalLength; 74 SkScalar fIntervalLength;
71 75
72 typedef SkPathEffect INHERITED; 76 typedef SkPathEffect INHERITED;
73 }; 77 };
74 78
75 #endif 79 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698