Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(707)

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 776243005: Revert of move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
199 bool isPathRendering = GrGpu::IsPathRenderingDrawType(drawType); 201 bool isPathRendering = GrGpu::IsPathRenderingDrawType(drawType);
200 if (gpu->caps()->pathRenderingSupport() && isPathRendering) { 202 if (gpu->caps()->pathRenderingSupport() && isPathRendering) {
201 header->fUseNvpr = true; 203 header->fUseNvpr = true;
202 SkASSERT(!optState.hasGeometryProcessor()); 204 SkASSERT(!optState.hasGeometryProcessor());
203 } else { 205 } else {
204 header->fUseNvpr = false; 206 header->fUseNvpr = false;
205 } 207 }
206 208
207 bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHa sVertexColor); 209 bool hasUniformColor = inputColorIsUsed && (isPathRendering || !descInfo.fHa sVertexColor);
208 210
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 253 }
252 254
253 header->fPrimaryOutputType = descInfo.fPrimaryOutputType; 255 header->fPrimaryOutputType = descInfo.fPrimaryOutputType;
254 header->fSecondaryOutputType = descInfo.fSecondaryOutputType; 256 header->fSecondaryOutputType = descInfo.fSecondaryOutputType;
255 257
256 header->fColorEffectCnt = optState.numColorStages(); 258 header->fColorEffectCnt = optState.numColorStages();
257 header->fCoverageEffectCnt = optState.numCoverageStages(); 259 header->fCoverageEffectCnt = optState.numCoverageStages();
258 desc->finalize(); 260 desc->finalize();
259 return true; 261 return true;
260 } 262 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698