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

Side by Side Diff: include/core/SkPathRef.h

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 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 | « include/core/SkPathEffect.h ('k') | include/core/SkPixelRef.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 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 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 8
9 #ifndef SkPathRef_DEFINED 9 #ifndef SkPathRef_DEFINED
10 #define SkPathRef_DEFINED 10 #define SkPathRef_DEFINED
(...skipping 18 matching lines...) Expand all
29 * 29 *
30 * The points and verbs are stored in a single allocation. The points are at the begining of the 30 * The points and verbs are stored in a single allocation. The points are at the begining of the
31 * allocation while the verbs are stored at end of the allocation, in reverse or der. Thus the points 31 * allocation while the verbs are stored at end of the allocation, in reverse or der. Thus the points
32 * and verbs both grow into the middle of the allocation until the meet. To acce ss verb i in the 32 * and verbs both grow into the middle of the allocation until the meet. To acce ss verb i in the
33 * verb array use ref.verbs()[~i] (because verbs() returns a pointer just beyond the first 33 * verb array use ref.verbs()[~i] (because verbs() returns a pointer just beyond the first
34 * logical verb or the last verb in memory). 34 * logical verb or the last verb in memory).
35 */ 35 */
36 36
37 class SK_API SkPathRef : public ::SkRefCnt { 37 class SK_API SkPathRef : public ::SkRefCnt {
38 public: 38 public:
39 SK_DECLARE_INST_COUNT(SkPathRef);
40
41 class Editor { 39 class Editor {
42 public: 40 public:
43 Editor(SkAutoTUnref<SkPathRef>* pathRef, 41 Editor(SkAutoTUnref<SkPathRef>* pathRef,
44 int incReserveVerbs = 0, 42 int incReserveVerbs = 0,
45 int incReservePoints = 0); 43 int incReservePoints = 0);
46 44
47 ~Editor() { SkDEBUGCODE(sk_atomic_dec(&fPathRef->fEditorsAttached);) } 45 ~Editor() { SkDEBUGCODE(sk_atomic_dec(&fPathRef->fEditorsAttached);) }
48 46
49 /** 47 /**
50 * Returns the array of points. 48 * Returns the array of points.
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer o verbs. 450 kEmptyGenID = 1, // GenID reserved for path ref with zero points and zer o verbs.
453 }; 451 };
454 mutable uint32_t fGenerationID; 452 mutable uint32_t fGenerationID;
455 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use at any time. 453 SkDEBUGCODE(int32_t fEditorsAttached;) // assert that only one editor in use at any time.
456 454
457 friend class PathRefTest_Private; 455 friend class PathRefTest_Private;
458 typedef SkRefCnt INHERITED; 456 typedef SkRefCnt INHERITED;
459 }; 457 };
460 458
461 #endif 459 #endif
OLDNEW
« no previous file with comments | « include/core/SkPathEffect.h ('k') | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698