aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkArithmeticImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-02-07 11:59:16 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-07 21:41:00 +0000
commite88cf6b7aa5deaeaa9dab18ada7d9d11e1e4be12 (patch)
tree9b3eef7407120c74dd9e9a7a38579d57ff52fe39 /src/effects/SkArithmeticImageFilter.cpp
parent0766e9b55e307eb1db9c683a12b8333833d65247 (diff)
Remove asTextureRef from SkSpecialImage & update effects accordingly
This CL also renames SkSpecialImage::asTextureProxy to asTextureProxyRef Change-Id: I5ed8e475bb9688453b825ae4500ed0e8d324b5ac Reviewed-on: https://skia-review.googlesource.com/7995 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/effects/SkArithmeticImageFilter.cpp')
-rw-r--r--src/effects/SkArithmeticImageFilter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/effects/SkArithmeticImageFilter.cpp b/src/effects/SkArithmeticImageFilter.cpp
index 40560690ee..566b27f049 100644
--- a/src/effects/SkArithmeticImageFilter.cpp
+++ b/src/effects/SkArithmeticImageFilter.cpp
@@ -342,26 +342,26 @@ sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
GrContext* context = source->getContext();
- sk_sp<GrTexture> backgroundTex, foregroundTex;
+ sk_sp<GrTextureProxy> backgroundProxy, foregroundProxy;
if (background) {
- backgroundTex = background->asTextureRef(context);
+ backgroundProxy = background->asTextureProxyRef(context);
}
if (foreground) {
- foregroundTex = foreground->asTextureRef(context);
+ foregroundProxy = foreground->asTextureProxyRef(context);
}
GrPaint paint;
sk_sp<GrFragmentProcessor> bgFP;
- if (backgroundTex) {
+ if (backgroundProxy) {
SkMatrix backgroundMatrix = SkMatrix::MakeTrans(-SkIntToScalar(backgroundOffset.fX),
-SkIntToScalar(backgroundOffset.fY));
sk_sp<GrColorSpaceXform> bgXform =
GrColorSpaceXform::Make(background->getColorSpace(), outputProperties.colorSpace());
bgFP = GrTextureDomainEffect::Make(
- backgroundTex.get(), std::move(bgXform), backgroundMatrix,
+ context, std::move(backgroundProxy), std::move(bgXform), backgroundMatrix,
GrTextureDomain::MakeTexelDomain(background->subset()),
GrTextureDomain::kDecal_Mode, GrSamplerParams::kNone_FilterMode);
} else {
@@ -369,7 +369,7 @@ sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
GrConstColorProcessor::kIgnore_InputMode);
}
- if (foregroundTex) {
+ if (foregroundProxy) {
SkMatrix foregroundMatrix = SkMatrix::MakeTrans(-SkIntToScalar(foregroundOffset.fX),
-SkIntToScalar(foregroundOffset.fY));
sk_sp<GrColorSpaceXform> fgXform =
@@ -377,7 +377,7 @@ sk_sp<SkSpecialImage> ArithmeticImageFilterImpl::filterImageGPU(
sk_sp<GrFragmentProcessor> foregroundFP;
foregroundFP = GrTextureDomainEffect::Make(
- foregroundTex.get(), std::move(fgXform), foregroundMatrix,
+ context, std::move(foregroundProxy), std::move(fgXform), foregroundMatrix,
GrTextureDomain::MakeTexelDomain(foreground->subset()),
GrTextureDomain::kDecal_Mode, GrSamplerParams::kNone_FilterMode);