aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-05-04 11:21:34 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-04 11:21:34 -0700
commitb327c3a84a90f966afa00c705f2e7f511321ef6e (patch)
treec527e81183de555849faf4f6bc83c9db0cad7a87 /src/gpu/GrContext.cpp
parent19e259b1ee4e4f42133250cca605ee77c3e40702 (diff)
Revert of Don't attempt to draw path if dashing or stroking fails (patchset #1 id:1 of https://codereview.chromium.org/1119393002/)
Reason for revert: Doesn't draw Original issue's description: > Don't attempt to draw path if dashing or stroking fails > > > TBR=egdaniel@google.com > > Committed: https://skia.googlesource.com/skia/+/39202f12d37b6ef69ffaddcaa8cc92c621fcda41 TBR=egdaniel@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1119423002
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rwxr-xr-xsrc/gpu/GrContext.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index b2a1f5b633..819774a076 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1325,14 +1325,13 @@ void GrContext::internalDrawPath(GrDrawTarget* target,
GrStrokeInfo dashlessStrokeInfo(strokeInfo, false);
if (NULL == pr && strokeInfo.isDashed()) {
// It didn't work above, so try again with dashed stroke converted to a dashless stroke.
- if (!strokeInfo.applyDash(tmpPath.init(), &dashlessStrokeInfo, *pathPtr)) {
- return;
- }
- pathPtr = tmpPath.get();
- if (pathPtr->isEmpty()) {
- return;
+ if (strokeInfo.applyDash(tmpPath.init(), &dashlessStrokeInfo, *pathPtr)) {
+ pathPtr = tmpPath.get();
+ if (pathPtr->isEmpty()) {
+ return;
+ }
+ strokeInfoPtr = &dashlessStrokeInfo;
}
- strokeInfoPtr = &dashlessStrokeInfo;
pr = this->getPathRenderer(target, pipelineBuilder, viewMatrix, *pathPtr, *strokeInfoPtr,
false, type);
}
@@ -1345,15 +1344,14 @@ void GrContext::internalDrawPath(GrDrawTarget* target,
}
SkStrokeRec* strokeRec = dashlessStrokeInfo.getStrokeRecPtr();
strokeRec->setResScale(SkScalarAbs(viewMatrix.getMaxScale()));
- if (!strokeRec->applyToPath(tmpPath.get(), *pathPtr)) {
- return;
- }
- pathPtr = tmpPath.get();
- if (pathPtr->isEmpty()) {
- return;
+ if (strokeRec->applyToPath(tmpPath.get(), *pathPtr)) {
+ pathPtr = tmpPath.get();
+ if (pathPtr->isEmpty()) {
+ return;
+ }
+ strokeRec->setFillStyle();
+ strokeInfoPtr = &dashlessStrokeInfo;
}
- strokeRec->setFillStyle();
- strokeInfoPtr = &dashlessStrokeInfo;
}
// This time, allow SW renderer