Improve clamp mode in GPU blur with downsampling.
This ensures that if the original src had transparent-black in the
border pixels that our downsampled image does as well. Otherwise,
clamp mode causes these nonzero border pixels to produce vertical
/horizontal smears at the edges of the result.
Bug: chromium:1156804
Change-Id: Id2c3a66de29724db2fcc7954abf7f14937cfb76d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343111
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
diff --git a/src/gpu/GrSurfaceContext.h b/src/gpu/GrSurfaceContext.h
index b25d849..5096d2c 100644
--- a/src/gpu/GrSurfaceContext.h
+++ b/src/gpu/GrSurfaceContext.h
@@ -173,6 +173,16 @@
SkImage::RescaleGamma,
SkFilterQuality);
+ /**
+ * Like the above but allows the caller ot specify a destination render target context and
+ * rect within that context. The dst rect must be contained by the dst or this will fail.
+ */
+ bool rescaleInto(GrSurfaceDrawContext* dst,
+ SkIRect dstRect,
+ SkIRect srcRect,
+ SkImage::RescaleGamma,
+ SkFilterQuality);
+
GrAuditTrail* auditTrail();
#if GR_TEST_UTILS