From 01a492f959e886f89995c6d1bbcd9f7bb7639726 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Thu, 21 Aug 2014 06:47:50 -0700 Subject: Fix == operator in GrTextureDomain so we don't compair uninitilized values We were getting random behavior when comparing two GrTexureDomains since fDomain was not initialized when the mode was set to ignore. BUG=skia: R=bsalomon@google.com Author: egdaniel@google.com Review URL: https://codereview.chromium.org/469393007 --- src/gpu/effects/GrTextureDomain.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h index 7796afe4c4..577098a4ad 100644 --- a/src/gpu/effects/GrTextureDomain.h +++ b/src/gpu/effects/GrTextureDomain.h @@ -68,7 +68,7 @@ public: } bool operator== (const GrTextureDomain& that) const { - return fMode == that.fMode && fDomain == that.fDomain; + return fMode == that.fMode && (kIgnore_Mode == fMode || fDomain == that.fDomain); } /** -- cgit v1.2.3