diff --git a/src/gpu/GrProcessorSet.cpp b/src/gpu/GrProcessorSet.cpp index e073679d44..6c9e55df86 100644 --- a/src/gpu/GrProcessorSet.cpp +++ b/src/gpu/GrProcessorSet.cpp @@ -23,9 +23,11 @@ GrProcessorSet::GrProcessorSet(GrPaint&& paint) : fXP(paint.getXPFactory()) { fFragmentProcessors.reset(paint.numTotalFragmentProcessors()); int i = 0; for (auto& fp : paint.fColorFragmentProcessors) { + SkASSERT(fp.get()); fFragmentProcessors[i++] = fp.release(); } for (auto& fp : paint.fCoverageFragmentProcessors) { + SkASSERT(fp.get()); fFragmentProcessors[i++] = fp.release(); } } else { diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp index a6dcdf600a..2a04b1e651 100644 --- a/src/gpu/GrRenderTargetContext.cpp +++ b/src/gpu/GrRenderTargetContext.cpp @@ -1546,11 +1546,11 @@ void GrRenderTargetContext::drawPath(const GrClip& clip, if (fills_as_nested_rects(viewMatrix, path, rects)) { std::unique_ptr op = GrRectOpFactory::MakeAAFillNestedRects(std::move(paint), viewMatrix, rects); - if (!op) { - // A null return indicates that there is nothing to draw in this case. - return; + if (op) { + this->addDrawOp(clip, std::move(op)); } - this->addDrawOp(clip, std::move(op)); + // A null return indicates that there is nothing to draw in this case. + return; } } SkRect ovalRect;