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

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

Issue 18770007: Add a 'unique' method to SkRefCnt, document the usage, and add support. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 | Annotate | Revision Log
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 SkThread_DEFINED 10 #ifndef SkThread_DEFINED
11 #define SkThread_DEFINED 11 #define SkThread_DEFINED
12 12
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 #include "SkThread_platform.h" 14 #include "SkThread_platform.h"
15 15
16 /****** SkThread_platform needs to define the following... 16 /****** SkThread_platform needs to define the following...
17 17
18 int32_t sk_atomic_inc(int32_t*); 18 int32_t sk_atomic_inc(int32_t*);
19 int32_t sk_atomic_add(int32_t*, int32_t); 19 int32_t sk_atomic_add(int32_t*, int32_t);
20 int32_t sk_atomic_dec(int32_t*); 20 int32_t sk_atomic_dec(int32_t*);
21 int32_t sk_atomic_conditional_inc(int32_t*); 21 int32_t sk_atomic_conditional_inc(int32_t*);
22 int32_t sk_atomic_unprotected_read(const volatile int32_t &);
22 23
23 class SkMutex { 24 class SkMutex {
24 public: 25 public:
25 SkMutex(); 26 SkMutex();
26 ~SkMutex(); 27 ~SkMutex();
27 28
28 void acquire(); 29 void acquire();
29 void release(); 30 void release();
30 }; 31 };
31 32
(...skipping 27 matching lines...) Expand all
59 fMutex->release(); 60 fMutex->release();
60 fMutex = NULL; 61 fMutex = NULL;
61 } 62 }
62 } 63 }
63 64
64 private: 65 private:
65 SkBaseMutex* fMutex; 66 SkBaseMutex* fMutex;
66 }; 67 };
67 68
68 #endif 69 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698