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

Unified Diff: src/gpu/GrStrokeInfo.cpp

Issue 1100073003: Extract gpu line dashing to GrDashLinePathRenderer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments 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 | « src/gpu/GrStrokeInfo.h ('k') | src/gpu/GrTessellatingPathRenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStrokeInfo.cpp
diff --git a/src/gpu/GrStrokeInfo.cpp b/src/gpu/GrStrokeInfo.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..30f4b8931e4bbf680cac9b4f6886d277a243c742
--- /dev/null
+++ b/src/gpu/GrStrokeInfo.cpp
@@ -0,0 +1,23 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrStrokeInfo.h"
+
+#include "SkDashPathPriv.h"
+
+bool GrStrokeInfo::applyDash(SkPath* dst, GrStrokeInfo* dstStrokeInfo, const SkPath& src) const {
+ if (this->isDashed()) {
+ const SkPathEffect::DashInfo& info = this->getDashInfo();
+ SkStrokeRec strokeRec = fStroke;
+ if (SkDashPath::FilterDashPath(dst, src, &strokeRec, NULL, info)) {
+ dstStrokeInfo->fStroke = strokeRec;
+ dstStrokeInfo->removeDash();
+ return true;
+ }
+ }
+ return false;
+}
« no previous file with comments | « src/gpu/GrStrokeInfo.h ('k') | src/gpu/GrTessellatingPathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698