OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #include "GrGLProgramDesc.h" | 7 #include "GrGLProgramDesc.h" |
8 | 8 |
9 #include "GrProcessor.h" | 9 #include "GrProcessor.h" |
10 #include "GrGLGpu.h" | 10 #include "GrGLGpu.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 // make sure any padding in the header is zeroed. | 141 // make sure any padding in the header is zeroed. |
142 memset(header, 0, kHeaderSize); | 142 memset(header, 0, kHeaderSize); |
143 | 143 |
144 if (pipeline.readsFragPosition()) { | 144 if (pipeline.readsFragPosition()) { |
145 header->fFragPosKey = | 145 header->fFragPosKey = |
146 GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.get
RenderTarget()); | 146 GrGLSLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.get
RenderTarget()); |
147 } else { | 147 } else { |
148 header->fFragPosKey = 0; | 148 header->fFragPosKey = 0; |
149 } | 149 } |
| 150 |
| 151 if (pipeline.ignoresCoverage()) { |
| 152 header->fIgnoresCoverage = 1; |
| 153 } else { |
| 154 header->fIgnoresCoverage = 0; |
| 155 } |
| 156 |
150 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); | 157 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); |
151 header->fColorEffectCnt = pipeline.numColorFragmentProcessors(); | 158 header->fColorEffectCnt = pipeline.numColorFragmentProcessors(); |
152 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors(); | 159 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors(); |
153 glDesc->finalize(); | 160 glDesc->finalize(); |
154 return true; | 161 return true; |
155 } | 162 } |
OLD | NEW |