aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-05 19:07:21 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-05 19:07:21 +0000
commit935ad026826fb7d31d562ff7326b84ec3a827456 (patch)
tree3579e7292b147aa8cdb8cdc0182756087207be98 /include
parentf6c7e72c2c79537c4a56f5baefc79c073c80054e (diff)
Add drawPoints dash bench
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPathEffect.h11
1 files changed, 8 insertions, 3 deletions
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<SkPoint> 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)