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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 fDrawFace = that.fDrawFace; | 79 fDrawFace = that.fDrawFace; |
80 fGeometryProcessor.reset(SkSafeRef(that.fGeometryProcessor.get())); | 80 fGeometryProcessor.reset(SkSafeRef(that.fGeometryProcessor.get())); |
81 fXPFactory.reset(SkRef(that.getXPFactory())); | 81 fXPFactory.reset(SkRef(that.getXPFactory())); |
82 fColorStages = that.fColorStages; | 82 fColorStages = that.fColorStages; |
83 fCoverageStages = that.fCoverageStages; | 83 fCoverageStages = that.fCoverageStages; |
84 | 84 |
85 fHints = that.fHints; | 85 fHints = that.fHints; |
86 | 86 |
87 fColorProcInfoValid = that.fColorProcInfoValid; | 87 fColorProcInfoValid = that.fColorProcInfoValid; |
88 fCoverageProcInfoValid = that.fCoverageProcInfoValid; | 88 fCoverageProcInfoValid = that.fCoverageProcInfoValid; |
| 89 fColorCache = that.fColorCache; |
| 90 fCoverageCache = that.fCoverageCache; |
89 if (fColorProcInfoValid) { | 91 if (fColorProcInfoValid) { |
90 fColorProcInfo = that.fColorProcInfo; | 92 fColorProcInfo = that.fColorProcInfo; |
91 } | 93 } |
92 if (fCoverageProcInfoValid) { | 94 if (fCoverageProcInfoValid) { |
93 fCoverageProcInfo = that.fCoverageProcInfo; | 95 fCoverageProcInfo = that.fCoverageProcInfo; |
94 } | 96 } |
95 return *this; | 97 return *this; |
96 } | 98 } |
97 | 99 |
98 void GrDrawState::onReset(const SkMatrix* initialViewMatrix) { | 100 void GrDrawState::onReset(const SkMatrix* initialViewMatrix) { |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 coverage = 0; | 420 coverage = 0; |
419 } else { | 421 } else { |
420 flags = kRGBA_GrColorComponentFlags; | 422 flags = kRGBA_GrColorComponentFlags; |
421 } | 423 } |
422 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->n
umCoverageStages(), | 424 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), this->n
umCoverageStages(), |
423 coverage, flags, true, fGeometry
Processor.get()); | 425 coverage, flags, true, fGeometry
Processor.get()); |
424 fCoverageProcInfoValid = true; | 426 fCoverageProcInfoValid = true; |
425 fCoverageCache = coverage; | 427 fCoverageCache = coverage; |
426 } | 428 } |
427 } | 429 } |
OLD | NEW |