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

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 1307223004: Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix misresolve Created 5 years, 3 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/gl/GrGLProgram.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 2013 Google Inc. 2 * Copyright 2013 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 #include "GrGLProgramDesc.h" 7 #include "GrGLProgramDesc.h"
8 8
9 #include "GrGLFragmentProcessor.h" 9 #include "GrGLFragmentProcessor.h"
10 #include "GrProcessor.h" 10 #include "GrProcessor.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 GrProcessorKeyBuilder b(&glDesc->key()); 128 GrProcessorKeyBuilder b(&glDesc->key());
129 129
130 primProc.getGLProcessorKey(batchTracker, *gpu->glCaps().glslCaps(), &b); 130 primProc.getGLProcessorKey(batchTracker, *gpu->glCaps().glslCaps(), &b);
131 //**** use glslCaps here? 131 //**** use glslCaps here?
132 if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) { 132 if (!get_meta_key(primProc, gpu->glCaps(), 0, &b)) {
133 glDesc->key().reset(); 133 glDesc->key().reset();
134 return false; 134 return false;
135 } 135 }
136 136
137 for (int s = 0; s < pipeline.numFragmentStages(); ++s) { 137 for (int i = 0; i < pipeline.numFragmentProcessors(); ++i) {
138 const GrPendingFragmentStage& fps = pipeline.getFragmentStage(s); 138 const GrFragmentProcessor& fp = pipeline.getFragmentProcessor(i);
139 const GrFragmentProcessor& fp = *fps.processor();
140 if (!get_frag_proc_and_meta_keys(primProc, fp, gpu->glCaps(), &b)) { 139 if (!get_frag_proc_and_meta_keys(primProc, fp, gpu->glCaps(), &b)) {
141 glDesc->key().reset(); 140 glDesc->key().reset();
142 return false; 141 return false;
143 } 142 }
144 } 143 }
145 144
146 const GrXferProcessor& xp = *pipeline.getXferProcessor(); 145 const GrXferProcessor& xp = *pipeline.getXferProcessor();
147 xp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b); 146 xp.getGLProcessorKey(*gpu->glCaps().glslCaps(), &b);
148 //**** use glslCaps here? 147 //**** use glslCaps here?
149 if (!get_meta_key(xp, gpu->glCaps(), 0, &b)) { 148 if (!get_meta_key(xp, gpu->glCaps(), 0, &b)) {
(...skipping 10 matching lines...) Expand all
160 memset(header, 0, kHeaderSize); 159 memset(header, 0, kHeaderSize);
161 160
162 if (pipeline.readsFragPosition()) { 161 if (pipeline.readsFragPosition()) {
163 header->fFragPosKey = 162 header->fFragPosKey =
164 GrGLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.getRe nderTarget(), 163 GrGLFragmentShaderBuilder::KeyForFragmentPosition(pipeline.getRe nderTarget(),
165 gpu->glCaps()) ; 164 gpu->glCaps()) ;
166 } else { 165 } else {
167 header->fFragPosKey = 0; 166 header->fFragPosKey = 0;
168 } 167 }
169 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters(); 168 header->fSnapVerticesToPixelCenters = pipeline.snapVerticesToPixelCenters();
170 header->fColorEffectCnt = pipeline.numColorFragmentStages(); 169 header->fColorEffectCnt = pipeline.numColorFragmentProcessors();
171 header->fCoverageEffectCnt = pipeline.numCoverageFragmentStages(); 170 header->fCoverageEffectCnt = pipeline.numCoverageFragmentProcessors();
172 glDesc->finalize(); 171 glDesc->finalize();
173 return true; 172 return true;
174 } 173 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgram.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698