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

Side by Side Diff: src/pathops/SkOpEdgeBuilder.h

Issue 16951017: convert pathops to use SkSTArray where possible. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: pathops use SkTArray Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpEdgeBuilder.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 SkOpEdgeBuilder_DEFINED 7 #ifndef SkOpEdgeBuilder_DEFINED
8 #define SkOpEdgeBuilder_DEFINED 8 #define SkOpEdgeBuilder_DEFINED
9 9
10 #include "SkOpContour.h" 10 #include "SkOpContour.h"
11 #include "SkPathWriter.h" 11 #include "SkPathWriter.h"
12 #include "SkTArray.h" 12 #include "SkTArray.h"
13 #include "SkTDArray.h"
14 13
15 class SkOpEdgeBuilder { 14 class SkOpEdgeBuilder {
16 public: 15 public:
17 SkOpEdgeBuilder(const SkPathWriter& path, SkTArray<SkOpContour>& contours) 16 SkOpEdgeBuilder(const SkPathWriter& path, SkTArray<SkOpContour>& contours)
18 : fPath(path.nativePath()) 17 : fPath(path.nativePath())
19 , fContours(contours) 18 , fContours(contours)
20 , fAllowOpenContours(true) { 19 , fAllowOpenContours(true) {
21 init(); 20 init();
22 } 21 }
23 22
(...skipping 18 matching lines...) Expand all
42 void addOperand(const SkPath& path); 41 void addOperand(const SkPath& path);
43 bool finish(); 42 bool finish();
44 void init(); 43 void init();
45 44
46 private: 45 private:
47 bool close(); 46 bool close();
48 int preFetch(); 47 int preFetch();
49 bool walk(); 48 bool walk();
50 49
51 const SkPath* fPath; 50 const SkPath* fPath;
52 SkTDArray<SkPoint> fPathPts; 51 SkTArray<SkPoint, true> fPathPts;
53 SkTDArray<uint8_t> fPathVerbs; 52 SkTArray<uint8_t, true> fPathVerbs;
54 SkOpContour* fCurrentContour; 53 SkOpContour* fCurrentContour;
55 SkTArray<SkOpContour>& fContours; 54 SkTArray<SkOpContour>& fContours;
56 SkTDArray<SkPoint> fReducePts; // segments created on the fly 55 SkTArray<SkPoint, true> fReducePts; // segments created on the fly
57 SkTDArray<int> fExtra; // -1 marks new contour, > 0 offsets into contour 56 SkTArray<int, true> fExtra; // -1 marks new contour, > 0 offsets into conto ur
58 SkPathOpsMask fXorMask[2]; 57 SkPathOpsMask fXorMask[2];
59 const SkPoint* fFinalCurveStart; 58 const SkPoint* fFinalCurveStart;
60 const SkPoint* fFinalCurveEnd; 59 const SkPoint* fFinalCurveEnd;
61 int fSecondHalf; 60 int fSecondHalf;
62 bool fOperand; 61 bool fOperand;
63 bool fAllowOpenContours; 62 bool fAllowOpenContours;
64 bool fUnparseable; 63 bool fUnparseable;
65 }; 64 };
66 65
67 #endif 66 #endif
OLDNEW
« no previous file with comments | « src/pathops/SkOpContour.cpp ('k') | src/pathops/SkOpEdgeBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698