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

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

Issue 667033003: Add check to see if we need to remove fixed funciton VA in OptDrawState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | 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 30 matching lines...) Expand all
41 int firstCoverageStageIdx = 0; 41 int firstCoverageStageIdx = 0;
42 bool separateCoverageFromColor; 42 bool separateCoverageFromColor;
43 43
44 uint8_t fixedFunctionVAToRemove = 0; 44 uint8_t fixedFunctionVAToRemove = 0;
45 45
46 this->computeEffectiveColorStages(drawState, &firstColorStageIdx, &fixedFunc tionVAToRemove); 46 this->computeEffectiveColorStages(drawState, &firstColorStageIdx, &fixedFunc tionVAToRemove);
47 this->computeEffectiveCoverageStages(drawState, &firstCoverageStageIdx); 47 this->computeEffectiveCoverageStages(drawState, &firstCoverageStageIdx);
48 this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStag eIdx, 48 this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStag eIdx,
49 &fixedFunctionVAToRemove); 49 &fixedFunctionVAToRemove);
50 // Should not be setting any more FFVA to be removed at this point 50 // Should not be setting any more FFVA to be removed at this point
51 this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove); 51 if (0 != fixedFunctionVAToRemove) {
52 this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove);
53 }
52 this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx); 54 this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx);
53 this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCo verageFromColor); 55 this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCo verageFromColor);
54 56
55 // Copy GeometryProcesssor from DS or ODS 57 // Copy GeometryProcesssor from DS or ODS
56 if (drawState.hasGeometryProcessor()) { 58 if (drawState.hasGeometryProcessor()) {
57 fGeometryProcessor.initAndRef(drawState.fGeometryProcessor); 59 fGeometryProcessor.initAndRef(drawState.fGeometryProcessor);
58 } else { 60 } else {
59 fGeometryProcessor.reset(NULL); 61 fGeometryProcessor.reset(NULL);
60 } 62 }
61 63
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 } 375 }
374 } 376 }
375 377
376 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, 378 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices,
377 that.fFixedFunctionVertexAttribIndices, 379 that.fFixedFunctionVertexAttribIndices,
378 sizeof(this->fFixedFunctionVertexAttribIndices))); 380 sizeof(this->fFixedFunctionVertexAttribIndices)));
379 381
380 return true; 382 return true;
381 } 383 }
382 384
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698