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 "GrPipelineBuilder.h" | 8 #include "GrPipelineBuilder.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 // These have no equivalent in GrPaint, set them to defaults | 69 // These have no equivalent in GrPaint, set them to defaults |
70 fDrawFace = kBoth_DrawFace; | 70 fDrawFace = kBoth_DrawFace; |
71 fStencilSettings.setDisabled(); | 71 fStencilSettings.setDisabled(); |
72 fFlags = 0; | 72 fFlags = 0; |
73 | 73 |
74 fClip = clip; | 74 fClip = clip; |
75 | 75 |
76 this->setState(GrPipelineBuilder::kDither_Flag, paint.isDither()); | 76 this->setState(GrPipelineBuilder::kDither_Flag, paint.isDither()); |
77 this->setState(GrPipelineBuilder::kHWAntialias_Flag, | 77 this->setState(GrPipelineBuilder::kHWAntialias_Flag, |
78 rt->isMultisampled() && paint.isAntiAlias()); | 78 rt->isUnifiedMultisampled() && paint.isAntiAlias()); |
79 | 79 |
80 fColorProcInfoValid = false; | 80 fColorProcInfoValid = false; |
81 fCoverageProcInfoValid = false; | 81 fCoverageProcInfoValid = false; |
82 | 82 |
83 fColorCache = GrColor_ILLEGAL; | 83 fColorCache = GrColor_ILLEGAL; |
84 fCoverageCache = GrColor_ILLEGAL; | 84 fCoverageCache = GrColor_ILLEGAL; |
85 } | 85 } |
86 | 86 |
87 //////////////////////////////////////////////////////////////////////////////s | 87 //////////////////////////////////////////////////////////////////////////////s |
88 | 88 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { | 169 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { |
170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { | 170 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { |
171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; | 171 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; |
172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), | 172 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), |
173 this->numCoverageFragmentStages(
), coverage, flags, | 173 this->numCoverageFragmentStages(
), coverage, flags, |
174 true); | 174 true); |
175 fCoverageProcInfoValid = true; | 175 fCoverageProcInfoValid = true; |
176 fCoverageCache = coverage; | 176 fCoverageCache = coverage; |
177 } | 177 } |
178 } | 178 } |
OLD | NEW |