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

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

Issue 1471293003: Create a static instances of SrcOver XferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix Build Created 5 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/GrPipeline.h ('k') | src/gpu/GrProgramDesc.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 180
181 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder, 181 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder,
182 GrXferProcessor::OptFlags flags, 182 GrXferProcessor::OptFlags flags,
183 const GrProcOptInfo& colorPOI, 183 const GrProcOptInfo& colorPOI,
184 const GrProcOptInfo& coveragePOI , 184 const GrProcOptInfo& coveragePOI ,
185 int* firstColorProcessorIdx, 185 int* firstColorProcessorIdx,
186 int* firstCoverageProcessorIdx) { 186 int* firstCoverageProcessorIdx) {
187 fIgnoresCoverage = SkToBool(flags & GrXferProcessor::kIgnoreCoverage_OptFlag );
187 fReadsFragPosition = fXferProcessor->willReadFragmentPosition(); 188 fReadsFragPosition = fXferProcessor->willReadFragmentPosition();
188 189
189 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || 190 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
190 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { 191 (flags & GrXferProcessor::kOverrideColor_OptFlag)) {
191 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); 192 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors();
192 } else { 193 } else {
193 if (coveragePOI.readsFragPosition()) { 194 if (coveragePOI.readsFragPosition()) {
194 fReadsFragPosition = true; 195 fReadsFragPosition = true;
195 } 196 }
196 } 197 }
(...skipping 28 matching lines...) Expand all
225 } 226 }
226 227
227 for (int i = 0; i < a.numFragmentProcessors(); i++) { 228 for (int i = 0; i < a.numFragmentProcessors(); i++) {
228 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) { 229 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) {
229 return false; 230 return false;
230 } 231 }
231 } 232 }
232 return true; 233 return true;
233 } 234 }
234 235
OLDNEW
« no previous file with comments | « src/gpu/GrPipeline.h ('k') | src/gpu/GrProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698