aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTSort.h
Commit message (Collapse)AuthorAge
* Stop using SkTSwap.Gravatar Ben Wagner2018-06-19
| | | | | | | | | | | | | Use std::swap instead. It does not appear that any external user specializes SkTSwap, but some may still use it. This removes all use in Skia so that SkTSwap can later be removed in a smaller CL. After that the <utility> include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary <halcanary@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
* Revert "Revert "SkTypes: extract SkTo""Gravatar Hal Canary2018-06-14
| | | | | | | | | | | | | | | | This reverts commit fdcfb8b7c23fbf18f872d2c31d27978235033876. > Original change's description: > > SkTypes: extract SkTo > > > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > > Reviewed-on: https://skia-review.googlesource.com/133620 > > Reviewed-by: Mike Klein <mtklein@google.com> Change-Id: Ida74fbc5c21248a724a5edbf9fae18a33bcb23aa Reviewed-on: https://skia-review.googlesource.com/134506 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Revert "SkTypes: extract SkTo"Gravatar Hal Canary2018-06-13
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2a2f67592602b18527bc3fd449132d420cd5b62e. Reason for revert: this appears to be what is holding up the Chrome roll. Original change's description: > SkTypes: extract SkTo > > Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 > Reviewed-on: https://skia-review.googlesource.com/133620 > Reviewed-by: Mike Klein <mtklein@google.com> TBR=mtklein@google.com,halcanary@google.com No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: Iafd738aedfb679a23c061a51afe4b98a8d4cdfae Reviewed-on: https://skia-review.googlesource.com/134504 Reviewed-by: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* SkTypes: extract SkToGravatar Hal Canary2018-06-12
| | | | | | Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
* SkTInsertionSort tweak.Gravatar Ben Wagner2016-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | 'Unoptomized' insertion sort swaps the 'insert' value multiple times inside the main loop before it finds its place. However, this has the advantage that if the 'insert' element is already not less than any element in the sorted partition no moves are made at all. The 'optimized' insertion sort present before this CL moves the 'insert' value into a temporary (creating a 'hole') and then moves already sorted elements until the 'insert' element finds its place. This has the disadvantage of always moving the 'insert' element out of the list and then re-inserting it, even if this was unnecessary. This CL further optimizes the insertion sort by moving the first test of the main loop to before moving the 'insert' element into the temporary. This is expected to increase the code size by a few instructions but avoids the useless non-moves. There will actually be one fewer comparison per element comsidered (the initial 'left < hole' predicate is always true when entering the inner loop). GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4022 Change-Id: I33158b7781e4dbec1f1b76c0bf43ebe169075733 Reviewed-on: https://skia-review.googlesource.com/4022 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Ben Wagner <bungeman@google.com>
* Move when swapping, if possible.Gravatar bungeman2016-10-26
| | | | | | | | | | | | | This change was avoided in the past because vc++ 2013 (12.0) did not properly create default move constructors and move assignment operators. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2454763002 TBR=reed Verbal lgtm Review-Url: https://codereview.chromium.org/2454763002
* SkLeanWindows.h: #include "Windows.h" fewer placesGravatar halcanary2016-06-07
| | | | | | | | | | | | | | | | | | | | | | | | $ git grep -l '<windows.h>' include src include/private/SkLeanWindows.h $ git grep -l SkLeanWindows.h | grep '\.h$' include/ports/SkTypeface_win.h include/utils/win/SkHRESULT.h include/utils/win/SkTScopedComPtr.h include/views/SkEvent.h src/core/SkMathPriv.h src/ports/SkTypeface_win_dw.h src/utils/SkThreadUtils_win.h src/utils/win/SkWGL.h The same for `#include <intrin.h>` that was found in SkMath.h. Those functions that needed it are moved to SkMathPriv.h. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041943002 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_chromium_compile_dbg_ng,win_chromium_compile_rel_ng Review-Url: https://codereview.chromium.org/2041943002
* Style bikeshed - remove extraneous whitespaceGravatar halcanary2016-03-29
| | | | | | GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002 Review URL: https://codereview.chromium.org/1842753002
* One SkTSearch to rule them all. Allow key to be of different type than the ↵Gravatar bsalomon@google.com2013-05-17
| | | | | | | | | | array. R=bungeman@google.com Review URL: https://codereview.chromium.org/15070011 git-svn-id: http://skia.googlecode.com/svn/trunk@9182 2bbb7eff-a529-9590-31e7-b0007b416f81
* Sort GL extension strings and search to find.Gravatar bsalomon@google.com2013-02-27
| | | | | | Review URL: https://codereview.chromium.org/12316141 git-svn-id: http://skia.googlecode.com/svn/trunk@7889 2bbb7eff-a529-9590-31e7-b0007b416f81
* Simplify and speed up SkIntroSort.Gravatar bungeman@google.com2013-02-04
| | | | | | | https://codereview.appspot.com/7273048/ git-svn-id: http://skia.googlecode.com/svn/trunk@7552 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkNextLog2 requires positive values.Gravatar bungeman@google.com2013-01-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7474 2bbb7eff-a529-9590-31e7-b0007b416f81
* SkNextLog2 requires values > 0.Gravatar bungeman@google.com2013-01-30
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7472 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid possible O(n) stack space use by skqsort.Gravatar bungeman@google.com2013-01-30
| | | | | | | https://codereview.appspot.com/7222043/ git-svn-id: http://skia.googlecode.com/svn/trunk@7470 2bbb7eff-a529-9590-31e7-b0007b416f81
* Avoid O(n) stack space usage in qsort.Gravatar bungeman@google.com2013-01-25
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@7397 2bbb7eff-a529-9590-31e7-b0007b416f81
* Bottom-up heapsort.Gravatar bungeman@google.com2013-01-24
| | | | | | | https://codereview.appspot.com/7199050/ git-svn-id: http://skia.googlecode.com/svn/trunk@7382 2bbb7eff-a529-9590-31e7-b0007b416f81
* Added an overload of SkTQSort that sorts an array of values, rather than an ↵Gravatar rileya@google.com2012-08-28
| | | | | | | | | array of pointers. Also added some parentheses to all the QSort variants to get rid of a gcc warning. Review URL: https://codereview.appspot.com/6492044 git-svn-id: http://skia.googlecode.com/svn/trunk@5311 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkTQSort (stolen from cary's experimental work)Gravatar reed@google.com2012-05-07
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3854 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
* fix heapsortGravatar reed@android.com2009-03-18
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@126 2bbb7eff-a529-9590-31e7-b0007b416f81
* Move SkTSort.h back to private, and instead allow in the makefile for tests toGravatar reed@android.com2009-03-04
| | | | | | | | | see private headers. This also means the tests don't have to use ../.. to find the private header they want. git-svn-id: http://skia.googlecode.com/svn/trunk@107 2bbb7eff-a529-9590-31e7-b0007b416f81
* add tests (unittests) to MakefileGravatar reed@android.com2009-02-28
| | | | | | | | move SkTSort.h into public includes git-svn-id: http://skia.googlecode.com/svn/trunk@98 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