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

Unified Diff: src/pdf/SkPDFUtils.cpp

Issue 811863006: Revert of enable conics gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 12 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 | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFUtils.cpp
diff --git a/src/pdf/SkPDFUtils.cpp b/src/pdf/SkPDFUtils.cpp
index e488f7da06956ede2d49139a788f3925ccd57b16..d034270e07447f07503e603109868d72e9d252f9 100644
--- a/src/pdf/SkPDFUtils.cpp
+++ b/src/pdf/SkPDFUtils.cpp
@@ -93,13 +93,6 @@
SkPDFScalar::Append(dstY, content);
content->writeText(" ");
content->writeText(cmd.c_str());
-}
-
-static void append_quad(const SkPoint quad[], SkWStream* content) {
- SkPoint cubic[4];
- SkConvertQuadToCubic(quad, cubic);
- SkPDFUtils::AppendCubic(cubic[1].fX, cubic[1].fY, cubic[2].fX, cubic[2].fY,
- cubic[3].fX, cubic[3].fY, content);
}
// static
@@ -137,7 +130,9 @@
SkDynamicMemoryWStream currentSegment;
SkPoint args[4];
SkPath::Iter iter(path, false);
- for (SkPath::Verb verb = iter.next(args); verb != SkPath::kDone_Verb; verb = iter.next(args)) {
+ for (SkPath::Verb verb = iter.next(args);
+ verb != SkPath::kDone_Verb;
+ verb = iter.next(args)) {
// args gets all the points, even the implicit first point.
switch (verb) {
case SkPath::kMove_Verb:
@@ -155,18 +150,14 @@
fillState = kNonSingleLine_SkipFillState;
}
break;
- case SkPath::kQuad_Verb:
- append_quad(args, &currentSegment);
+ case SkPath::kQuad_Verb: {
+ SkPoint cubic[4];
+ SkConvertQuadToCubic(args, cubic);
+ AppendCubic(cubic[1].fX, cubic[1].fY, cubic[2].fX, cubic[2].fY,
+ cubic[3].fX, cubic[3].fY, &currentSegment);
fillState = kNonSingleLine_SkipFillState;
break;
- case SkPath::kConic_Verb: {
- const SkScalar tol = SK_Scalar1 / 4;
- SkAutoConicToQuads converter;
- const SkPoint* quads = converter.computeQuads(args, iter.conicWeight(), tol);
- for (int i = 0; i < converter.countQuads(); ++i) {
- append_quad(&quads[i * 2], &currentSegment);
- }
- } break;
+ }
case SkPath::kCubic_Verb:
AppendCubic(args[1].fX, args[1].fY, args[2].fX, args[2].fY,
args[3].fX, args[3].fY, &currentSegment);
« no previous file with comments | « gyp/gmslides.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698