OLD | NEW |
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 #include "SkEventSink.h" | 10 #include "SkEventSink.h" |
11 #include "SkTagList.h" | 11 #include "SkTagList.h" |
12 #include "SkThread.h" | 12 #include "SkThread.h" |
13 | 13 |
14 #include "SkThread.h" | 14 #include "SkThread.h" |
15 #include "SkTime.h" | 15 #include "SkTime.h" |
16 | 16 |
17 SK_DEFINE_INST_COUNT(SkEventSink) | |
18 | |
19 class SkEventSink_Globals { | 17 class SkEventSink_Globals { |
20 public: | 18 public: |
21 SkEventSink_Globals() { | 19 SkEventSink_Globals() { |
22 fNextSinkID = 0; | 20 fNextSinkID = 0; |
23 fSinkHead = NULL; | 21 fSinkHead = NULL; |
24 } | 22 } |
25 | 23 |
26 SkMutex fSinkMutex; | 24 SkMutex fSinkMutex; |
27 SkEventSinkID fNextSinkID; | 25 SkEventSinkID fNextSinkID; |
28 SkEventSink* fSinkHead; | 26 SkEventSink* fSinkHead; |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 /** Remove all name/id pairs from the system. This is call internally | 294 /** Remove all name/id pairs from the system. This is call internally |
297 on shutdown, to ensure no memory leaks. It should not be called | 295 on shutdown, to ensure no memory leaks. It should not be called |
298 before shutdown. | 296 before shutdown. |
299 */ | 297 */ |
300 void SkEventSink::RemoveAllNamedSinkIDs() | 298 void SkEventSink::RemoveAllNamedSinkIDs() |
301 { | 299 { |
302 SkAutoMutexAcquire ac(gNamedSinkMutex); | 300 SkAutoMutexAcquire ac(gNamedSinkMutex); |
303 (void)gNamedSinkIDs.reset(); | 301 (void)gNamedSinkIDs.reset(); |
304 } | 302 } |
305 #endif | 303 #endif |
OLD | NEW |