| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrPipeline.h" | 8 #include "GrPipeline.h" |
| 9 | 9 |
| 10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 fStencilSettings = pipelineBuilder.getStencil(); | 57 fStencilSettings = pipelineBuilder.getStencil(); |
| 58 fDrawFace = pipelineBuilder.getDrawFace(); | 58 fDrawFace = pipelineBuilder.getDrawFace(); |
| 59 | 59 |
| 60 fFlags = 0; | 60 fFlags = 0; |
| 61 if (pipelineBuilder.isHWAntialias()) { | 61 if (pipelineBuilder.isHWAntialias()) { |
| 62 fFlags |= kHWAA_Flag; | 62 fFlags |= kHWAA_Flag; |
| 63 } | 63 } |
| 64 if (pipelineBuilder.isDither()) { | 64 if (pipelineBuilder.isDither()) { |
| 65 fFlags |= kDither_Flag; | 65 fFlags |= kDither_Flag; |
| 66 } | 66 } |
| 67 if (pipelineBuilder.snapVerticesToPixelCenters()) { |
| 68 fFlags |= kSnapVertices_Flag; |
| 69 } |
| 67 | 70 |
| 68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); | 71 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); |
| 69 | 72 |
| 70 // TODO: Once we can handle single or four channel input into coverage stage
s then we can use | 73 // TODO: Once we can handle single or four channel input into coverage stage
s then we can use |
| 71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi
al information. | 74 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi
al information. |
| 72 int firstCoverageStageIdx = 0; | 75 int firstCoverageStageIdx = 0; |
| 73 | 76 |
| 74 GrXferProcessor::BlendInfo blendInfo; | 77 GrXferProcessor::BlendInfo blendInfo; |
| 75 fXferProcessor->getBlendInfo(&blendInfo); | 78 fXferProcessor->getBlendInfo(&blendInfo); |
| 76 | 79 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); | 156 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); |
| 154 for (int i = 0; i < this->numFragmentStages(); i++) { | 157 for (int i = 0; i < this->numFragmentStages(); i++) { |
| 155 | 158 |
| 156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { | 159 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { |
| 157 return false; | 160 return false; |
| 158 } | 161 } |
| 159 } | 162 } |
| 160 return true; | 163 return true; |
| 161 } | 164 } |
| 162 | 165 |
| OLD | NEW |