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

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

Issue 1049143002: Add onGetBlendInfo to GrXferProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_nvbea_tokens
Patch Set: rebase Created 5 years, 8 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/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (pipelineBuilder.isDither()) { 64 if (pipelineBuilder.isDither()) {
65 fFlags |= kDither_Flag; 65 fFlags |= kDither_Flag;
66 } 66 }
67 67
68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex(); 68 int firstColorStageIdx = colorPOI.firstEffectiveStageIndex();
69 69
70 // TODO: Once we can handle single or four channel input into coverage stage s then we can use 70 // TODO: Once we can handle single or four channel input into coverage stage s then we can use
71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi al information. 71 // GrPipelineBuilder's coverageProcInfo (like color above) to set this initi al information.
72 int firstCoverageStageIdx = 0; 72 int firstCoverageStageIdx = 0;
73 73
74 GrXferProcessor::BlendInfo blendInfo;
75 fXferProcessor->getBlendInfo(&blendInfo);
76
77 this->adjustProgramFromOptimizations(pipelineBuilder, optFlags, colorPOI, co veragePOI, 74 this->adjustProgramFromOptimizations(pipelineBuilder, optFlags, colorPOI, co veragePOI,
78 &firstColorStageIdx, &firstCoverageStag eIdx); 75 &firstColorStageIdx, &firstCoverageStag eIdx);
79 76
80 bool usesLocalCoords = false; 77 bool usesLocalCoords = false;
81 78
82 // Copy Stages from PipelineBuilder to Pipeline 79 // Copy Stages from PipelineBuilder to Pipeline
83 for (int i = firstColorStageIdx; i < pipelineBuilder.numColorFragmentStages( ); ++i) { 80 for (int i = firstColorStageIdx; i < pipelineBuilder.numColorFragmentStages( ); ++i) {
84 SkNEW_APPEND_TO_TARRAY(&fFragmentStages, 81 SkNEW_APPEND_TO_TARRAY(&fFragmentStages,
85 GrPendingFragmentStage, 82 GrPendingFragmentStage,
86 (pipelineBuilder.fColorStages[i])); 83 (pipelineBuilder.fColorStages[i]));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 SkASSERT(this->numFragmentStages() == that.numFragmentStages()); 150 SkASSERT(this->numFragmentStages() == that.numFragmentStages());
154 for (int i = 0; i < this->numFragmentStages(); i++) { 151 for (int i = 0; i < this->numFragmentStages(); i++) {
155 152
156 if (this->getFragmentStage(i) != that.getFragmentStage(i)) { 153 if (this->getFragmentStage(i) != that.getFragmentStage(i)) {
157 return false; 154 return false;
158 } 155 }
159 } 156 }
160 return true; 157 return true;
161 } 158 }
162 159
OLDNEW
« no previous file with comments | « src/effects/SkArithmeticMode_gpu.cpp ('k') | src/gpu/effects/GrCoverageSetOpXP.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698