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

Side by Side Diff: src/core/SkEdgeBuilder.cpp

Issue 1707383002: remove legacy flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/core/SkScan_Path.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkEdgeBuilder.h" 8 #include "SkEdgeBuilder.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkEdge.h" 10 #include "SkEdge.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 last->fLastY = last->fFirstY - 1; 58 last->fLastY = last->fFirstY - 1;
59 last->fFirstY = edge->fFirstY; 59 last->fFirstY = edge->fFirstY;
60 last->fWinding = edge->fWinding; 60 last->fWinding = edge->fWinding;
61 return kPartial_Combine; 61 return kPartial_Combine;
62 } 62 }
63 return kNo_Combine; 63 return kNo_Combine;
64 } 64 }
65 65
66 static bool vertical_line(const SkEdge* edge) { 66 static bool vertical_line(const SkEdge* edge) {
67 #ifdef SK_SUPPORT_LEGACY_VERTICAL_EDGE // this disables combining vertical over lapping edges
68 return false;
69 #endif
70 return !edge->fDX && !edge->fCurveCount; 67 return !edge->fDX && !edge->fCurveCount;
71 } 68 }
72 69
73 void SkEdgeBuilder::addLine(const SkPoint pts[]) { 70 void SkEdgeBuilder::addLine(const SkPoint pts[]) {
74 SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc); 71 SkEdge* edge = typedAllocThrow<SkEdge>(fAlloc);
75 if (edge->setLine(pts[0], pts[1], fShiftUp)) { 72 if (edge->setLine(pts[0], pts[1], fShiftUp)) {
76 if (vertical_line(edge) && fList.count()) { 73 if (vertical_line(edge) && fList.count()) {
77 Combine combine = CombineVertical(edge, *(fList.end() - 1)); 74 Combine combine = CombineVertical(edge, *(fList.end() - 1));
78 if (kNo_Combine != combine) { 75 if (kNo_Combine != combine) {
79 if (kTotal_Combine == combine) { 76 if (kTotal_Combine == combine) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 327 }
331 default: 328 default:
332 SkDEBUGFAIL("unexpected verb"); 329 SkDEBUGFAIL("unexpected verb");
333 break; 330 break;
334 } 331 }
335 } 332 }
336 } 333 }
337 fEdgeList = fList.begin(); 334 fEdgeList = fList.begin();
338 return fList.count(); 335 return fList.count();
339 } 336 }
OLDNEW
« no previous file with comments | « no previous file | src/core/SkScan_Path.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698