| Index: src/gpu/GrPathRange.h
|
| diff --git a/src/gpu/GrPathRange.h b/src/gpu/GrPathRange.h
|
| index 86883e3c27083c1f07a88175669e5138c4bc8654..035837fc361d74cbecdbb4feb2f60a886ee195de 100644
|
| --- a/src/gpu/GrPathRange.h
|
| +++ b/src/gpu/GrPathRange.h
|
| @@ -10,14 +10,13 @@
|
|
|
| #include "GrGpuResource.h"
|
| #include "SkRefCnt.h"
|
| -#include "SkStrokeRec.h"
|
| #include "SkTArray.h"
|
|
|
| class SkPath;
|
| class SkDescriptor;
|
|
|
| /**
|
| - * Represents a contiguous range of GPU path objects, all with a common stroke.
|
| + * Represents a contiguous range of GPU path objects.
|
| * This object is immutable with the exception that individual paths may be
|
| * initialized lazily.
|
| */
|
| @@ -50,7 +49,9 @@ public:
|
| public:
|
| virtual int getNumPaths() = 0;
|
| virtual void generatePath(int index, SkPath* out) = 0;
|
| +#ifdef SK_DEBUG
|
| virtual bool isEqualTo(const SkDescriptor&) const { return false; }
|
| +#endif
|
| virtual ~PathGenerator() {}
|
| };
|
|
|
| @@ -58,22 +59,22 @@ public:
|
| * Initialize a lazy-loaded path range. This class will generate an SkPath and call
|
| * onInitPath() for each path within the range before it is drawn for the first time.
|
| */
|
| - GrPathRange(GrGpu*, PathGenerator*, const SkStrokeRec& stroke);
|
| + GrPathRange(GrGpu*, PathGenerator*);
|
|
|
| /**
|
| * Initialize an eager-loaded path range. The subclass is responsible for ensuring all
|
| * the paths are initialized up front.
|
| */
|
| - GrPathRange(GrGpu*, int numPaths, const SkStrokeRec& stroke);
|
| -
|
| - virtual bool isEqualTo(const SkDescriptor& desc) const {
|
| - return NULL != fPathGenerator.get() && fPathGenerator->isEqualTo(desc);
|
| - }
|
| + GrPathRange(GrGpu*, int numPaths);
|
|
|
| int getNumPaths() const { return fNumPaths; }
|
| - const SkStrokeRec& getStroke() const { return fStroke; }
|
| const PathGenerator* getPathGenerator() const { return fPathGenerator.get(); }
|
|
|
| +#ifdef SK_DEBUG
|
| + virtual bool isEqualTo(const SkDescriptor& desc) const {
|
| + return NULL != fPathGenerator.get() && fPathGenerator->isEqualTo(desc);
|
| + }
|
| +#endif
|
| protected:
|
| // Initialize a path in the range before drawing. This is only called when
|
| // fPathGenerator is non-null. The child class need not call didChangeGpuMemorySize(),
|
| @@ -89,7 +90,6 @@ private:
|
| mutable SkAutoTUnref<PathGenerator> fPathGenerator;
|
| mutable SkTArray<uint8_t, true /*MEM_COPY*/> fGeneratedPaths;
|
| const int fNumPaths;
|
| - const SkStrokeRec fStroke;
|
|
|
| typedef GrGpuResource INHERITED;
|
| };
|
|
|