Skip to content

Commit

Permalink
rm legacy flag for path iter
Browse files Browse the repository at this point in the history
Change-Id: I5e853241ba13d81787dd8546ef6157af78764525
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947098
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720775}
  • Loading branch information
reed-at-google authored and Commit Bot committed Dec 3, 2019
1 parent d7d07b6 commit 43da699
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
4 changes: 0 additions & 4 deletions skia/config/SkUserConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions skia/ext/benchmarking_canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
4 changes: 2 additions & 2 deletions third_party/blink/renderer/core/paint/object_painter_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 43da699

Please sign in to comment.