Commit 43da6997 authored by Mike Reed's avatar Mike Reed Committed by Commit Bot

rm legacy flag for path iter

Change-Id: I5e853241ba13d81787dd8546ef6157af78764525
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947098
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: default avatarFlorin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720775}
parent d7d07b6f
......@@ -211,10 +211,6 @@ SK_API void SkDebugf_FileLine(const char* file,
#define SK_DISABLE_REDUCE_OPLIST_SPLITTING
#endif
#ifndef SK_SUPPORT_LEGACY_PATHITER_NEXT
#define SK_SUPPORT_LEGACY_PATHITER_NEXT
#endif
#ifndef SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
#define SK_IGNORE_LINEONLY_AA_CONVEX_PATH_OPTS
#endif
......
......@@ -299,23 +299,23 @@ std::unique_ptr<base::Value> AsValue(const SkPath& path) {
SkPath::Iter iter(const_cast<SkPath&>(path), false);
SkPoint points[4];
for(SkPath::Verb verb = iter.next(points, false);
verb != SkPath::kDone_Verb; verb = iter.next(points, false)) {
DCHECK_LT(static_cast<size_t>(verb), SK_ARRAY_COUNT(gVerbStrings));
for (SkPath::Verb verb = iter.next(points); verb != SkPath::kDone_Verb;
verb = iter.next(points)) {
DCHECK_LT(static_cast<size_t>(verb), SK_ARRAY_COUNT(gVerbStrings));
std::unique_ptr<base::DictionaryValue> verb_val(
new base::DictionaryValue());
std::unique_ptr<base::ListValue> pts_val(new base::ListValue());
std::unique_ptr<base::DictionaryValue> verb_val(
new base::DictionaryValue());
std::unique_ptr<base::ListValue> pts_val(new base::ListValue());
for (int i = 0; i < gPtsPerVerb[verb]; ++i)
pts_val->Append(AsValue(points[i + gPtOffsetPerVerb[verb]]));
for (int i = 0; i < gPtsPerVerb[verb]; ++i)
pts_val->Append(AsValue(points[i + gPtOffsetPerVerb[verb]]));
verb_val->Set(gVerbStrings[verb], std::move(pts_val));
verb_val->Set(gVerbStrings[verb], std::move(pts_val));
if (SkPath::kConic_Verb == verb)
verb_val->Set("weight", AsValue(iter.conicWeight()));
if (SkPath::kConic_Verb == verb)
verb_val->Set("weight", AsValue(iter.conicWeight()));
verbs_val->Append(std::move(verb_val));
verbs_val->Append(std::move(verb_val));
}
val->Set("verbs", std::move(verbs_val));
......
......@@ -111,8 +111,8 @@ void PaintComplexOutline(GraphicsContext& graphics_context,
SkPath::Iter iter(path, false);
SkPoint points[4];
wtf_size_t count = 0;
for (SkPath::Verb verb = iter.next(points, false); verb != SkPath::kDone_Verb;
verb = iter.next(points, false)) {
for (SkPath::Verb verb = iter.next(points); verb != SkPath::kDone_Verb;
verb = iter.next(points)) {
if (verb != SkPath::kLine_Verb)
continue;
......
......@@ -229,8 +229,8 @@ std::unique_ptr<JSONObject> ObjectForSkPath(const SkPath& path) {
SkPath::Iter iter(path, false);
SkPoint points[4];
auto path_points_array = std::make_unique<JSONArray>();
for (SkPath::Verb verb = iter.next(points, false); verb != SkPath::kDone_Verb;
verb = iter.next(points, false)) {
for (SkPath::Verb verb = iter.next(points); verb != SkPath::kDone_Verb;
verb = iter.next(points)) {
VerbParams verb_params = SegmentParams(verb);
auto path_point_item = std::make_unique<JSONObject>();
path_point_item->SetString("verb", verb_params.name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment