OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrRODrawState.h" | 8 #include "GrRODrawState.h" |
9 #include "GrDrawTargetCaps.h" | 9 #include "GrDrawTargetCaps.h" |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 } | 33 } |
34 | 34 |
35 bool usingVertexCoverage = this->hasCoverageVertexAttribute(); | 35 bool usingVertexCoverage = this->hasCoverageVertexAttribute(); |
36 if (!usingVertexCoverage && this->fCoverage != that.fCoverage) { | 36 if (!usingVertexCoverage && this->fCoverage != that.fCoverage) { |
37 return false; | 37 return false; |
38 } | 38 } |
39 | 39 |
40 bool explicitLocalCoords = this->hasLocalCoordAttribute(); | 40 bool explicitLocalCoords = this->hasLocalCoordAttribute(); |
41 if (this->hasGeometryProcessor()) { | 41 if (this->hasGeometryProcessor()) { |
42 if (!that.hasGeometryProcessor()) { | 42 if (!that.hasGeometryProcessor()) { |
43 return kIncompatible_CombinedState; | 43 return false; |
44 } else if (!GrEffectStage::AreCompatible(*this->getGeometryProcessor(), | 44 } else if (!GrEffectStage::AreCompatible(*this->getGeometryProcessor(), |
45 *that.getGeometryProcessor(), | 45 *that.getGeometryProcessor(), |
46 explicitLocalCoords)) { | 46 explicitLocalCoords)) { |
47 return kIncompatible_CombinedState; | 47 return false; |
48 } | 48 } |
49 } else if (that.hasGeometryProcessor()) { | 49 } else if (that.hasGeometryProcessor()) { |
50 return kIncompatible_CombinedState; | 50 return false; |
51 } | 51 } |
52 | 52 |
53 for (int i = 0; i < this->numColorStages(); i++) { | 53 for (int i = 0; i < this->numColorStages(); i++) { |
54 if (!GrEffectStage::AreCompatible(this->getColorStage(i), that.getColorS
tage(i), | 54 if (!GrEffectStage::AreCompatible(this->getColorStage(i), that.getColorS
tage(i), |
55 explicitLocalCoords)) { | 55 explicitLocalCoords)) { |
56 return false; | 56 return false; |
57 } | 57 } |
58 } | 58 } |
59 for (int i = 0; i < this->numCoverageStages(); i++) { | 59 for (int i = 0; i < this->numCoverageStages(); i++) { |
60 if (!GrEffectStage::AreCompatible(this->getCoverageStage(i), that.getCov
erageStage(i), | 60 if (!GrEffectStage::AreCompatible(this->getCoverageStage(i), that.getCov
erageStage(i), |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 find that only 1, ISA, and ISC produce the correct destination when applied
to S' and D. | 177 find that only 1, ISA, and ISC produce the correct destination when applied
to S' and D. |
178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag
e is treated as | 178 Also, if we're directly rendering coverage (isCoverageDrawing) then coverag
e is treated as |
179 color by definition. | 179 color by definition. |
180 */ | 180 */ |
181 return kOne_GrBlendCoeff == fDstBlend || | 181 return kOne_GrBlendCoeff == fDstBlend || |
182 kISA_GrBlendCoeff == fDstBlend || | 182 kISA_GrBlendCoeff == fDstBlend || |
183 kISC_GrBlendCoeff == fDstBlend || | 183 kISC_GrBlendCoeff == fDstBlend || |
184 this->isCoverageDrawing(); | 184 this->isCoverageDrawing(); |
185 } | 185 } |
186 | 186 |
OLD | NEW |