aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkAlphaThresholdFilter.cpp4
-rw-r--r--src/effects/SkDisplacementMapEffect.cpp3
-rw-r--r--src/effects/SkGpuBlurUtils.cpp6
-rw-r--r--src/effects/SkLightingImageFilter.cpp3
-rw-r--r--src/effects/SkMorphologyImageFilter.cpp6
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp3
6 files changed, 9 insertions, 16 deletions
diff --git a/src/effects/SkAlphaThresholdFilter.cpp b/src/effects/SkAlphaThresholdFilter.cpp
index c9d72bb673..dda265d8bf 100644
--- a/src/effects/SkAlphaThresholdFilter.cpp
+++ b/src/effects/SkAlphaThresholdFilter.cpp
@@ -273,8 +273,8 @@ bool SkAlphaThresholdFilterImpl::asFragmentProcessor(GrFragmentProcessor** fp,
// the outside.
maskDesc.fWidth = texture->width();
maskDesc.fHeight = texture->height();
- SkAutoTUnref<GrTexture> maskTexture(context->textureProvider()->refScratchTexture(
- maskDesc, GrTextureProvider::kApprox_ScratchTexMatch));
+ SkAutoTUnref<GrTexture> maskTexture(
+ context->textureProvider()->createApproxTexture(maskDesc));
if (!maskTexture) {
return false;
}
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index 11332b10da..fa61da97ca 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -428,8 +428,7 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src,
desc.fHeight = bounds.height();
desc.fConfig = kSkia8888_GrPixelConfig;
- SkAutoTUnref<GrTexture> dst(context->textureProvider()->refScratchTexture(desc,
- GrTextureProvider::kApprox_ScratchTexMatch));
+ SkAutoTUnref<GrTexture> dst(context->textureProvider()->createApproxTexture(desc));
if (!dst) {
return false;
diff --git a/src/effects/SkGpuBlurUtils.cpp b/src/effects/SkGpuBlurUtils.cpp
index 401057b24b..7c239a1bc3 100644
--- a/src/effects/SkGpuBlurUtils.cpp
+++ b/src/effects/SkGpuBlurUtils.cpp
@@ -183,14 +183,12 @@ GrTexture* GaussianBlur(GrContext* context,
GrTexture* tempTexture;
SkAutoTUnref<GrTexture> temp1, temp2;
- temp1.reset(context->textureProvider()->refScratchTexture(
- desc, GrTextureProvider::kApprox_ScratchTexMatch));
+ temp1.reset(context->textureProvider()->createApproxTexture(desc));
dstTexture = temp1.get();
if (canClobberSrc) {
tempTexture = srcTexture;
} else {
- temp2.reset(context->textureProvider()->refScratchTexture(
- desc, GrTextureProvider::kApprox_ScratchTexMatch));
+ temp2.reset(context->textureProvider()->createApproxTexture(desc));
tempTexture = temp2.get();
}
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index a30955faf7..898b094a6b 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -382,8 +382,7 @@ bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy,
desc.fHeight = bounds.height();
desc.fConfig = kRGBA_8888_GrPixelConfig;
- SkAutoTUnref<GrTexture> dst(context->textureProvider()->refScratchTexture(desc,
- GrTextureProvider::kApprox_ScratchTexMatch));
+ SkAutoTUnref<GrTexture> dst(context->textureProvider()->createApproxTexture(desc));
if (!dst) {
return false;
}
diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp
index 30ba25159d..20f76c1d93 100644
--- a/src/effects/SkMorphologyImageFilter.cpp
+++ b/src/effects/SkMorphologyImageFilter.cpp
@@ -662,8 +662,7 @@ bool apply_morphology(const SkBitmap& input,
SkIRect srcRect = rect;
if (radius.fWidth > 0) {
- GrTexture* scratch = context->textureProvider()->refScratchTexture(
- desc, GrTextureProvider::kApprox_ScratchTexMatch);
+ GrTexture* scratch = context->textureProvider()->createApproxTexture(desc);
if (NULL == scratch) {
return false;
}
@@ -686,8 +685,7 @@ bool apply_morphology(const SkBitmap& input,
srcRect = dstRect;
}
if (radius.fHeight > 0) {
- GrTexture* scratch = context->textureProvider()->refScratchTexture(desc,
- GrTextureProvider::kApprox_ScratchTexMatch);
+ GrTexture* scratch = context->textureProvider()->createApproxTexture(desc);
if (NULL == scratch) {
return false;
}
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index b45a4225d1..dc61b4e76e 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -160,8 +160,7 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy,
desc.fWidth = src.width();
desc.fHeight = src.height();
desc.fConfig = kSkia8888_GrPixelConfig;
- SkAutoTUnref<GrTexture> dst(context->textureProvider()->refScratchTexture(
- desc, GrTextureProvider::kApprox_ScratchTexMatch));
+ SkAutoTUnref<GrTexture> dst(context->textureProvider()->createApproxTexture(desc));
if (!dst) {
return false;
}