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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 4a6cd142eb08ee49756564eb294f5bb7f9af64bb..b60a4cef8a3e3258288c6ab240921390d3a6ee6b 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -69,12 +69,12 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
}
// Copy Coverage Stages from DS to ODS
- if (drawState.numCoverageStages() > 0 && separateCoverageFromColor) {
+ if (firstCoverageStageIdx < drawState.numCoverageStages() && separateCoverageFromColor) {
fCoverageStages.reset(&drawState.getCoverageStage(firstCoverageStageIdx),
drawState.numCoverageStages() - firstCoverageStageIdx);
} else {
fCoverageStages.reset();
- if (drawState.numCoverageStages() > 0) {
+ if (firstCoverageStageIdx < drawState.numCoverageStages()) {
// TODO: Once we have flag to know if we only multiply on stages, only push coverage
// into color stages if everything is multiply
fColorStages.push_back_n(drawState.numCoverageStages() - firstCoverageStageIdx,
« 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