From 6738c702423226619ee0172c12a3a007c5f68e57 Mon Sep 17 00:00:00 2001 From: robertphillips Date: Wed, 27 Jul 2016 12:13:51 -0700 Subject: Rename GrContext's newDrawContext & drawContext to makeDrawContext These both return sk_sp. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2186073002 Review-Url: https://codereview.chromium.org/2186073002 --- src/effects/SkAlphaThresholdFilter.cpp | 6 +++--- src/effects/SkDisplacementMapEffect.cpp | 4 ++-- src/effects/SkGpuBlurUtils.cpp | 12 ++++++------ src/effects/SkLightingImageFilter.cpp | 10 +++++----- src/effects/SkMorphologyImageFilter.cpp | 16 ++++++++-------- src/effects/SkXfermodeImageFilter.cpp | 8 ++++---- 6 files changed, 28 insertions(+), 28 deletions(-) (limited to 'src/effects') diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp index f2b74300db..0871d2bc6e 100644 --- a/src/effects/SkAlphaThresholdFilter.cpp +++ b/src/effects/SkAlphaThresholdFilter.cpp @@ -102,9 +102,9 @@ sk_sp SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* contex config = kRGBA_8888_GrPixelConfig; } - sk_sp drawContext(context->newDrawContext(SkBackingFit::kApprox, - bounds.width(), bounds.height(), - config, nullptr)); + sk_sp drawContext(context->makeDrawContext(SkBackingFit::kApprox, + bounds.width(), bounds.height(), + config, nullptr)); if (!drawContext) { return nullptr; } diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index 9370a9fc93..df4103cf06 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -336,8 +336,8 @@ sk_sp SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou matrix.setTranslate(-SkIntToScalar(colorBounds.x()), -SkIntToScalar(colorBounds.y())); sk_sp drawContext( - context->newDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(), - kSkia8888_GrPixelConfig, sk_ref_sp(source->getColorSpace()))); + context->makeDrawContext(SkBackingFit::kApprox, bounds.width(), bounds.height(), + kSkia8888_GrPixelConfig, sk_ref_sp(source->getColorSpace()))); if (!drawContext) { return nullptr; } diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp index aad1c3f24a..869cd76c5b 100644 --- a/src/effects/SkGpuBlurUtils.cpp +++ b/src/effects/SkGpuBlurUtils.cpp @@ -226,9 +226,9 @@ sk_sp GaussianBlur(GrContext* context, const int height = dstBounds.height(); const GrPixelConfig config = srcTexture->config(); - sk_sp dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - width, height, config, colorSpace, - 0, kDefault_GrSurfaceOrigin)); + sk_sp dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + width, height, config, colorSpace, + 0, kDefault_GrSurfaceOrigin)); if (!dstDrawContext) { return nullptr; } @@ -246,9 +246,9 @@ sk_sp GaussianBlur(GrContext* context, return dstDrawContext; } - sk_sp tmpDrawContext(context->newDrawContext(SkBackingFit::kApprox, - width, height, config, colorSpace, - 0, kDefault_GrSurfaceOrigin)); + sk_sp tmpDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + width, height, config, colorSpace, + 0, kDefault_GrSurfaceOrigin)); if (!tmpDrawContext) { return nullptr; } diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index ebe80b0c2c..a9e833539c 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -408,11 +408,11 @@ sk_sp SkLightingImageFilterInternal::filterImageGPU(SkSpecialIma sk_sp inputTexture(input->asTextureRef(context)); SkASSERT(inputTexture); - sk_sp drawContext(context->newDrawContext(SkBackingFit::kApprox, - offsetBounds.width(), - offsetBounds.height(), - kRGBA_8888_GrPixelConfig, - sk_ref_sp(source->getColorSpace()))); + sk_sp drawContext(context->makeDrawContext(SkBackingFit::kApprox, + offsetBounds.width(), + offsetBounds.height(), + kRGBA_8888_GrPixelConfig, + sk_ref_sp(source->getColorSpace()))); if (!drawContext) { return nullptr; } diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 7e27249a13..d5c3a2d190 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -485,10 +485,10 @@ static sk_sp apply_morphology(GrContext* context, SkASSERT(radius.width() > 0 || radius.height() > 0); if (radius.fWidth > 0) { - sk_sp dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - rect.width(), rect.height(), - kSkia8888_GrPixelConfig, - colorSpace)); + sk_sp dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + rect.width(), rect.height(), + kSkia8888_GrPixelConfig, + colorSpace)); if (!dstDrawContext) { return nullptr; } @@ -507,10 +507,10 @@ static sk_sp apply_morphology(GrContext* context, srcRect = dstRect; } if (radius.fHeight > 0) { - sk_sp dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - rect.width(), rect.height(), - kSkia8888_GrPixelConfig, - colorSpace)); + sk_sp dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + rect.width(), rect.height(), + kSkia8888_GrPixelConfig, + colorSpace)); if (!dstDrawContext) { return nullptr; } diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp index 6c3298d31c..c939a4a5e9 100644 --- a/src/effects/SkXfermodeImageFilter.cpp +++ b/src/effects/SkXfermodeImageFilter.cpp @@ -241,10 +241,10 @@ sk_sp SkXfermodeImageFilter::filterImageGPU(SkSpecialImage* sour paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); - sk_sp drawContext(context->newDrawContext(SkBackingFit::kApprox, - bounds.width(), bounds.height(), - kSkia8888_GrPixelConfig, - sk_ref_sp(source->getColorSpace()))); + sk_sp drawContext(context->makeDrawContext(SkBackingFit::kApprox, + bounds.width(), bounds.height(), + kSkia8888_GrPixelConfig, + sk_ref_sp(source->getColorSpace()))); if (!drawContext) { return nullptr; } -- cgit v1.2.3