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

Side by Side Diff: src/gpu/GrProgramDesc.cpp

Issue 2468653002: Remove GrStencilSettings from GrPipeline (Closed)
Patch Set: Remove GrStencilSettings from GrPipeline Created 4 years, 1 month 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/GrPipeline.cpp ('k') | src/gpu/GrReducedClip.cpp » ('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 2016 Google Inc. 2 * Copyright 2016 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 "GrProgramDesc.h" 7 #include "GrProgramDesc.h"
8 8
9 #include "GrProcessor.h" 9 #include "GrProcessor.h"
10 #include "GrPipeline.h" 10 #include "GrPipeline.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 if (requiredFeatures & (GrProcessor::kFragmentPosition_RequiredFeature | 158 if (requiredFeatures & (GrProcessor::kFragmentPosition_RequiredFeature |
159 GrProcessor::kSampleLocations_RequiredFeature)) { 159 GrProcessor::kSampleLocations_RequiredFeature)) {
160 header->fSurfaceOriginKey = GrGLSLFragmentShaderBuilder::KeyForSurfaceOr igin(rt->origin()); 160 header->fSurfaceOriginKey = GrGLSLFragmentShaderBuilder::KeyForSurfaceOr igin(rt->origin());
161 } else { 161 } else {
162 header->fSurfaceOriginKey = 0; 162 header->fSurfaceOriginKey = 0;
163 } 163 }
164 164
165 if (requiredFeatures & GrProcessor::kSampleLocations_RequiredFeature) { 165 if (requiredFeatures & GrProcessor::kSampleLocations_RequiredFeature) {
166 SkASSERT(pipeline.isHWAntialiasState()); 166 SkASSERT(pipeline.isHWAntialiasState());
167 header->fSamplePatternKey = 167 header->fSamplePatternKey =
168 rt->renderTargetPriv().getMultisampleSpecs(pipeline.getStencil()).fU niqueID; 168 rt->renderTargetPriv().getMultisampleSpecs(pipeline).fUniqueID;
169 } else { 169 } else {
170 header->fSamplePatternKey = 0; 170 header->fSamplePatternKey = 0;
171 } 171 }
172 172
173 header->fOutputSwizzle = glslCaps.configOutputSwizzle(rt->config()).asKey(); 173 header->fOutputSwizzle = glslCaps.configOutputSwizzle(rt->config()).asKey();
174 174
175 header->fIgnoresCoverage = pipeline.ignoresCoverage() ? 1 : 0; 175 header->fIgnoresCoverage = pipeline.ignoresCoverage() ? 1 : 0;
176 176
177 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); 177 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
178 header->fColorFragmentProcessorCnt = pipeline.numColorFragmentProcessors(); 178 header->fColorFragmentProcessorCnt = pipeline.numColorFragmentProcessors();
179 header->fCoverageFragmentProcessorCnt = pipeline.numCoverageFragmentProcesso rs(); 179 header->fCoverageFragmentProcessorCnt = pipeline.numCoverageFragmentProcesso rs();
180 // Fail if the client requested more processors than the key can fit. 180 // Fail if the client requested more processors than the key can fit.
181 if (header->fColorFragmentProcessorCnt != pipeline.numColorFragmentProcessor s() || 181 if (header->fColorFragmentProcessorCnt != pipeline.numColorFragmentProcessor s() ||
182 header->fCoverageFragmentProcessorCnt != pipeline.numCoverageFragmentPro cessors()) { 182 header->fCoverageFragmentProcessorCnt != pipeline.numCoverageFragmentPro cessors()) {
183 return false; 183 return false;
184 } 184 }
185 header->fHasPointSize = hasPointSize ? 1 : 0; 185 header->fHasPointSize = hasPointSize ? 1 : 0;
186 return true; 186 return true;
187 } 187 }
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698