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

Side by Side Diff: tests/PathOpsAngleTest.cpp

Issue 1033803002: Revert of fix destructor order to fix build (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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 | « src/pathops/SkPathOpsTightBounds.cpp ('k') | no next file » | 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 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkOpContour.h" 9 #include "SkOpContour.h"
10 #include "SkOpSegment.h" 10 #include "SkOpSegment.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 226
227 static CircleData circleDataSet[] = { 227 static CircleData circleDataSet[] = {
228 { {{{313.0155029296875, 207.90290832519531}, {320.05078125, 227.587432861328 12}}}, 2, {} }, 228 { {{{313.0155029296875, 207.90290832519531}, {320.05078125, 227.587432861328 12}}}, 2, {} },
229 { {{{313.0155029296875, 207.90290832519531}, {313.98246891063195, 219.336152 03830394}, 229 { {{{313.0155029296875, 207.90290832519531}, {313.98246891063195, 219.336152 03830394},
230 {320.05078125, 227.58743286132812}}}, 3, {} }, 230 {320.05078125, 227.58743286132812}}}, 3, {} },
231 }; 231 };
232 232
233 static const int circleDataSetSize = (int) SK_ARRAY_COUNT(circleDataSet); 233 static const int circleDataSetSize = (int) SK_ARRAY_COUNT(circleDataSet);
234 234
235 DEF_TEST(PathOpsAngleCircle, reporter) { 235 DEF_TEST(PathOpsAngleCircle, reporter) {
236 SkChunkAlloc allocator(4096);
237 SkOpContour contour; 236 SkOpContour contour;
238 SkOpGlobalState state(NULL PATH_OPS_DEBUG_PARAMS(&contour)); 237 SkOpGlobalState state(NULL PATH_OPS_DEBUG_PARAMS(&contour));
239 contour.init(&state, false, false); 238 contour.init(&state, false, false);
239 SkChunkAlloc allocator(4096);
240 for (int index = 0; index < circleDataSetSize; ++index) { 240 for (int index = 0; index < circleDataSetSize; ++index) {
241 CircleData& data = circleDataSet[index]; 241 CircleData& data = circleDataSet[index];
242 for (int idx2 = 0; idx2 < data.fPtCount; ++idx2) { 242 for (int idx2 = 0; idx2 < data.fPtCount; ++idx2) {
243 data.fShortPts[idx2] = data.fPts.fPts[idx2].asSkPoint(); 243 data.fShortPts[idx2] = data.fPts.fPts[idx2].asSkPoint();
244 } 244 }
245 switch (data.fPtCount) { 245 switch (data.fPtCount) {
246 case 2: 246 case 2:
247 contour.addLine(data.fShortPts, &allocator); 247 contour.addLine(data.fShortPts, &allocator);
248 break; 248 break;
249 case 3: 249 case 3:
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 angle->set(startSpan, endSpan); 489 angle->set(startSpan, endSpan);
490 if (startT < endT) { 490 if (startT < endT) {
491 startSpan->upCast()->setToAngle(angle); 491 startSpan->upCast()->setToAngle(angle);
492 endSpan->setFromAngle(angle); 492 endSpan->setFromAngle(angle);
493 } else { 493 } else {
494 endSpan->upCast()->setToAngle(angle); 494 endSpan->upCast()->setToAngle(angle);
495 startSpan->setFromAngle(angle); 495 startSpan->setFromAngle(angle);
496 } 496 }
497 } 497 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsTightBounds.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698