Respect wrap mode when decimating for blur
It used to be the case that bilerp wasn't supported for shader-based repeats and mirrors, but that is no longer the case. If we switched to ClampToBorder in those cases, we could introduce transparent black into the decimated image that would then infect the final blur. Bug: skia:10145 Change-Id: Ie273b4d64f082be3ddbdbf54acf201ff1fdfa133 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/283940 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
8390f2ead6
commit
0dca280047
@ -300,14 +300,7 @@ static GrSurfaceProxyView decimate(GrRecordingContext* context,
|
||||
GrPaint paint;
|
||||
std::unique_ptr<GrFragmentProcessor> fp;
|
||||
if (i == 1) {
|
||||
GrSamplerState::WrapMode wrapMode;
|
||||
if (mode == SkTileMode::kClamp) {
|
||||
wrapMode = GrSamplerState::WrapMode::kClamp;
|
||||
} else {
|
||||
// GrTextureEffect does not support WrapMode::k[Mirror]Repeat with
|
||||
// GrSamplerState::Filter::kBilerp. So we use kClampToBorder.
|
||||
wrapMode = GrSamplerState::WrapMode::kClampToBorder;
|
||||
}
|
||||
GrSamplerState::WrapMode wrapMode = SkTileModeToWrapMode(mode);
|
||||
const auto& caps = *context->priv().caps();
|
||||
GrSamplerState sampler(wrapMode, GrSamplerState::Filter::kBilerp);
|
||||
fp = GrTextureEffect::MakeSubset(std::move(srcView), srcAlphaType, SkMatrix::I(),
|
||||
|
Loading…
Reference in New Issue
Block a user