| 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 "GrGLProcessor.h" | 9 #include "GrGLProcessor.h" |
| 10 #include "GrBackendProcessorFactory.h" | 10 #include "GrBackendProcessorFactory.h" |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------
------------------- | 189 // --------DO NOT MOVE HEADER ABOVE THIS LINE-------------------------------
------------------- |
| 190 // Because header is a pointer into the dynamic array, we can't push any new
data into the key | 190 // Because header is a pointer into the dynamic array, we can't push any new
data into the key |
| 191 // below here. | 191 // below here. |
| 192 GLKeyHeader* header = desc->atOffset<GLKeyHeader, kHeaderOffset>(); | 192 GLKeyHeader* header = desc->atOffset<GLKeyHeader, kHeaderOffset>(); |
| 193 | 193 |
| 194 // make sure any padding in the header is zeroed. | 194 // make sure any padding in the header is zeroed. |
| 195 memset(header, 0, kHeaderSize); | 195 memset(header, 0, kHeaderSize); |
| 196 | 196 |
| 197 header->fHasGeometryProcessor = optState.hasGeometryProcessor(); | 197 header->fHasGeometryProcessor = optState.hasGeometryProcessor(); |
| 198 | 198 |
| 199 header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType; | |
| 200 | |
| 201 bool isPathRendering = GrGpu::IsPathRenderingDrawType(drawType); | 199 bool isPathRendering = GrGpu::IsPathRenderingDrawType(drawType); |
| 202 if (gpu->caps()->pathRenderingSupport() && isPathRendering) { | 200 if (gpu->caps()->pathRenderingSupport() && isPathRendering) { |
| 203 header->fUseNvpr = true; | 201 header->fUseNvpr = true; |
| 204 SkASSERT(!optState.hasGeometryProcessor()); | 202 SkASSERT(!optState.hasGeometryProcessor()); |
| 205 } else { | 203 } else { |
| 206 header->fUseNvpr = false; | 204 header->fUseNvpr = false; |
| 207 } | 205 } |
| 208 | 206 |
| 209 bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHa
sVertexColor); | 207 bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHa
sVertexColor); |
| 210 | 208 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 251 } |
| 254 | 252 |
| 255 header->fPrimaryOutputType = descInfo.fPrimaryOutputType; | 253 header->fPrimaryOutputType = descInfo.fPrimaryOutputType; |
| 256 header->fSecondaryOutputType = descInfo.fSecondaryOutputType; | 254 header->fSecondaryOutputType = descInfo.fSecondaryOutputType; |
| 257 | 255 |
| 258 header->fColorEffectCnt = optState.numColorStages(); | 256 header->fColorEffectCnt = optState.numColorStages(); |
| 259 header->fCoverageEffectCnt = optState.numCoverageStages(); | 257 header->fCoverageEffectCnt = optState.numCoverageStages(); |
| 260 desc->finalize(); | 258 desc->finalize(); |
| 261 return true; | 259 return true; |
| 262 } | 260 } |
| OLD | NEW |