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

Side by Side Diff: tests/SubsetPath.h

Issue 1842753002: Style bikeshed - remove extraneous whitespace (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « tests/StreamTest.cpp ('k') | tests/Test.h » ('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 * Copyright 2015 Google Inc. 2 * Copyright 2015 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 #ifndef SubsetPath_DEFINED 7 #ifndef SubsetPath_DEFINED
8 #define SubsetPath_DEFINED 8 #define SubsetPath_DEFINED
9 9
10 #include "SkPath.h" 10 #include "SkPath.h"
11 #include "SkTDArray.h" 11 #include "SkTDArray.h"
12 12
13 /* Given a path, generate a the desired minimal subset of the original. 13 /* Given a path, generate a the desired minimal subset of the original.
14 14
15 This does a binary divide-and-conquer on the path, first splitting by 15 This does a binary divide-and-conquer on the path, first splitting by
16 contours, and then by verbs. The caller passes whether the previous subset 16 contours, and then by verbs. The caller passes whether the previous subset
17 behaved the same as the original. If not, the subset() call restores the 17 behaved the same as the original. If not, the subset() call restores the
18 prior state before returning a new subset. 18 prior state before returning a new subset.
19 19
20 If a path fails a local test, this reduces the data to the 20 If a path fails a local test, this reduces the data to the
21 minimal set that fails using a pattern like: 21 minimal set that fails using a pattern like:
22 22
23 bool testFailed = true; 23 bool testFailed = true;
24 SkPath minimal; 24 SkPath minimal;
25 SubsetContours subsetContours(testPath); 25 SubsetContours subsetContours(testPath);
26 while (subsetContours.subset(testFailed, &minimal)) { 26 while (subsetContours.subset(testFailed, &minimal)) {
27 testFailed = myPathTest(minimal); 27 testFailed = myPathTest(minimal);
28 } 28 }
29 testFailed = true; 29 testFailed = true;
30 SubsetVerbs subsetVerbs(testPath); 30 SubsetVerbs subsetVerbs(testPath);
31 while (subsetVerbs.subset(testFailed, &minimal)) { 31 while (subsetVerbs.subset(testFailed, &minimal)) {
32 testFailed = myPathTest(minimal); 32 testFailed = myPathTest(minimal);
(...skipping 24 matching lines...) Expand all
57 }; 57 };
58 58
59 class SubsetVerbs : public SubsetPath { 59 class SubsetVerbs : public SubsetPath {
60 public: 60 public:
61 SubsetVerbs(const SkPath& path); 61 SubsetVerbs(const SkPath& path);
62 protected: 62 protected:
63 SkPath getSubsetPath() const override; 63 SkPath getSubsetPath() const override;
64 }; 64 };
65 65
66 #endif 66 #endif
OLDNEW
« no previous file with comments | « tests/StreamTest.cpp ('k') | tests/Test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698