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 "GrBlend.h" | 10 #include "GrBlend.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 this->setRenderTarget(rt); | 36 this->setRenderTarget(rt); |
37 | 37 |
38 // These have no equivalent in GrPaint, set them to defaults | 38 // These have no equivalent in GrPaint, set them to defaults |
39 fDrawFace = kBoth_DrawFace; | 39 fDrawFace = kBoth_DrawFace; |
40 fStencilSettings.setDisabled(); | 40 fStencilSettings.setDisabled(); |
41 fFlags = 0; | 41 fFlags = 0; |
42 | 42 |
43 fClip = clip; | 43 fClip = clip; |
44 | 44 |
45 this->setState(GrPipelineBuilder::kDither_Flag, paint.isDither()); | |
46 this->setState(GrPipelineBuilder::kHWAntialias_Flag, | 45 this->setState(GrPipelineBuilder::kHWAntialias_Flag, |
47 rt->isUnifiedMultisampled() && paint.isAntiAlias()); | 46 rt->isUnifiedMultisampled() && paint.isAntiAlias()); |
48 } | 47 } |
49 | 48 |
50 //////////////////////////////////////////////////////////////////////////////s | 49 //////////////////////////////////////////////////////////////////////////////s |
51 | 50 |
52 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, | 51 bool GrPipelineBuilder::willXPNeedDstTexture(const GrCaps& caps, |
53 const GrProcOptInfo& colorPOI, | 52 const GrProcOptInfo& colorPOI, |
54 const GrProcOptInfo& coveragePOI) c
onst { | 53 const GrProcOptInfo& coveragePOI) c
onst { |
55 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI, | 54 return this->getXPFactory()->willNeedDstTexture(caps, colorPOI, coveragePOI, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ | 98 void GrPipelineBuilder::calcColorInvariantOutput(const GrDrawBatch* batch) const
{ |
100 fColorProcInfo.calcColorWithBatch(batch, fColorFragmentProcessors.begin(), | 99 fColorProcInfo.calcColorWithBatch(batch, fColorFragmentProcessors.begin(), |
101 this->numColorFragmentProcessors()); | 100 this->numColorFragmentProcessors()); |
102 } | 101 } |
103 | 102 |
104 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { | 103 void GrPipelineBuilder::calcCoverageInvariantOutput(const GrDrawBatch* batch) co
nst { |
105 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageFragmentProcessors.b
egin(), | 104 fCoverageProcInfo.calcCoverageWithBatch(batch, fCoverageFragmentProcessors.b
egin(), |
106 this->numCoverageFragmentProcessors(
)); | 105 this->numCoverageFragmentProcessors(
)); |
107 } | 106 } |
108 | 107 |
OLD | NEW |