aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkUtils.h
Commit message (Collapse)AuthorAge
* SSE2 implementation of memcpy32Gravatar commit-bot@chromium.org2014-05-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With SSE2 version memcpy32, S32_Opaque_BlitRow32() in SkBlitRow_D32.cpp has about 30% performance improvement. Here are the data on desktop i7-3770. before: bitmap_scale_filter_90_90 8888: cmsecs = 2.01 bitmaprect_FF_filter_trans 8888: cmsecs = 3.61 bitmaprect_FF_nofilter_trans 8888: cmsecs = 3.57 bitmaprect_FF_filter_identity 8888: cmsecs = 3.53 bitmaprect_FF_nofilter_identity 8888: cmsecs = 3.53 bitmap_4444_update 8888: cmsecs = 4.84 bitmap_4444_update_volatile 8888: cmsecs = 4.81 bitmap_4444 8888: cmsecs = 4.81 after: bitmap_scale_filter_90_90 8888: cmsecs = 1.83 bitmaprect_FF_filter_trans 8888: cmsecs = 2.36 bitmaprect_FF_nofilter_trans 8888: cmsecs = 2.36 bitmaprect_FF_filter_identity 8888: cmsecs = 2.60 bitmaprect_FF_nofilter_identity 8888: cmsecs = 2.63 bitmap_4444_update 8888: cmsecs = 3.30 bitmap_4444_update_volatile 8888: cmsecs = 3.30 bitmap_4444 8888: cmsecs = 3.29 BUG=skia: R=mtklein@google.com, reed@google.com, bsalomon@google.com Author: qiankun.miao@intel.com Review URL: https://codereview.chromium.org/285313002 git-svn-id: http://skia.googlecode.com/svn/trunk@14822 2bbb7eff-a529-9590-31e7-b0007b416f81
* Choose memset procs once.Gravatar commit-bot@chromium.org2014-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TSAN shows us racing on the function pointers. Might as well fix it. WARNING: ThreadSanitizer: data race (pid=19995) Read of size 8 at 0x7f703affb048 by thread T12 (mutexes: write M2957): #0 SkBitmap::internalErase(SkIRect const&, unsigned int, unsigned int, unsigned int, unsigned int) const /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/core/SkBitmap.cpp:886 (tests+0x0000003511ca) #1 SkBitmap::eraseARGB(unsigned int, unsigned int, unsigned int, unsigned int) const /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/core/SkBitmap.cpp:919 (tests+0x0000003534bf) #2 (anonymous namespace)::DecodingImageGenerator::getPixels(SkImageInfo const&, void*, unsigned long) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/images/SkDecodingImageGenerator.cpp:195 (tests+0x00000051bee1) #3 SkDiscardablePixelRef::onNewLockPixels(SkPixelRef::LockRec*) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/lazy/SkDiscardablePixelRef.cpp:63 (tests+0x00000039ad9c) #4 SkPixelRef::lockPixels(SkPixelRef::LockRec*) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/core/SkPixelRef.cpp:179 (tests+0x0000003fec23) #5 SkBitmap::lockPixels() const /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/core/SkBitmap.cpp:414 (tests+0x00000034e41e) #6 SkAutoLockPixels /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/include/core/SkBitmap.h:819 (tests+0x0000002752f3) #7 ImageDecoderOptions(skiatest::Reporter*) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/tests/ImageDecodingTest.cpp:565 (tests+0x000000275d03) #8 skiatest::Test::run() /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/tests/Test.cpp:107 (tests+0x0000002263e7) #9 SkTestRunnable::run() /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/tests/skia_test.cpp:108 (tests+0x0000001d8607) #10 SkThreadPoolPrivate::ThreadLocal<void>::run(SkTRunnable<void>*) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/include/utils/SkThreadPool.h:108 (tests+0x0000001d817e) #11 thread_start(void*) /var/scratch/Release/../../../usr/local/google/home/mtklein/skia/src/utils/SkThreadUtils_pthread.cpp:66 (tests+0x000000604347) Previous write of size 8 at 0x7f703affb048 by thread T26: [failed to restore the stack] BUG=skia:1792 R=bungeman@google.com, mtklein@google.com, reed@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/250503003 git-svn-id: http://skia.googlecode.com/svn/trunk@14548 2bbb7eff-a529-9590-31e7-b0007b416f81
* More Windows 64b compilation warning fixesGravatar robertphillips@google.com2013-11-21
| | | | | | | | https://codereview.chromium.org/47513017/ git-svn-id: http://skia.googlecode.com/svn/trunk@12337 2bbb7eff-a529-9590-31e7-b0007b416f81
* Reverting r12315 (More Windows 64b compilation warning fixes) due to ↵Gravatar robertphillips@google.com2013-11-20
| | | | | | compilation failures git-svn-id: http://skia.googlecode.com/svn/trunk@12316 2bbb7eff-a529-9590-31e7-b0007b416f81
* More Windows 64b compilation warning fixesGravatar robertphillips@google.com2013-11-20
| | | | | | | | https://codereview.chromium.org/47513017/ git-svn-id: http://skia.googlecode.com/svn/trunk@12315 2bbb7eff-a529-9590-31e7-b0007b416f81
* Guard against most unintentionally ephemeral SkAutoFoo instantiations.Gravatar commit-bot@chromium.org2013-11-18
| | | | | | | | | | | | | | | | | | | I think I applied the trick everywhere possible. Limitations: - can't be used with templated classes - all constructors and destructors must be defined inline A couple of the SkAutoFoo were unused in Skia, Chromium, and Android, so I deleted them. This change caught the same bugs Cary found in SkPath, plus one more in SampleApp. BUG= R=reed@google.com, caryclark@google.com Author: mtklein@google.com Review URL: https://codereview.chromium.org/72603005 git-svn-id: http://skia.googlecode.com/svn/trunk@12301 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix a few clang errors while trying to build tools target.Gravatar tfarina@chromium.org2013-03-26
| | | | | | | | | | | | | Most of the errors were like: ../../src/gpu/gl/GrGLEffectMatrix.cpp:74:9: error: variable 'varyingType' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] ../../src/gpu/gl/debug/GrDebugGL.h:125:21: error: private field 'fMaxTextureUnits' is not used [-Werror,-Wunused-private-field] ../../src/core/SkBitmapSampler.cpp:312:25: error: private field 'fProcTable' is not used [-Werror,-Wunused-private-field] R=bsalomon@google.com,scroggo@google.com Review URL: https://codereview.chromium.org/12915007 git-svn-id: http://skia.googlecode.com/svn/trunk@8403 2bbb7eff-a529-9590-31e7-b0007b416f81
* tweak to spacing, to trigger buildGravatar mike@reedtribe.org2013-02-06
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7607 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sanitizing source files in Skia_Periodic_House_KeepingGravatar skia.committer@gmail.com2013-01-26
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7406 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add ARM optimizations to the build.Gravatar djsollen@google.com2012-01-09
| | | | | | | | Also had to fix a problem in the ARM memset code that was causing some tests and bench to fail. Review URL: http://codereview.appspot.com/5522052 git-svn-id: http://skia.googlecode.com/svn/trunk@2989 2bbb7eff-a529-9590-31e7-b0007b416f81
* declare IsVariationSelector to be inline, to fix warningGravatar reed@google.com2011-12-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2917 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkUnichar_IsVariationSelector()Gravatar reed@google.com2011-12-21
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2915 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update files to use SK_BUILD_FOR_ANDROID.Gravatar djsollen@google.com2011-11-08
| | | | | | | | This CL also removes any unecessary references to the ANDROID definition. Review URL: http://codereview.appspot.com/5354049 git-svn-id: http://skia.googlecode.com/svn/trunk@2629 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
* code styleGravatar mike@reedtribe.org2011-04-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@1095 2bbb7eff-a529-9590-31e7-b0007b416f81
* merge with changes for GPU backendGravatar reed@android.com2010-12-20
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@637 2bbb7eff-a529-9590-31e7-b0007b416f81
* More SSE2-ification; fix for gcc -msse2.Gravatar senorblanco@chromium.org2009-11-16
| | | | | | | | Review URL: http://codereview.appspot.com/154163 git-svn-id: http://skia.googlecode.com/svn/trunk@428 2bbb7eff-a529-9590-31e7-b0007b416f81
* add initial unittest framework (tests)Gravatar reed@android.com2009-02-27
| | | | | | | | move some previous unittests out of core classes and into tests git-svn-id: http://skia.googlecode.com/svn/trunk@96 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