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

Side by Side Diff: include/private/SkWeakRefCnt.h

Issue 1369333004: Move SkAtomics.h to private. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 2 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/private/SkSemaphore.h ('k') | src/core/SkAAClip.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 7
8 #ifndef SkWeakRefCnt_DEFINED 8 #ifndef SkWeakRefCnt_DEFINED
9 #define SkWeakRefCnt_DEFINED 9 #define SkWeakRefCnt_DEFINED
10 10
11 #include "SkRefCnt.h" 11 #include "SkRefCnt.h"
12 #include "SkAtomics.h" 12 #include "../private/SkAtomics.h"
13 13
14 /** \class SkWeakRefCnt 14 /** \class SkWeakRefCnt
15 15
16 SkWeakRefCnt is the base class for objects that may be shared by multiple 16 SkWeakRefCnt is the base class for objects that may be shared by multiple
17 objects. When an existing strong owner wants to share a reference, it calls 17 objects. When an existing strong owner wants to share a reference, it calls
18 ref(). When a strong owner wants to release its reference, it calls 18 ref(). When a strong owner wants to release its reference, it calls
19 unref(). When the shared object's strong reference count goes to zero as 19 unref(). When the shared object's strong reference count goes to zero as
20 the result of an unref() call, its (virtual) weak_dispose method is called. 20 the result of an unref() call, its (virtual) weak_dispose method is called.
21 It is an error for the destructor to be called explicitly (or via the 21 It is an error for the destructor to be called explicitly (or via the
22 object going out of scope on the stack or calling delete) if 22 object going out of scope on the stack or calling delete) if
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 weak_unref(); 150 weak_unref();
151 } 151 }
152 152
153 /* Invariant: fWeakCnt = #weak + (fRefCnt > 0 ? 1 : 0) */ 153 /* Invariant: fWeakCnt = #weak + (fRefCnt > 0 ? 1 : 0) */
154 mutable int32_t fWeakCnt; 154 mutable int32_t fWeakCnt;
155 155
156 typedef SkRefCnt INHERITED; 156 typedef SkRefCnt INHERITED;
157 }; 157 };
158 158
159 #endif 159 #endif
OLDNEW
« no previous file with comments | « include/private/SkSemaphore.h ('k') | src/core/SkAAClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698