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

Unified Diff: src/core/SkModeColorFilter.cpp

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 months 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 | « src/core/SkModeColorFilter.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkModeColorFilter.cpp
diff --git a/src/core/SkModeColorFilter.cpp b/src/core/SkModeColorFilter.cpp
index eacd261b5cb97eccecbfde904c29f817359d2058..ba3b50d763b1ea7f1c67fbd638515190c16b5c28 100644
--- a/src/core/SkModeColorFilter.cpp
+++ b/src/core/SkModeColorFilter.cpp
@@ -91,16 +91,16 @@ sk_sp<SkFlattenable> SkModeColorFilter::CreateProc(SkReadBuffer& buffer) {
#include "effects/GrConstColorProcessor.h"
#include "SkGr.h"
-const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*) const {
+sk_sp<GrFragmentProcessor> SkModeColorFilter::asFragmentProcessor(GrContext*) const {
if (SkXfermode::kDst_Mode == fMode) {
return nullptr;
}
- SkAutoTUnref<const GrFragmentProcessor> constFP(
- GrConstColorProcessor::Create(SkColorToPremulGrColor(fColor),
- GrConstColorProcessor::kIgnore_InputMode));
- const GrFragmentProcessor* fp =
- GrXfermodeFragmentProcessor::CreateFromSrcProcessor(constFP, fMode);
+ sk_sp<GrFragmentProcessor> constFP(
+ GrConstColorProcessor::Make(SkColorToPremulGrColor(fColor),
+ GrConstColorProcessor::kIgnore_InputMode));
+ sk_sp<GrFragmentProcessor> fp(
+ GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std::move(constFP), fMode));
if (!fp) {
return nullptr;
}
« no previous file with comments | « src/core/SkModeColorFilter.h ('k') | src/core/SkPictureShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698