Fix logic error when drawing path as nested rects
Bug: chromium:732350 Change-Id: I42770e9fa8c201780f16ce8df58b208e08aef640 Reviewed-on: https://skia-review.googlesource.com/20158 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
7a808d618e
commit
5f970fe6be
@ -23,9 +23,11 @@ GrProcessorSet::GrProcessorSet(GrPaint&& paint) : fXP(paint.getXPFactory()) {
|
|||||||
fFragmentProcessors.reset(paint.numTotalFragmentProcessors());
|
fFragmentProcessors.reset(paint.numTotalFragmentProcessors());
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto& fp : paint.fColorFragmentProcessors) {
|
for (auto& fp : paint.fColorFragmentProcessors) {
|
||||||
|
SkASSERT(fp.get());
|
||||||
fFragmentProcessors[i++] = fp.release();
|
fFragmentProcessors[i++] = fp.release();
|
||||||
}
|
}
|
||||||
for (auto& fp : paint.fCoverageFragmentProcessors) {
|
for (auto& fp : paint.fCoverageFragmentProcessors) {
|
||||||
|
SkASSERT(fp.get());
|
||||||
fFragmentProcessors[i++] = fp.release();
|
fFragmentProcessors[i++] = fp.release();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1546,11 +1546,11 @@ void GrRenderTargetContext::drawPath(const GrClip& clip,
|
|||||||
if (fills_as_nested_rects(viewMatrix, path, rects)) {
|
if (fills_as_nested_rects(viewMatrix, path, rects)) {
|
||||||
std::unique_ptr<GrDrawOp> op =
|
std::unique_ptr<GrDrawOp> op =
|
||||||
GrRectOpFactory::MakeAAFillNestedRects(std::move(paint), viewMatrix, rects);
|
GrRectOpFactory::MakeAAFillNestedRects(std::move(paint), viewMatrix, rects);
|
||||||
if (!op) {
|
if (op) {
|
||||||
// A null return indicates that there is nothing to draw in this case.
|
this->addDrawOp(clip, std::move(op));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
this->addDrawOp(clip, std::move(op));
|
// A null return indicates that there is nothing to draw in this case.
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SkRect ovalRect;
|
SkRect ovalRect;
|
||||||
|
Loading…
Reference in New Issue
Block a user