Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1050)

Unified Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1034733002: Implement approx-match support in image filter saveLayer() offscreen. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix empty/out-of-range rects in GrTextureDomain Clamp mode Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698