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

Unified Diff: src/gpu/GrContext.cpp

Issue 1119423002: Revert of Don't attempt to draw path if dashing or stroking fails (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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/GrContext.cpp
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index b2a1f5b6337ab473d89d98a6e49ae92d7cf7791c..819774a076a88b657f270dd7bc171a4a4908aaa6 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1325,14 +1325,13 @@
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;
- }
- strokeInfoPtr = &dashlessStrokeInfo;
+ if (strokeInfo.applyDash(tmpPath.init(), &dashlessStrokeInfo, *pathPtr)) {
+ pathPtr = tmpPath.get();
+ if (pathPtr->isEmpty()) {
+ return;
+ }
+ strokeInfoPtr = &dashlessStrokeInfo;
+ }
pr = this->getPathRenderer(target, pipelineBuilder, viewMatrix, *pathPtr, *strokeInfoPtr,
false, type);
}
@@ -1345,15 +1344,14 @@
}
SkStrokeRec* strokeRec = dashlessStrokeInfo.getStrokeRecPtr();
strokeRec->setResScale(SkScalarAbs(viewMatrix.getMaxScale()));
- if (!strokeRec->applyToPath(tmpPath.get(), *pathPtr)) {
- return;
+ if (strokeRec->applyToPath(tmpPath.get(), *pathPtr)) {
+ pathPtr = tmpPath.get();
+ if (pathPtr->isEmpty()) {
+ return;
+ }
+ strokeRec->setFillStyle();
+ strokeInfoPtr = &dashlessStrokeInfo;
}
- pathPtr = tmpPath.get();
- if (pathPtr->isEmpty()) {
- return;
- }
- strokeRec->setFillStyle();
- strokeInfoPtr = &dashlessStrokeInfo;
}
// This time, allow SW renderer
« 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