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

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

Issue 639773004: Fix conditional check when copying coverage stages in ODS (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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 // Copy Color Stages from DS to ODS 63 // Copy Color Stages from DS to ODS
64 if (firstColorStageIdx < drawState.numColorStages()) { 64 if (firstColorStageIdx < drawState.numColorStages()) {
65 fColorStages.reset(&drawState.getColorStage(firstColorStageIdx), 65 fColorStages.reset(&drawState.getColorStage(firstColorStageIdx),
66 drawState.numColorStages() - firstColorStageIdx); 66 drawState.numColorStages() - firstColorStageIdx);
67 } else { 67 } else {
68 fColorStages.reset(); 68 fColorStages.reset();
69 } 69 }
70 70
71 // Copy Coverage Stages from DS to ODS 71 // Copy Coverage Stages from DS to ODS
72 if (drawState.numCoverageStages() > 0 && separateCoverageFromColor) { 72 if (firstCoverageStageIdx < drawState.numCoverageStages() && separateCoverag eFromColor) {
73 fCoverageStages.reset(&drawState.getCoverageStage(firstCoverageStageIdx) , 73 fCoverageStages.reset(&drawState.getCoverageStage(firstCoverageStageIdx) ,
74 drawState.numCoverageStages() - firstCoverageStage Idx); 74 drawState.numCoverageStages() - firstCoverageStage Idx);
75 } else { 75 } else {
76 fCoverageStages.reset(); 76 fCoverageStages.reset();
77 if (drawState.numCoverageStages() > 0) { 77 if (firstCoverageStageIdx < drawState.numCoverageStages()) {
78 // TODO: Once we have flag to know if we only multiply on stages, on ly push coverage 78 // TODO: Once we have flag to know if we only multiply on stages, on ly push coverage
79 // into color stages if everything is multiply 79 // into color stages if everything is multiply
80 fColorStages.push_back_n(drawState.numCoverageStages() - firstCovera geStageIdx, 80 fColorStages.push_back_n(drawState.numCoverageStages() - firstCovera geStageIdx,
81 &drawState.getCoverageStage(firstCoverageSt ageIdx)); 81 &drawState.getCoverageStage(firstCoverageSt ageIdx));
82 } 82 }
83 } 83 }
84 }; 84 };
85 85
86 GrOptDrawState* GrOptDrawState::Create(const GrDrawState& drawState, const GrDra wTargetCaps& caps, 86 GrOptDrawState* GrOptDrawState::Create(const GrDrawState& drawState, const GrDra wTargetCaps& caps,
87 GrGpu::DrawType drawType) { 87 GrGpu::DrawType drawType) {
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 } 380 }
381 } 381 }
382 382
383 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices, 383 SkASSERT(0 == memcmp(this->fFixedFunctionVertexAttribIndices,
384 that.fFixedFunctionVertexAttribIndices, 384 that.fFixedFunctionVertexAttribIndices,
385 sizeof(this->fFixedFunctionVertexAttribIndices))); 385 sizeof(this->fFixedFunctionVertexAttribIndices)));
386 386
387 return true; 387 return true;
388 } 388 }
389 389
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