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

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

Issue 1734163002: Replace fWillReadFragmentPosition with a bitfield (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: BuiltInState -> RequiredFeatures Created 4 years, 9 months 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.h ('k') | src/gpu/GrProcOptInfo.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 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 "GrPipeline.h" 8 #include "GrPipeline.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 } 178 }
179 179
180 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder, 180 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder,
181 GrXferProcessor::OptFlags flags, 181 GrXferProcessor::OptFlags flags,
182 const GrProcOptInfo& colorPOI, 182 const GrProcOptInfo& colorPOI,
183 const GrProcOptInfo& coveragePOI , 183 const GrProcOptInfo& coveragePOI ,
184 int* firstColorProcessorIdx, 184 int* firstColorProcessorIdx,
185 int* firstCoverageProcessorIdx) { 185 int* firstCoverageProcessorIdx) {
186 fIgnoresCoverage = SkToBool(flags & GrXferProcessor::kIgnoreCoverage_OptFlag ); 186 fIgnoresCoverage = SkToBool(flags & GrXferProcessor::kIgnoreCoverage_OptFlag );
187 fReadsFragPosition = this->getXferProcessor().willReadFragmentPosition();
188 187
189 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || 188 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
190 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { 189 (flags & GrXferProcessor::kOverrideColor_OptFlag)) {
191 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); 190 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors();
192 } else {
193 if (colorPOI.readsFragPosition()) {
194 fReadsFragPosition = true;
195 }
196 } 191 }
197 192
198 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) { 193 if (flags & GrXferProcessor::kIgnoreCoverage_OptFlag) {
199 *firstCoverageProcessorIdx = pipelineBuilder.numCoverageFragmentProcesso rs(); 194 *firstCoverageProcessorIdx = pipelineBuilder.numCoverageFragmentProcesso rs();
200 } else {
201 if (coveragePOI.readsFragPosition()) {
202 fReadsFragPosition = true;
203 }
204 } 195 }
205 } 196 }
206 197
207 //////////////////////////////////////////////////////////////////////////////// 198 ////////////////////////////////////////////////////////////////////////////////
208 199
209 bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b, 200 bool GrPipeline::AreEqual(const GrPipeline& a, const GrPipeline& b,
210 bool ignoreCoordTransforms) { 201 bool ignoreCoordTransforms) {
211 SkASSERT(&a != &b); 202 SkASSERT(&a != &b);
212 203
213 if (a.getRenderTarget() != b.getRenderTarget() || 204 if (a.getRenderTarget() != b.getRenderTarget() ||
(...skipping 14 matching lines...) Expand all
228 } 219 }
229 220
230 for (int i = 0; i < a.numFragmentProcessors(); i++) { 221 for (int i = 0; i < a.numFragmentProcessors(); i++) {
231 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) { 222 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) {
232 return false; 223 return false;
233 } 224 }
234 } 225 }
235 return true; 226 return true;
236 } 227 }
237 228
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrProcOptInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698