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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 1114463002: Pass dashing info from drawPath to Gr side (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/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 337f400056f87c9d48d7d536c6ae3d30568a4c55..4e79db5cf727eae0650dee5247d211782df29261 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -826,17 +826,23 @@ void SkGpuDevice::internalDrawPath(const SkPath& origSrcPath, const SkPaint& pai
const SkRect* cullRect = NULL; // TODO: what is our bounds?
SkStrokeRec* strokePtr = strokeInfo.getStrokeRecPtr();
- if (pathEffect && pathEffect->filterPath(effectPath.init(), *pathPtr, strokePtr,
- cullRect)) {
+ if (!strokeInfo.isDashed() && pathEffect && pathEffect->filterPath(effectPath.init(), *pathPtr,
+ strokePtr, cullRect)) {
pathPtr = effectPath.get();
pathIsMutable = true;
- strokeInfo.removeDash();
}
const SkStrokeRec& stroke = strokeInfo.getStrokeRec();
if (paint.getMaskFilter()) {
if (!stroke.isHairlineStyle()) {
SkPath* strokedPath = pathIsMutable ? pathPtr : tmpPath.init();
+ if (strokeInfo.isDashed()) {
+ if (pathEffect->filterPath(strokedPath, *pathPtr, strokePtr, cullRect)) {
+ pathPtr = strokedPath;
+ pathIsMutable = true;
+ }
+ strokeInfo.removeDash();
+ }
if (stroke.applyToPath(strokedPath, *pathPtr)) {
egdaniel 2015/04/28 13:25:48 what happens if both these if statements trigger a
Kimmo Kinnunen 2015/04/28 14:12:30 Yeah, the intention is to first apply the dashing
egdaniel 2015/04/28 14:18:19 So if on line 838, if !pathIsMutable then strokedP
egdaniel 2015/04/28 14:20:09 oh wait I am missing a line. woops ignore all my s
pathPtr = strokedPath;
pathIsMutable = true;
« 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