From c0651c14ed9dc9015d8882885ee42a3c572e8e7e Mon Sep 17 00:00:00 2001 From: egdaniel Date: Tue, 21 Oct 2014 07:47:10 -0700 Subject: Add check to see if we need to remove fixed funciton VA in OptDrawState BUG=skia: Review URL: https://codereview.chromium.org/667033003 --- src/gpu/GrOptDrawState.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp index 40e0c6ce1f..77a9fc8dc4 100644 --- a/src/gpu/GrOptDrawState.cpp +++ b/src/gpu/GrOptDrawState.cpp @@ -48,7 +48,9 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState, this->adjustFromBlendOpts(drawState, &firstColorStageIdx, &firstCoverageStageIdx, &fixedFunctionVAToRemove); // Should not be setting any more FFVA to be removed at this point - this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove); + if (0 != fixedFunctionVAToRemove) { + this->removeFixedFunctionVertexAttribs(fixedFunctionVAToRemove); + } this->getStageStats(drawState, firstColorStageIdx, firstCoverageStageIdx); this->setOutputStateInfo(drawState, caps, firstCoverageStageIdx, &separateCoverageFromColor); -- cgit v1.2.3