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

Unified Diff: src/core/SkBitmapProcShader.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/SkBitmapProcShader.h ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcShader.cpp
diff --git a/src/core/SkBitmapProcShader.cpp b/src/core/SkBitmapProcShader.cpp
index e140f0feb04bc89f53549718f31fa69999351f9f..972d73173fc4847b82fede1480f7dafaf9a7fc9a 100644
--- a/src/core/SkBitmapProcShader.cpp
+++ b/src/core/SkBitmapProcShader.cpp
@@ -410,7 +410,7 @@ void SkBitmapProcShader::toString(SkString* str) const {
#include "SkGr.h"
#include "effects/GrSimpleTextureEffect.h"
-const GrFragmentProcessor* SkBitmapProcShader::asFragmentProcessor(GrContext* context,
+sk_sp<GrFragmentProcessor> SkBitmapProcShader::asFragmentProcessor(GrContext* context,
const SkMatrix& viewM, const SkMatrix* localMatrix,
SkFilterQuality filterQuality,
SkSourceGammaTreatment gammaTreatment) const {
@@ -453,17 +453,17 @@ const GrFragmentProcessor* SkBitmapProcShader::asFragmentProcessor(GrContext* co
return nullptr;
}
- SkAutoTUnref<const GrFragmentProcessor> inner;
+ sk_sp<GrFragmentProcessor> inner;
if (doBicubic) {
- inner.reset(GrBicubicEffect::Create(texture, matrix, tm));
+ inner = GrBicubicEffect::Make(texture, matrix, tm);
} else {
- inner.reset(GrSimpleTextureEffect::Create(texture, matrix, params));
+ inner = GrSimpleTextureEffect::Make(texture, matrix, params);
}
if (kAlpha_8_SkColorType == fRawBitmap.colorType()) {
- return GrFragmentProcessor::MulOutputByInputUnpremulColor(inner);
+ return GrFragmentProcessor::MulOutputByInputUnpremulColor(std::move(inner));
}
- return GrFragmentProcessor::MulOutputByInputAlpha(inner);
+ return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
#endif
« no previous file with comments | « src/core/SkBitmapProcShader.h ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698