OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrDrawState.h" | 8 #include "GrDrawState.h" |
9 | 9 |
10 #include "GrBlend.h" | 10 #include "GrBlend.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 fViewMatrix = *initialViewMatrix; | 110 fViewMatrix = *initialViewMatrix; |
111 } | 111 } |
112 fFlagBits = 0x0; | 112 fFlagBits = 0x0; |
113 fStencilSettings.setDisabled(); | 113 fStencilSettings.setDisabled(); |
114 fDrawFace = kBoth_DrawFace; | 114 fDrawFace = kBoth_DrawFace; |
115 | 115 |
116 fHints = 0; | 116 fHints = 0; |
117 | 117 |
118 fColorProcInfoValid = false; | 118 fColorProcInfoValid = false; |
119 fCoverageProcInfoValid = false; | 119 fCoverageProcInfoValid = false; |
| 120 |
| 121 fColorCache = GrColor_ILLEGAL; |
| 122 fCoverageCache = GrColor_ILLEGAL; |
120 } | 123 } |
121 | 124 |
122 bool GrDrawState::setIdentityViewMatrix() { | 125 bool GrDrawState::setIdentityViewMatrix() { |
123 if (this->numFragmentStages()) { | 126 if (this->numFragmentStages()) { |
124 SkMatrix invVM; | 127 SkMatrix invVM; |
125 if (!fViewMatrix.invert(&invVM)) { | 128 if (!fViewMatrix.invert(&invVM)) { |
126 // sad trombone sound | 129 // sad trombone sound |
127 return false; | 130 return false; |
128 } | 131 } |
129 for (int s = 0; s < this->numColorStages(); ++s) { | 132 for (int s = 0; s < this->numColorStages(); ++s) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 coverage = 0; | 418 coverage = 0; |
416 } else { | 419 } else { |
417 flags = kRGBA_GrColorComponentFlags; | 420 flags = kRGBA_GrColorComponentFlags; |
418 } | 421 } |
419 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->n
umCoverageStages(), | 422 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->n
umCoverageStages(), |
420 coverage, flags, true, fGeometry
Processor.get()); | 423 coverage, flags, true, fGeometry
Processor.get()); |
421 fCoverageProcInfoValid = true; | 424 fCoverageProcInfoValid = true; |
422 fCoverageCache = coverage; | 425 fCoverageCache = coverage; |
423 } | 426 } |
424 } | 427 } |
OLD | NEW |