Index: src/core/SkXfermode.cpp |
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp |
index b6d23888a741d7611eb4c7a72c7937680b045d96..38ff8e9429b3a67223065ae076d50340c09f81d6 100644 |
--- a/src/core/SkXfermode.cpp |
+++ b/src/core/SkXfermode.cpp |
@@ -985,15 +985,15 @@ bool SkXfermode::asMode(Mode* mode) const { |
} |
#if SK_SUPPORT_GPU |
-const GrFragmentProcessor* SkXfermode::getFragmentProcessorForImageFilter( |
- const GrFragmentProcessor*) const { |
+sk_sp<GrFragmentProcessor> SkXfermode::makeFragmentProcessorForImageFilter( |
+ sk_sp<GrFragmentProcessor>) const { |
// This should never be called. |
// TODO: make pure virtual in SkXfermode once Android update lands |
SkASSERT(0); |
return nullptr; |
} |
-GrXPFactory* SkXfermode::asXPFactory() const { |
+sk_sp<GrXPFactory> SkXfermode::asXPFactory() const { |
// This should never be called. |
// TODO: make pure virtual in SkXfermode once Android update lands |
SkASSERT(0); |
@@ -1240,25 +1240,26 @@ void SkProcCoeffXfermode::xferA8(SkAlpha* SK_RESTRICT dst, |
} |
#if SK_SUPPORT_GPU |
bungeman-skia
2016/06/08 18:22:16
These includes should go at the top of the file, e
bsalomon
2016/06/08 19:50:50
Yep, I think the placing of includes intermixed wi
|
+#include "GrFragmentProcessor.h" |
#include "effects/GrCustomXfermode.h" |
#include "effects/GrPorterDuffXferProcessor.h" |
#include "effects/GrXfermodeFragmentProcessor.h" |
-const GrFragmentProcessor* SkProcCoeffXfermode::getFragmentProcessorForImageFilter( |
- const GrFragmentProcessor* dst) const { |
+sk_sp<GrFragmentProcessor> SkProcCoeffXfermode::makeFragmentProcessorForImageFilter( |
+ sk_sp<GrFragmentProcessor> dst) const { |
SkASSERT(dst); |
- return GrXfermodeFragmentProcessor::CreateFromDstProcessor(dst, fMode); |
+ return GrXfermodeFragmentProcessor::MakeFromDstProcessor(std::move(dst), fMode); |
} |
-GrXPFactory* SkProcCoeffXfermode::asXPFactory() const { |
+sk_sp<GrXPFactory> SkProcCoeffXfermode::asXPFactory() const { |
if (CANNOT_USE_COEFF != fSrcCoeff) { |
- GrXPFactory* result = GrPorterDuffXPFactory::Create(fMode); |
+ sk_sp<GrXPFactory> result(GrPorterDuffXPFactory::Make(fMode)); |
SkASSERT(result); |
return result; |
} |
SkASSERT(GrCustomXfermode::IsSupportedMode(fMode)); |
- return GrCustomXfermode::CreateXPFactory(fMode); |
+ return GrCustomXfermode::MakeXPFactory(fMode); |
} |
#endif |