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

Side by Side Diff: src/views/SkEventSink.cpp

Issue 1215393002: Remove SkThread.h, include SkMutex.h or SkAtomics.h as appropriate. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: skimagefilter 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 | « src/views/SkEvent.cpp ('k') | src/views/SkOSMenu.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 /* 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 "SkMutex.h"
11 #include "SkTagList.h" 12 #include "SkTagList.h"
12 #include "SkThread.h"
13
14 #include "SkThread.h"
15 #include "SkTime.h" 13 #include "SkTime.h"
16 14
17 class SkEventSink_Globals { 15 class SkEventSink_Globals {
18 public: 16 public:
19 SkEventSink_Globals() { 17 SkEventSink_Globals() {
20 fNextSinkID = 0; 18 fNextSinkID = 0;
21 fSinkHead = NULL; 19 fSinkHead = NULL;
22 } 20 }
23 21
24 SkMutex fSinkMutex; 22 SkMutex fSinkMutex;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 sink = sink->fNextSink; 247 sink = sink->fNextSink;
250 } 248 }
251 return NULL; 249 return NULL;
252 } 250 }
253 251
254 //////////////////////////////////////////////////////////////////////////////// //////// 252 //////////////////////////////////////////////////////////////////////////////// ////////
255 //////////////////////////////////////////////////////////////////////////////// //////// 253 //////////////////////////////////////////////////////////////////////////////// ////////
256 254
257 #if 0 // experimental, not tested 255 #if 0 // experimental, not tested
258 256
259 #include "SkThread.h" 257 #include "SkMutex.h"
260 #include "SkTDict.h" 258 #include "SkTDict.h"
261 259
262 #define kMinStringBufferSize 128 260 #define kMinStringBufferSize 128
263 SK_DECLARE_STATIC_MUTEX(gNamedSinkMutex); 261 SK_DECLARE_STATIC_MUTEX(gNamedSinkMutex);
264 static SkTDict<SkEventSinkID> gNamedSinkIDs(kMinStringBufferSize); 262 static SkTDict<SkEventSinkID> gNamedSinkIDs(kMinStringBufferSize);
265 263
266 /** Register a name/id pair with the system. If the name already exists, 264 /** Register a name/id pair with the system. If the name already exists,
267 replace its ID with the new id. This pair will persist until UnregisterNamed Sink() 265 replace its ID with the new id. This pair will persist until UnregisterNamed Sink()
268 is called. 266 is called.
269 */ 267 */
(...skipping 24 matching lines...) Expand all
294 /** Remove all name/id pairs from the system. This is call internally 292 /** Remove all name/id pairs from the system. This is call internally
295 on shutdown, to ensure no memory leaks. It should not be called 293 on shutdown, to ensure no memory leaks. It should not be called
296 before shutdown. 294 before shutdown.
297 */ 295 */
298 void SkEventSink::RemoveAllNamedSinkIDs() 296 void SkEventSink::RemoveAllNamedSinkIDs()
299 { 297 {
300 SkAutoMutexAcquire ac(gNamedSinkMutex); 298 SkAutoMutexAcquire ac(gNamedSinkMutex);
301 (void)gNamedSinkIDs.reset(); 299 (void)gNamedSinkIDs.reset();
302 } 300 }
303 #endif 301 #endif
OLDNEW
« no previous file with comments | « src/views/SkEvent.cpp ('k') | src/views/SkOSMenu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698