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

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

Issue 578323003: Remove unused fRequiresVertexShader data member from OptDrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebased Created 6 years, 2 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/GrOptDrawState.h ('k') | no next file » | 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 2014 Google Inc. 2 * Copyright 2014 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 "GrOptDrawState.h" 8 #include "GrOptDrawState.h"
9 9
10 #include "GrDrawState.h" 10 #include "GrDrawState.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (stage.getFragmentProcessor()->willReadFragmentPosition()) { 238 if (stage.getFragmentProcessor()->willReadFragmentPosition()) {
239 *readsFragPosition = true; 239 *readsFragPosition = true;
240 } 240 }
241 } 241 }
242 242
243 void GrOptDrawState::getStageStats() { 243 void GrOptDrawState::getStageStats() {
244 // We will need a local coord attrib if there is one currently set on the op tState and we are 244 // We will need a local coord attrib if there is one currently set on the op tState and we are
245 // actually generating some effect code 245 // actually generating some effect code
246 fRequiresLocalCoordAttrib = this->hasLocalCoordAttribute() && this->numTotal Stages() > 0; 246 fRequiresLocalCoordAttrib = this->hasLocalCoordAttribute() && this->numTotal Stages() > 0;
247 247
248 // if 1 == fVACount then that VA must be position, otherwise it contains som e attribute which
249 // will require a vertexShader
250 fRequiresVertexShader = fVACount > 1;
251
252 fReadsDst = false; 248 fReadsDst = false;
253 fReadsFragPosition = false; 249 fReadsFragPosition = false;
254 250
255 for (int s = 0; s < this->numColorStages(); ++s) { 251 for (int s = 0; s < this->numColorStages(); ++s) {
256 const GrFragmentStage& stage = this->getColorStage(s); 252 const GrFragmentStage& stage = this->getColorStage(s);
257 get_stage_stats(stage, &fReadsDst, &fReadsFragPosition); 253 get_stage_stats(stage, &fReadsDst, &fReadsFragPosition);
258 } 254 }
259 for (int s = 0; s < this->numCoverageStages(); ++s) { 255 for (int s = 0; s < this->numCoverageStages(); ++s) {
260 const GrFragmentStage& stage = this->getCoverageStage(s); 256 const GrFragmentStage& stage = this->getCoverageStage(s);
261 get_stage_stats(stage, &fReadsDst, &fReadsFragPosition); 257 get_stage_stats(stage, &fReadsDst, &fReadsFragPosition);
262 } 258 }
263 if (this->hasGeometryProcessor()) { 259 if (this->hasGeometryProcessor()) {
264 const GrGeometryStage& stage = *this->getGeometryProcessor(); 260 const GrGeometryStage& stage = *this->getGeometryProcessor();
265 fReadsFragPosition = fReadsFragPosition || stage.getProcessor()->willRea dFragmentPosition(); 261 fReadsFragPosition = fReadsFragPosition || stage.getProcessor()->willRea dFragmentPosition();
266 SkASSERT(fRequiresVertexShader);
267 } 262 }
268 } 263 }
269 264
270 bool GrOptDrawState::operator== (const GrOptDrawState& that) const { 265 bool GrOptDrawState::operator== (const GrOptDrawState& that) const {
271 return this->isEqual(that); 266 return this->isEqual(that);
272 } 267 }
273 268
OLDNEW
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698