Support mirror-repeat in GrTextureDomain
Bug: skia:9570
Change-Id: Iccfbb36b130ec2827164efda33470e2fa75ad833
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/258638
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/gm/texturedomaineffect.cpp b/gm/texturedomaineffect.cpp
index e7d08cd..5049d5c 100644
--- a/gm/texturedomaineffect.cpp
+++ b/gm/texturedomaineffect.cpp
@@ -120,8 +120,10 @@
for (int m = 0; m < GrTextureDomain::kModeCount; ++m) {
GrTextureDomain::Mode mode = (GrTextureDomain::Mode) m;
if (fFilter != GrSamplerState::Filter::kNearest &&
- mode == GrTextureDomain::kRepeat_Mode) {
- // Repeat mode doesn't produce correct results with bilerp filtering
+ (mode == GrTextureDomain::kRepeat_Mode ||
+ mode == GrTextureDomain::kMirrorRepeat_Mode)) {
+ // [Mirror] Repeat mode doesn't produce correct results with bilerp
+ // filtering
continue;
}
auto fp1 = GrSimpleTextureEffect::Make(proxy, fBitmap.alphaType(),