diff options
author | 2016-01-14 06:03:29 -0800 | |
---|---|---|
committer | 2016-01-14 06:03:29 -0800 | |
commit | 1de87df0b743e30619b8ba93ab0169fd41d0feae (patch) | |
tree | e6c2230c8a2922586e683035997864ebc2adc640 /src/effects | |
parent | abc0c8216b8e162b8de74de005f883cb84bd254b (diff) |
Refactor to use GrWrapTextureInBitmap more
Too many wrap_texture methods!
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1584933002
Review URL: https://codereview.chromium.org/1584933002
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkBlurImageFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkBlurMaskFilter.cpp | 1 | ||||
-rw-r--r-- | src/effects/SkDisplacementMapEffect.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkLightingImageFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkMorphologyImageFilter.cpp | 3 | ||||
-rw-r--r-- | src/effects/SkXfermodeImageFilter.cpp | 2 |
6 files changed, 9 insertions, 6 deletions
diff --git a/src/effects/SkBlurImageFilter.cpp b/src/effects/SkBlurImageFilter.cpp index 97cc8a9544..5d58369bc7 100644 --- a/src/effects/SkBlurImageFilter.cpp +++ b/src/effects/SkBlurImageFilter.cpp @@ -15,6 +15,7 @@ #include "SkWriteBuffer.h" #if SK_SUPPORT_GPU #include "GrContext.h" +#include "SkGr.h" #endif // This rather arbitrary-looking value results in a maximum box blur kernel size @@ -227,7 +228,7 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const if (!tex) { return false; } - WrapTexture(tex, dstBounds.width(), dstBounds.height(), result); + GrWrapTextureInBitmap(tex, dstBounds.width(), dstBounds.height(), false, result); return true; #else SkDEBUGFAIL("Should not call in GPU-less build"); diff --git a/src/effects/SkBlurMaskFilter.cpp b/src/effects/SkBlurMaskFilter.cpp index ca448bc2d0..edd2fa4f69 100644 --- a/src/effects/SkBlurMaskFilter.cpp +++ b/src/effects/SkBlurMaskFilter.cpp @@ -24,7 +24,6 @@ #include "GrTexture.h" #include "GrFragmentProcessor.h" #include "GrInvariantOutput.h" -#include "SkGrPixelRef.h" #include "SkDraw.h" #include "effects/GrSimpleTextureEffect.h" #include "glsl/GrGLSLFragmentProcessor.h" diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp index c50b1f2c18..9c640e3a98 100644 --- a/src/effects/SkDisplacementMapEffect.cpp +++ b/src/effects/SkDisplacementMapEffect.cpp @@ -16,6 +16,7 @@ #include "GrDrawContext.h" #include "GrCoordTransform.h" #include "GrInvariantOutput.h" +#include "SkGr.h" #include "effects/GrTextureDomain.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" @@ -465,7 +466,7 @@ bool SkDisplacementMapEffect::filterImageGPU(Proxy* proxy, const SkBitmap& src, drawContext->drawRect(GrClip::WideOpen(), paint, matrix, SkRect::Make(colorBounds)); offset->fX = bounds.left(); offset->fY = bounds.top(); - WrapTexture(dst, bounds.width(), bounds.height(), result); + GrWrapTextureInBitmap(dst, bounds.width(), bounds.height(), false, result); return true; } diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp index 6c2ec72c22..f701b4c894 100644 --- a/src/effects/SkLightingImageFilter.cpp +++ b/src/effects/SkLightingImageFilter.cpp @@ -20,6 +20,7 @@ #include "GrFragmentProcessor.h" #include "GrInvariantOutput.h" #include "GrPaint.h" +#include "SkGr.h" #include "effects/GrSingleTextureEffect.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" @@ -424,7 +425,7 @@ bool SkLightingImageFilterInternal::filterImageGPU(Proxy* proxy, this->drawRect(drawContext, srcTexture, matrix, clip, bottom, kBottom_BoundaryMode, bounds); this->drawRect(drawContext, srcTexture, matrix, clip, bottomRight, kBottomRight_BoundaryMode, bounds); - WrapTexture(dst, bounds.width(), bounds.height(), result); + GrWrapTextureInBitmap(dst, bounds.width(), bounds.height(), false, result); return true; } #endif diff --git a/src/effects/SkMorphologyImageFilter.cpp b/src/effects/SkMorphologyImageFilter.cpp index 895000e86e..3f6bc947cf 100644 --- a/src/effects/SkMorphologyImageFilter.cpp +++ b/src/effects/SkMorphologyImageFilter.cpp @@ -18,6 +18,7 @@ #include "GrDrawContext.h" #include "GrInvariantOutput.h" #include "GrTexture.h" +#include "SkGr.h" #include "effects/Gr1DKernelEffect.h" #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" @@ -606,7 +607,7 @@ bool apply_morphology(const SkBitmap& input, srcTexture.reset(scratch); } - SkImageFilter::WrapTexture(srcTexture, rect.width(), rect.height(), dst); + GrWrapTextureInBitmap(srcTexture, rect.width(), rect.height(), false, dst); return true; } diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp index c2013fdb86..5f88240481 100644 --- a/src/effects/SkXfermodeImageFilter.cpp +++ b/src/effects/SkXfermodeImageFilter.cpp @@ -212,7 +212,7 @@ bool SkXfermodeImageFilter::filterImageGPU(Proxy* proxy, offset->fX = bounds.left(); offset->fY = bounds.top(); - WrapTexture(dst, bounds.width(), bounds.height(), result); + GrWrapTextureInBitmap(dst, bounds.width(), bounds.height(), false, result); return true; } |