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

Unified Diff: include/gpu/GrPaint.h

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkXfermode.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « include/core/SkXfermode.h ('k') | include/gpu/GrXferProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698