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

Unified Diff: src/effects/SkMorphologyImageFilter.cpp

Issue 1918003003: Bring sk_sp to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 8 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
Index: src/effects/SkMorphologyImageFilter.cpp
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 810d0e13e4f6ae7fd8abd5d11e978c293afbbb68..9e87fe04a41a4c00dbc41898277e0b7d7460e69f 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -496,13 +496,13 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context,
if (!scratch) {
return nullptr;
}
- SkAutoTUnref<GrDrawContext> dstDrawContext(
- context->drawContext(scratch->asRenderTarget()));
+ sk_sp<GrDrawContext> dstDrawContext(
+ context->drawContext(sk_ref_sp(scratch->asRenderTarget())));
if (!dstDrawContext) {
return nullptr;
}
- apply_morphology_pass(dstDrawContext, clip, srcTexture.get(),
+ apply_morphology_pass(dstDrawContext.get(), clip, srcTexture.get(),
srcRect, dstRect, radius.fWidth, morphType,
Gr1DKernelEffect::kX_Direction);
SkIRect clearRect = SkIRect::MakeXYWH(dstRect.fLeft, dstRect.fBottom,
@@ -520,13 +520,13 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context,
if (!scratch) {
return nullptr;
}
- SkAutoTUnref<GrDrawContext> dstDrawContext(
- context->drawContext(scratch->asRenderTarget()));
+ sk_sp<GrDrawContext> dstDrawContext(
+ context->drawContext(sk_ref_sp(scratch->asRenderTarget())));
if (!dstDrawContext) {
return nullptr;
}
- apply_morphology_pass(dstDrawContext, clip, srcTexture.get(),
+ apply_morphology_pass(dstDrawContext.get(), clip, srcTexture.get(),
srcRect, dstRect, radius.fHeight, morphType,
Gr1DKernelEffect::kY_Direction);

Powered by Google App Engine
This is Rietveld 408576698