aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGpuBlurUtils.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-01-09 14:23:59 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-01-10 16:15:02 +0000
commite98234f231d66848e149db683c11b6388e10b233 (patch)
tree48bbfcde8b5519a3903a1be0e6b28b04dee6b819 /src/core/SkGpuBlurUtils.cpp
parent8e619a2b4eb31753e6fcb4a9ec494d31ace755da (diff)
Start making texture coordinates be absolute
The idea here is that we will pass GrTextureProxys in (where we're currently passing GrTextures) and defer the normalization until the texture is actually instantiated (and possibly move it to the GPU entirely) This CL does (intentionally) change the texturedomaineffect GM but I believe the new behavior is more correct. Change-Id: I4e0510b3dfb65ff0d0ee5921f9a6f94151e602d3 Reviewed-on: https://skia-review.googlesource.com/6807 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/core/SkGpuBlurUtils.cpp')
-rw-r--r--src/core/SkGpuBlurUtils.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/SkGpuBlurUtils.cpp b/src/core/SkGpuBlurUtils.cpp
index e3463a4b78..005670a7f9 100644
--- a/src/core/SkGpuBlurUtils.cpp
+++ b/src/core/SkGpuBlurUtils.cpp
@@ -268,10 +268,9 @@ sk_sp<GrRenderTargetContext> GaussianBlur(GrContext* context,
matrix.setIDiv(srcTexture->width(), srcTexture->height());
SkIRect dstRect(srcRect);
if (srcBounds && i == 1) {
- SkRect domain;
- matrix.mapRect(&domain, SkRect::Make(*srcBounds));
- domain.inset((i < scaleFactorX) ? SK_ScalarHalf / srcTexture->width() : 0.0f,
- (i < scaleFactorY) ? SK_ScalarHalf / srcTexture->height() : 0.0f);
+ SkRect domain = SkRect::Make(*srcBounds);
+ domain.inset((i < scaleFactorX) ? SK_ScalarHalf : 0.0f,
+ (i < scaleFactorY) ? SK_ScalarHalf : 0.0f);
sk_sp<GrFragmentProcessor> fp(GrTextureDomainEffect::Make(
srcTexture.get(),
nullptr,