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

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

Issue 1207893002: Clean up a few includes, introduce iwyu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Just a little more cleanup. Created 5 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
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 9
10 #ifndef SkRefCnt_DEFINED 10 #ifndef SkRefCnt_DEFINED
11 #define SkRefCnt_DEFINED 11 #define SkRefCnt_DEFINED
12 12
13 #include "SkAtomics.h" 13 #include "SkAtomics.h"
14 #include "SkInstCnt.h" 14 #include "SkInstCnt.h" // IWYU pragma: export
mtklein 2015/06/24 22:52:01 Does this indicate we should move the contents of
bungeman-skia 2015/06/25 14:45:06 Maybe? Now that we have asan and the like, is it s
15 #include "SkTemplates.h" 15 #include "SkTemplates.h"
16 16
17 /** \class SkRefCntBase 17 /** \class SkRefCntBase
18 18
19 SkRefCntBase is the base class for objects that may be shared by multiple 19 SkRefCntBase is the base class for objects that may be shared by multiple
20 objects. When an existing owner wants to share a reference, it calls ref(). 20 objects. When an existing owner wants to share a reference, it calls ref().
21 When an owner wants to release its reference, it calls unref(). When the 21 When an owner wants to release its reference, it calls unref(). When the
22 shared object's reference count goes to zero as the result of an unref() 22 shared object's reference count goes to zero as the result of an unref()
23 call, its (virtual) destructor is called. It is an error for the 23 call, its (virtual) destructor is called. It is an error for the
24 destructor to be called explicitly (or via the object going out of scope on 24 destructor to be called explicitly (or via the object going out of scope on
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 SkDELETE((const Derived*)this); 243 SkDELETE((const Derived*)this);
244 } 244 }
245 } 245 }
246 void deref() const { this->unref(); } 246 void deref() const { this->unref(); }
247 247
248 private: 248 private:
249 mutable int32_t fRefCnt; 249 mutable int32_t fRefCnt;
250 }; 250 };
251 251
252 #endif 252 #endif
OLDNEW
« no previous file with comments | « include/core/SkMutex.h ('k') | include/core/SkThread.h » ('j') | include/core/SkThread.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698