| 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 "GrOptDrawState.h" | 8 #include "GrOptDrawState.h" |
| 9 | 9 |
| 10 #include "GrDrawState.h" | 10 #include "GrDrawState.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 int firstCoverageStageIdx = 0; | 41 int firstCoverageStageIdx = 0; |
| 42 bool separateCoverageFromColor; | 42 bool separateCoverageFromColor; |
| 43 | 43 |
| 44 uint8_t fixedFunctionVAToRemove = 0; | 44 uint8_t fixedFunctionVAToRemove = 0; |
| 45 | 45 |
| 46 this->computeEffectiveColorStages(drawState, &firstColorStageIdx, &fixedFunc
tionVAToRemove); | 46 this->computeEffectiveColorStages(drawState, &firstColorStageIdx, &fixedFunc
tionVAToRemove); |
| 47 this->computeEffectiveCoverageStages(drawState, &firstCoverageStageIdx); | 47 this->computeEffectiveCoverageStages(drawState, &firstCoverageStageIdx); |
| 48 this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStag
eIdx, | 48 this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStag
eIdx, |
| 49 &fixedFunctionVAToRemove); | 49 &fixedFunctionVAToRemove); |
| 50 // Should not be setting any more FFVA to be removed at this point | 50 // Should not be setting any more FFVA to be removed at this point |
| 51 this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove); | 51 if (0 != fixedFunctionVAToRemove) { |
| 52 this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove); |
| 53 } |
| 52 this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx); | 54 this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx); |
| 53 this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCo
verageFromColor); | 55 this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCo
verageFromColor); |
| 54 | 56 |
| 55 // Copy GeometryProcesssor from DS or ODS | 57 // Copy GeometryProcesssor from DS or ODS |
| 56 if (drawState.hasGeometryProcessor()) { | 58 if (drawState.hasGeometryProcessor()) { |
| 57 fGeometryProcessor.initAndRef(drawState.fGeometryProcessor); | 59 fGeometryProcessor.initAndRef(drawState.fGeometryProcessor); |
| 58 } else { | 60 } else { |
| 59 fGeometryProcessor.reset(NULL); | 61 fGeometryProcessor.reset(NULL); |
| 60 } | 62 } |
| 61 | 63 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } | 375 } |
| 374 } | 376 } |
| 375 | 377 |
| 376 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, | 378 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, |
| 377 that.fFixedFunctionVertexAttribIndices, | 379 that.fFixedFunctionVertexAttribIndices, |
| 378 sizeof(this->fFixedFunctionVertexAttribIndices))); | 380 sizeof(this->fFixedFunctionVertexAttribIndices))); |
| 379 | 381 |
| 380 return true; | 382 return true; |
| 381 } | 383 } |
| 382 | 384 |
| OLD | NEW |