Index: src/gpu/effects/GrTextureDomain.cpp |
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp |
index d2a8d70455f17df3b8445d78354770b437487cae..f14ebaa855114128f27fbd75d6638f1da98ab1a0 100644 |
--- a/src/gpu/effects/GrTextureDomain.cpp |
+++ b/src/gpu/effects/GrTextureDomain.cpp |
@@ -28,10 +28,10 @@ GrTextureDomain::GrTextureDomain(const SkRect& domain, Mode mode, int index) |
// handle rects that do not intersect the [0..1]x[0..1] rect. |
SkASSERT(domain.fLeft <= domain.fRight); |
SkASSERT(domain.fTop <= domain.fBottom); |
- fDomain.fLeft = SkMaxScalar(domain.fLeft, kFullRect.fLeft); |
- fDomain.fRight = SkMinScalar(domain.fRight, kFullRect.fRight); |
- fDomain.fTop = SkMaxScalar(domain.fTop, kFullRect.fTop); |
- fDomain.fBottom = SkMinScalar(domain.fBottom, kFullRect.fBottom); |
+ fDomain.fLeft = SkScalarPin(domain.fLeft, kFullRect.fLeft, kFullRect.fRight); |
+ fDomain.fRight = SkScalarPin(domain.fRight, kFullRect.fLeft, kFullRect.fRight); |
+ fDomain.fTop = SkScalarPin(domain.fTop, kFullRect.fTop, kFullRect.fBottom); |
+ fDomain.fBottom = SkScalarPin(domain.fBottom, kFullRect.fTop, kFullRect.fBottom); |
SkASSERT(fDomain.fLeft <= fDomain.fRight); |
SkASSERT(fDomain.fTop <= fDomain.fBottom); |
} |