aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawState.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-18 18:25:07 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-18 18:25:07 +0000
commitf2f8fc37265a6ef06897117451a3a9238287c13b (patch)
treeb264c65015c08411ad62b3f8d75f4d53d76dfdbb /src/gpu/GrDrawState.h
parent77eec248cbd5a0c2f5f8595e62e3bff5ea363f17 (diff)
Fix grdrawstate == test when left side has disabled stage and right side does not
Review URL: http://codereview.appspot.com/6427044/ git-svn-id: http://skia.googlecode.com/svn/trunk@4657 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrDrawState.h')
-rw-r--r--src/gpu/GrDrawState.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 3de33d82a7..b5c34821e3 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -797,8 +797,11 @@ public:
}
for (int i = 0; i < kNumStages; i++) {
- if (this->isStageEnabled(i) &&
- this->fSamplerStates[i] != s.fSamplerStates[i]) {
+ bool enabled = this->isStageEnabled(i);
+ if (enabled != s.isStageEnabled(i)) {
+ return false;
+ }
+ if (enabled && this->fSamplerStates[i] != s.fSamplerStates[i]) {
return false;
}
}