| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 this->setRenderTarget(rt); | 67 this->setRenderTarget(rt); |
| 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 fFlagBits = 0; | 72 fFlagBits = 0; |
| 73 | 73 |
| 74 fClip = clip; | 74 fClip = clip; |
| 75 | 75 |
| 76 this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither()); | 76 this->setState(GrPipelineBuilder::kDither_StateBit, paint.isDither()); |
| 77 this->setState(GrPipelineBuilder::kHWAntialias_StateBit, paint.isAntiAlias()
); | 77 this->setState(GrPipelineBuilder::kHWAntialias_StateBit, |
| 78 rt->isMultisampled() && paint.isAntiAlias()); |
| 78 | 79 |
| 79 fColorProcInfoValid = false; | 80 fColorProcInfoValid = false; |
| 80 fCoverageProcInfoValid = false; | 81 fCoverageProcInfoValid = false; |
| 81 | 82 |
| 82 fColorCache = GrColor_ILLEGAL; | 83 fColorCache = GrColor_ILLEGAL; |
| 83 fCoverageCache = GrColor_ILLEGAL; | 84 fCoverageCache = GrColor_ILLEGAL; |
| 84 } | 85 } |
| 85 | 86 |
| 86 //////////////////////////////////////////////////////////////////////////////s | 87 //////////////////////////////////////////////////////////////////////////////s |
| 87 | 88 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { | 177 void GrPipelineBuilder::calcCoverageInvariantOutput(GrColor coverage) const { |
| 177 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { | 178 if (!fCoverageProcInfoValid || coverage != fCoverageCache) { |
| 178 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; | 179 GrColorComponentFlags flags = kRGBA_GrColorComponentFlags; |
| 179 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), | 180 fCoverageProcInfo.calcWithInitialValues(fCoverageStages.begin(), |
| 180 this->numCoverageFragmentStages(
), coverage, flags, | 181 this->numCoverageFragmentStages(
), coverage, flags, |
| 181 true); | 182 true); |
| 182 fCoverageProcInfoValid = true; | 183 fCoverageProcInfoValid = true; |
| 183 fCoverageCache = coverage; | 184 fCoverageCache = coverage; |
| 184 } | 185 } |
| 185 } | 186 } |
| OLD | NEW |