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

Side by Side Diff: include/effects/Sk1DPathEffect.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: rebase 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
« no previous file with comments | « include/core/SkXfermode.h ('k') | include/effects/Sk2DPathEffect.h » ('j') | 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 * 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 Sk1DPathEffect_DEFINED 8 #ifndef Sk1DPathEffect_DEFINED
9 #define Sk1DPathEffect_DEFINED 9 #define Sk1DPathEffect_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return SkNEW_ARGS(SkPath1DPathEffect, (path, advance, phase, style)); 57 return SkNEW_ARGS(SkPath1DPathEffect, (path, advance, phase, style));
58 } 58 }
59 59
60 virtual bool filterPath(SkPath*, const SkPath&, 60 virtual bool filterPath(SkPath*, const SkPath&,
61 SkStrokeRec*, const SkRect*) const SK_OVERRIDE; 61 SkStrokeRec*, const SkRect*) const SK_OVERRIDE;
62 62
63 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath1DPathEffect) 63 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPath1DPathEffect)
64 64
65 protected: 65 protected:
66 SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Sty le); 66 SkPath1DPathEffect(const SkPath& path, SkScalar advance, SkScalar phase, Sty le);
67 #ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
67 explicit SkPath1DPathEffect(SkReadBuffer& buffer); 68 explicit SkPath1DPathEffect(SkReadBuffer& buffer);
69 #endif
68 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; 70 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
69 71
70 // overrides from Sk1DPathEffect 72 // overrides from Sk1DPathEffect
71 virtual SkScalar begin(SkScalar contourLength) const SK_OVERRIDE; 73 virtual SkScalar begin(SkScalar contourLength) const SK_OVERRIDE;
72 virtual SkScalar next(SkPath*, SkScalar, SkPathMeasure&) const SK_OVERRIDE; 74 virtual SkScalar next(SkPath*, SkScalar, SkPathMeasure&) const SK_OVERRIDE;
73 75
74 private: 76 private:
75 SkPath fPath; // copied from constructor 77 SkPath fPath; // copied from constructor
76 SkScalar fAdvance; // copied from constructor 78 SkScalar fAdvance; // copied from constructor
77 SkScalar fInitialOffset; // computed from phase 79 SkScalar fInitialOffset; // computed from phase
78 Style fStyle; // copied from constructor 80 Style fStyle; // copied from constructor
79 81
80 typedef Sk1DPathEffect INHERITED; 82 typedef Sk1DPathEffect INHERITED;
81 }; 83 };
82 84
83 #endif 85 #endif
OLDNEW
« no previous file with comments | « include/core/SkXfermode.h ('k') | include/effects/Sk2DPathEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698