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

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: Float fix 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
« no previous file with comments | « src/gpu/GrStrokeInfo.h ('k') | src/gpu/effects/GrDashingEffect.h » ('j') | 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 288ea5ae6d13f61e3cffc54f0ea54856b66dbca7..11a79dbe7dc3f6ef23015a921d80ea39ae65b8de 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -386,9 +386,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, SkPaint::kStroke_Style);
+ 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,
« no previous file with comments | « src/gpu/GrStrokeInfo.h ('k') | src/gpu/effects/GrDashingEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698