Don't switch kDecal to kClamp
Came across this when working on a new GM that happened to use a 1px wide image with decal sampling, this caused it to smear across a much larger than expected area. Change-Id: I05a12e4ae9a2a54f8a9a18050573a4f6b35197ac Reviewed-on: https://skia-review.googlesource.com/c/skia/+/451357 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com> Auto-Submit: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
5480677cfc
commit
c3fab1a511
@ -60,7 +60,9 @@ static SkTileMode optimize(SkTileMode tm, int dimension) {
|
|||||||
// for transforming to clamp.
|
// for transforming to clamp.
|
||||||
return tm;
|
return tm;
|
||||||
#else
|
#else
|
||||||
return dimension == 1 ? SkTileMode::kClamp : tm;
|
// mirror and repeat on a 1px axis are the same as clamping, but decal will still transition to
|
||||||
|
// transparent black.
|
||||||
|
return (tm != SkTileMode::kDecal && dimension == 1) ? SkTileMode::kClamp : tm;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user