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

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: nit 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
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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 } 180 }
181 } 181 }
182 182
183 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder, 183 void GrPipeline::adjustProgramFromOptimizations(const GrPipelineBuilder& pipelin eBuilder,
184 GrXferProcessor::OptFlags flags, 184 GrXferProcessor::OptFlags flags,
185 const GrProcOptInfo& colorPOI, 185 const GrProcOptInfo& colorPOI,
186 const GrProcOptInfo& coveragePOI , 186 const GrProcOptInfo& coveragePOI ,
187 int* firstColorProcessorIdx, 187 int* firstColorProcessorIdx,
188 int* firstCoverageProcessorIdx) { 188 int* firstCoverageProcessorIdx) {
189 fReadsCoverage = !(flags & GrXferProcessor::kIgnoreCoverage_OptFlag);
189 fReadsFragPosition = fXferProcessor->willReadFragmentPosition(); 190 fReadsFragPosition = fXferProcessor->willReadFragmentPosition();
190 191
191 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) || 192 if ((flags & GrXferProcessor::kIgnoreColor_OptFlag) ||
192 (flags & GrXferProcessor::kOverrideColor_OptFlag)) { 193 (flags & GrXferProcessor::kOverrideColor_OptFlag)) {
193 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors(); 194 *firstColorProcessorIdx = pipelineBuilder.numColorFragmentProcessors();
194 } else { 195 } else {
195 if (coveragePOI.readsFragPosition()) { 196 if (coveragePOI.readsFragPosition()) {
196 fReadsFragPosition = true; 197 fReadsFragPosition = true;
197 } 198 }
198 } 199 }
(...skipping 28 matching lines...) Expand all
227 } 228 }
228 229
229 for (int i = 0; i < a.numFragmentProcessors(); i++) { 230 for (int i = 0; i < a.numFragmentProcessors(); i++) {
230 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) { 231 if (!a.getFragmentProcessor(i).isEqual(b.getFragmentProcessor(i), ignore CoordTransforms)) {
231 return false; 232 return false;
232 } 233 }
233 } 234 }
234 return true; 235 return true;
235 } 236 }
236 237
OLDNEW
« src/gpu/GrPipeline.h ('K') | « src/gpu/GrPipeline.h ('k') | src/gpu/GrProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698