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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 326103002: Use vertex attributes for dash effect in gpu (Closed) Base URL: https://skia.googlesource.com/skia.git@dashPlumb2
Patch Set: Format changes Created 6 years, 6 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
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 35543d855d22cdae0478458c3d89b5aabe489c00..ec8aa9b5adb344d42d524c20a30e33ff3a921a97 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -397,9 +397,14 @@ void SkGpuDevice::drawPoints(const SkDraw& draw, SkCanvas::PointMode mode,
}
if (paint.getPathEffect() && 2 == count && SkCanvas::kLines_PointMode == mode) {
- if (GrDashingEffect::DrawDashLine(pts, paint, this->context())) {
- return;
- }
+ GrStrokeInfo strokeInfo(paint);
+ GrPaint grPaint;
+ SkPaint2GrPaintShader(this->context(), paint, true, &grPaint);
+ SkPath path;
+ path.moveTo(pts[0]);
+ path.lineTo(pts[1]);
+ fContext->drawPath(grPaint, path, strokeInfo);
+ return;
}
// we only handle hairlines and paints without path effects or mask filters,

Powered by Google App Engine
This is Rietveld 408576698