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

Unified Diff: src/gpu/GrYUVProvider.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/gpu/GrTextureToYUVPlanes.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrYUVProvider.cpp
diff --git a/src/gpu/GrYUVProvider.cpp b/src/gpu/GrYUVProvider.cpp
index a7281da27b2e740ffafdea57aa8a0043b74c8193..b30ff1fa3ce9434c469014d869943570d0c3b42d 100644
--- a/src/gpu/GrYUVProvider.cpp
+++ b/src/gpu/GrYUVProvider.cpp
@@ -121,13 +121,12 @@ sk_sp<GrTexture> GrYUVProvider::refAsTexture(GrContext* ctx,
}
GrPaint paint;
- SkAutoTUnref<const GrFragmentProcessor> yuvToRgbProcessor(
- GrYUVEffect::CreateYUVToRGB(yuvTextures[0],
- yuvTextures[1],
- yuvTextures[2],
- yuvInfo.fSizeInfo.fSizes,
- yuvInfo.fColorSpace));
- paint.addColorFragmentProcessor(yuvToRgbProcessor);
+ sk_sp<GrFragmentProcessor> yuvToRgbProcessor(GrYUVEffect::MakeYUVToRGB(yuvTextures[0],
+ yuvTextures[1],
+ yuvTextures[2],
+ yuvInfo.fSizeInfo.fSizes,
+ yuvInfo.fColorSpace));
+ paint.addColorFragmentProcessor(std::move(yuvToRgbProcessor));
// If we're decoding an sRGB image, the result of our linear math on the YUV planes is already
// in sRGB. (The encoding is just math on bytes, with no concept of color spaces.) So, we need
@@ -139,7 +138,7 @@ sk_sp<GrTexture> GrYUVProvider::refAsTexture(GrContext* ctx,
if (ctx->caps()->srgbWriteControl()) {
paint.setDisableOutputConversionToSRGB(true);
} else {
- paint.addColorFragmentProcessor(GrGammaEffect::Create(2.2f))->unref();
+ paint.addColorFragmentProcessor(GrGammaEffect::Make(2.2f));
}
}
« no previous file with comments | « src/gpu/GrTextureToYUVPlanes.cpp ('k') | src/gpu/SkGpuDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698