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

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

Issue 927623002: Determine whether we can tweakAlphaForCoverage during Pipeline/XP creation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: review nit Created 5 years, 10 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 | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrPrimitiveProcessor.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 "GrBatch.h" 10 #include "GrBatch.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 (pipelineBuilder.fCoverageStages[i])); 95 (pipelineBuilder.fCoverageStages[i]));
96 usesLocalCoords = usesLocalCoords || 96 usesLocalCoords = usesLocalCoords ||
97 pipelineBuilder.fCoverageStages[i].processor()->usesLo calCoords(); 97 pipelineBuilder.fCoverageStages[i].processor()->usesLo calCoords();
98 } 98 }
99 99
100 // let the GP init the batch tracker 100 // let the GP init the batch tracker
101 fInitBT.fColorIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreColor_Op tFlag); 101 fInitBT.fColorIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreColor_Op tFlag);
102 fInitBT.fOverrideColor = fInitBT.fColorIgnored ? GrColor_ILLEGAL : overrideC olor; 102 fInitBT.fOverrideColor = fInitBT.fColorIgnored ? GrColor_ILLEGAL : overrideC olor;
103 fInitBT.fCoverageIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreCover age_OptFlag); 103 fInitBT.fCoverageIgnored = SkToBool(optFlags & GrXferProcessor::kIgnoreCover age_OptFlag);
104 fInitBT.fUsesLocalCoords = usesLocalCoords; 104 fInitBT.fUsesLocalCoords = usesLocalCoords;
105 fInitBT.fCanTweakAlphaForCoverage =
106 SkToBool(optFlags & GrXferProcessor::kCanTweakAlphaForCoverage_OptFlag);
105 } 107 }
106 108
107 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder, 109 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder,
108 GrXferProcessor::OptFlags flags, 110 GrXferProcessor::OptFlags flags,
109 const GrProcOptInfo& colorPOI, 111 const GrProcOptInfo& colorPOI,
110 const GrProcOptInfo& coveragePOI , 112 const GrProcOptInfo& coveragePOI ,
111 int* firstColorStageIdx, 113 int* firstColorStageIdx,
112 int* firstCoverageStageIdx) { 114 int* firstCoverageStageIdx) {
113 fReadsFragPosition = false; 115 fReadsFragPosition = false;
114 116
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); 151 SkASSERT(this->numFragmentStages() == that.numFragmentStages());
150 for (int i = 0; i < this->numFragmentStages(); i++) { 152 for (int i = 0; i < this->numFragmentStages(); i++) {
151 153
152 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 154 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
153 return false; 155 return false;
154 } 156 }
155 } 157 }
156 return true; 158 return true;
157 } 159 }
158 160
OLDNEW
« no previous file with comments | « include/gpu/GrXferProcessor.h ('k') | src/gpu/GrPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698