| Index: include/gpu/GrPaint.h
|
| diff --git a/include/gpu/GrPaint.h b/include/gpu/GrPaint.h
|
| index 9d0fe5575e730fd0b2bbe0d4bc85c071fc29ccee..152cb51d7e7144373e360abf0c611c92db453c91 100644
|
| --- a/include/gpu/GrPaint.h
|
| +++ b/include/gpu/GrPaint.h
|
| @@ -57,7 +57,7 @@ public:
|
| bool isAntiAlias() const { return fAntiAlias; }
|
|
|
| const GrXPFactory* setXPFactory(const GrXPFactory* xpFactory) {
|
| - fXPFactory.reset(SkRef(xpFactory));
|
| + fXPFactory.reset(SkSafeRef(xpFactory));
|
| return xpFactory;
|
| }
|
|
|
| @@ -100,10 +100,7 @@ public:
|
| this->numCoverageFragmentProcessors(); }
|
|
|
| const GrXPFactory* getXPFactory() const {
|
| - if (!fXPFactory) {
|
| - fXPFactory.reset(GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode));
|
| - }
|
| - return fXPFactory.get();
|
| + return fXPFactory;
|
| }
|
|
|
| const GrFragmentProcessor* getColorFragmentProcessor(int i) const {
|
| @@ -127,7 +124,7 @@ public:
|
| fCoverageFragmentProcessors[i]->ref();
|
| }
|
|
|
| - fXPFactory.reset(SkRef(paint.getXPFactory()));
|
| + fXPFactory.reset(SkSafeRef(paint.getXPFactory()));
|
|
|
| return *this;
|
| }
|
|
|