diff options
author | robertphillips <robertphillips@google.com> | 2016-07-27 12:13:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-07-27 12:13:51 -0700 |
commit | 6738c702423226619ee0172c12a3a007c5f68e57 (patch) | |
tree | 96d7941308e92731354cd8e4ef21ecfc900ca7cd /src/effects | |
parent | 81ce4a9c551f5ecbd549b992b1f1e7689049c615 (diff) |
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
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkAlphaThresholdFilter.cpp | 6 | ||||
-rw-r--r-- | src/effects/SkDisplacementMapEffect.cpp | 4 | ||||
-rw-r--r-- | src/effects/SkGpuBlurUtils.cpp | 12 | ||||
-rw-r--r-- | src/effects/SkLightingImageFilter.cpp | 10 | ||||
-rw-r--r-- | src/effects/SkMorphologyImageFilter.cpp | 16 | ||||
-rw-r--r-- | src/effects/SkXfermodeImageFilter.cpp | 8 |
6 files changed, 28 insertions, 28 deletions
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<GrTexture> SkAlphaThresholdFilterImpl::createMaskTexture(GrContext* contex config = kRGBA_8888_GrPixelConfig; } - sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox, - bounds.width(), bounds.height(), - config, nullptr)); + sk_sp<GrDrawContext> 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<SkSpecialImage> SkDisplacementMapEffect::onFilterImage(SkSpecialImage* sou matrix.setTranslate(-SkIntToScalar(colorBounds.x()), -SkIntToScalar(colorBounds.y())); sk_sp<GrDrawContext> 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<GrDrawContext> GaussianBlur(GrContext* context, const int height = dstBounds.height(); const GrPixelConfig config = srcTexture->config(); - sk_sp<GrDrawContext> dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - width, height, config, colorSpace, - 0, kDefault_GrSurfaceOrigin)); + sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + width, height, config, colorSpace, + 0, kDefault_GrSurfaceOrigin)); if (!dstDrawContext) { return nullptr; } @@ -246,9 +246,9 @@ sk_sp<GrDrawContext> GaussianBlur(GrContext* context, return dstDrawContext; } - sk_sp<GrDrawContext> tmpDrawContext(context->newDrawContext(SkBackingFit::kApprox, - width, height, config, colorSpace, - 0, kDefault_GrSurfaceOrigin)); + sk_sp<GrDrawContext> 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<SkSpecialImage> SkLightingImageFilterInternal::filterImageGPU(SkSpecialIma sk_sp<GrTexture> inputTexture(input->asTextureRef(context)); SkASSERT(inputTexture); - sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox, - offsetBounds.width(), - offsetBounds.height(), - kRGBA_8888_GrPixelConfig, - sk_ref_sp(source->getColorSpace()))); + sk_sp<GrDrawContext> 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<SkSpecialImage> apply_morphology(GrContext* context, SkASSERT(radius.width() > 0 || radius.height() > 0); if (radius.fWidth > 0) { - sk_sp<GrDrawContext> dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - rect.width(), rect.height(), - kSkia8888_GrPixelConfig, - colorSpace)); + sk_sp<GrDrawContext> dstDrawContext(context->makeDrawContext(SkBackingFit::kApprox, + rect.width(), rect.height(), + kSkia8888_GrPixelConfig, + colorSpace)); if (!dstDrawContext) { return nullptr; } @@ -507,10 +507,10 @@ static sk_sp<SkSpecialImage> apply_morphology(GrContext* context, srcRect = dstRect; } if (radius.fHeight > 0) { - sk_sp<GrDrawContext> dstDrawContext(context->newDrawContext(SkBackingFit::kApprox, - rect.width(), rect.height(), - kSkia8888_GrPixelConfig, - colorSpace)); + sk_sp<GrDrawContext> 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<SkSpecialImage> SkXfermodeImageFilter::filterImageGPU(SkSpecialImage* sour paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode); - sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox, - bounds.width(), bounds.height(), - kSkia8888_GrPixelConfig, - sk_ref_sp(source->getColorSpace()))); + sk_sp<GrDrawContext> drawContext(context->makeDrawContext(SkBackingFit::kApprox, + bounds.width(), bounds.height(), + kSkia8888_GrPixelConfig, + sk_ref_sp(source->getColorSpace()))); if (!drawContext) { return nullptr; } |