aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports/SkThread_pthread.cpp
Commit message (Collapse)AuthorAge
* Result of running tools/sanitize_source_files.py (which was added in ↵Gravatar rmistry@google.com2012-08-23
| | | | | | | | | https://codereview.appspot.com/6465078/) This CL is part II of IV (I broke down the 1280 files into 4 CLs). Review URL: https://codereview.appspot.com/6474054 git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a skia method to perform an atomic add.Gravatar scroggo@google.com2012-07-16
| | | | | | | | | | | | Complements sk_atomic_inc for when you want to increase by more than one. This time, use the correct atomic add function on Windows. Reviewed at https://codereview.appspot.com/6399050/ Review URL: https://codereview.appspot.com/6407048 git-svn-id: http://skia.googlecode.com/svn/trunk@4623 2bbb7eff-a529-9590-31e7-b0007b416f81
* Revert "Add a method to atomic add."Gravatar scroggo@google.com2012-07-16
| | | | | | | | | | | This reverts commit eb539cf92f487daf9567ffbbba6b6653406d43ae. BUG= TEST= Review URL: https://codereview.appspot.com/6395051 git-svn-id: http://skia.googlecode.com/svn/trunk@4615 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add a skia method to perform an atomic add.Gravatar scroggo@google.com2012-07-16
| | | | | | | | Complements sk_atomic_inc for when you want to increase by more than one. Review URL: https://codereview.appspot.com/6350106 git-svn-id: http://skia.googlecode.com/svn/trunk@4614 2bbb7eff-a529-9590-31e7-b0007b416f81
* WeakRefCntGravatar bungeman@google.com2012-05-16
| | | | | | | http://codereview.appspot.com/5649046/ git-svn-id: http://skia.googlecode.com/svn/trunk@3978 2bbb7eff-a529-9590-31e7-b0007b416f81
* add flag/hint to PlatformGetSpecific. If true, then the caller requires thatGravatar reed@google.com2012-05-08
| | | | | | | | | | | the tls slot be allocated even if this is the first, to ensure that it can later call PlatformSetSpecific. When this is false (which is most of the time) the implementation may optimize by not even creating the slot, and just returning null. git-svn-id: http://skia.googlecode.com/svn/trunk@3871 2bbb7eff-a529-9590-31e7-b0007b416f81
* must include SkTLS.hGravatar reed@google.com2012-05-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3860 2bbb7eff-a529-9590-31e7-b0007b416f81
* impl SkTLS for windows, refactoring to share code with pthread implGravatar reed@google.com2012-05-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3859 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix copy/paste errorGravatar reed@google.com2012-04-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3753 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkTLS::DeleteGravatar reed@google.com2012-04-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3752 2bbb7eff-a529-9590-31e7-b0007b416f81
* add experimental tls (for font cache eventually)Gravatar reed@google.com2012-04-23
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3748 2bbb7eff-a529-9590-31e7-b0007b416f81
* posix: Avoid static initializers in static/global mutexesGravatar digit@google.com2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes static initializers related to static and global mutexes from the final library's machine code when building on a pthread-capable system. We use PTHREAD_MUTEX_INITIALIZER to perform POD-style initialization. You need a line like the following to declare a global mutex with it: SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER }; We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX macros to be able to declare static/global mutexes in the source tree uniformly. SkMutex is now defined as a sub-class of SkBaseMutex, with standard construction/destruction semantics. This is useful if the mutex object is a member of another C++ class, or allocated dynamically. We also modify a few places to refer to SkBaseMutex instead of a SkMutex, where it makes sense. Generally speaking, client code should hold and use pointers to SkBaseMutex whenever they can now. We defined a new built-time macro named SK_USE_POSIX_THREADS to indicate that we're using a pthread-based SkThread.h interface. The macro will also be used in future patches to implement other helper thread synchronization classes. Finally, we inline the acquire() and release() functions in the case of Posix to improve performance a bit. Running: 'bench -repeat 10 -match mutex' on an Android device or a 2.4GHz Xeon Linux desktop shows the following improvements: Before After Galaxy Nexus 1.64 1.45 Nexus S 1.47 1.16 Xoom 1.86 1.66 Xeon 0.36 0.31 This removes 5 static mutex initializers from the library Review URL: https://codereview.appspot.com/5501066 git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused bool param to SkMutex constructorGravatar reed@google.com2012-01-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3025 2bbb7eff-a529-9590-31e7-b0007b416f81
* android: optimize atomics routinesGravatar digit@google.com2012-01-11
| | | | | | | | | This patch provides a slightly optimized implementation of atomic increment/decrement functions by using static inlined versions of the gcc intrinsics. Review URL: http://codereview.appspot.com/5498069 git-svn-id: http://skia.googlecode.com/svn/trunk@3012 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");Gravatar tomhudson@google.com2011-12-28
| | | | | | | | | | catch a couple of latent SkASSERT("text") bugs. http://codereview.appspot.com/5504090/ git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use gcc intrinsic functions for atomic incr and decrGravatar bsalomon@google.com2011-08-18
| | | | | | | | Review URL: http://codereview.appspot.com/4894055/ git-svn-id: http://skia.googlecode.com/svn/trunk@2138 2bbb7eff-a529-9590-31e7-b0007b416f81
* Automatic update of all copyright notices to reflect new license terms.Gravatar epoger@google.com2011-07-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have manually examined all of these diffs and restored a few files that seem to require manual adjustment. The following files still need to be modified manually, in a separate CL: android_sample/SampleApp/AndroidManifest.xml android_sample/SampleApp/res/layout/layout.xml android_sample/SampleApp/res/menu/sample.xml android_sample/SampleApp/res/values/strings.xml android_sample/SampleApp/src/com/skia/sampleapp/SampleApp.java android_sample/SampleApp/src/com/skia/sampleapp/SampleView.java experimental/CiCarbonSampleMain.c experimental/CocoaDebugger/main.m experimental/FileReaderApp/main.m experimental/SimpleCocoaApp/main.m experimental/iOSSampleApp/Shared/SkAlertPrompt.h experimental/iOSSampleApp/Shared/SkAlertPrompt.m experimental/iOSSampleApp/SkiOSSampleApp-Base.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Debug.xcconfig experimental/iOSSampleApp/SkiOSSampleApp-Release.xcconfig gpu/src/android/GrGLDefaultInterface_android.cpp gyp/common.gypi gyp_skia include/ports/SkHarfBuzzFont.h include/views/SkOSWindow_wxwidgets.h make.bat make.py src/opts/memset.arm.S src/opts/memset16_neon.S src/opts/memset32_neon.S src/opts/opts_check_arm.cpp src/ports/SkDebug_brew.cpp src/ports/SkMemory_brew.cpp src/ports/SkOSFile_brew.cpp src/ports/SkXMLParser_empty.cpp src/utils/ios/SkImageDecoder_iOS.mm src/utils/ios/SkOSFile_iOS.mm src/utils/ios/SkStream_NSData.mm tests/FillPathTest.cpp Review URL: http://codereview.appspot.com/4816058 git-svn-id: http://skia.googlecode.com/svn/trunk@1982 2bbb7eff-a529-9590-31e7-b0007b416f81
* grab from latest androidGravatar reed@android.com2008-12-17
git-svn-id: http://skia.googlecode.com/svn/trunk@27 2bbb7eff-a529-9590-31e7-b0007b416f81