From 935ad026826fb7d31d562ff7326b84ec3a827456 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Wed, 5 Dec 2012 19:07:21 +0000 Subject: Add drawPoints dash bench https://codereview.appspot.com/6866053/ git-svn-id: http://skia.googlecode.com/svn/trunk@6678 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/core/SkPathEffect.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/core') diff --git a/include/core/SkPathEffect.h b/include/core/SkPathEffect.h index c59d053657..ee4c189fbc 100644 --- a/include/core/SkPathEffect.h +++ b/include/core/SkPathEffect.h @@ -141,12 +141,16 @@ public: class PointData { public: PointData() - : fFlags(0) { + : fFlags(0) + , fPoints(NULL) + , fNumPoints(0) { fSize.set(SK_Scalar1, SK_Scalar1); // 'asPoints' needs to initialize/fill-in 'fClipRect' if it sets // the kUseClip flag }; - ~PointData() {}; + ~PointData() { + delete [] fPoints; + } // TODO: consider using passed-in flags to limit the work asPoints does. // For example, a kNoPath flag could indicate don't bother generating @@ -161,7 +165,8 @@ public: uint32_t fFlags; // flags that impact the drawing of the points // TODO: consider replacing the TDArray with either SkData or a ptr/len field - SkTDArray fPoints; // the center point of each generated point + SkPoint* fPoints; // the center point of each generated point + int fNumPoints; // number of points in fPoints SkVector fSize; // the size to draw the points SkRect fClipRect; // clip required to draw the points (if kUseClip is set) SkPath fPath; // 'stamp' to be used at each point (if kUsePath is set) -- cgit v1.2.3